Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Ensure you have Docker installed on your machine. You can download and install Docker from the official Docker website.
Create a file named Dockerfile in your project directory. The Dockerfile should contain instructions on how to build your Docker image.
Here is a sample Dockerfile for GridJs demo with python application:
# use Python 3.13 as parent image
FROM python:3.13-slim
# web port
EXPOSE 2022
# Update the package list and install the package along with additional related packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libicu-dev \
icu-devtools \
pkg-config \
build-essential \
fontconfig \
libgdiplus && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set the necessary environment variable
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
# Set the System.Globalization.Invariant setting to true
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
WORKDIR /app
# copy all to /app
COPY . /app
RUN pip install --no-cache-dir -r requirements.txt
# the basic file path which contains the spread sheet files
RUN mkdir -p /app/wb
# the file path to store the uploaded files
RUN mkdir -p /app/uploads
# the cache file path for GridJs
RUN mkdir -p /app/grid_cache/
COPY wb/*.xlsx /app/wb/
# start cmd
CMD [ "python", "./main.py" ]
Build the Docker Image: From the terminal, execute the following command to build your Docker image:
docker build -t gridjs-demo-python .
you can replace gridjs-demo-python with the name you want to give your Docker image.
Once the image is built, you can run a container using the following command:
docker run -d -p 2022:2022 -v C:/path/to/license.txt:/app/license --name gridjs-demo-container gridjs-demo-python
or just run the demo in trial mode:
docker run -d -p 2022:2022 --name gridjs-demo-container gridjs-demo-python
Explanation of Docker Run Command Options -d: Run the container in detached mode (in the background). -p 2022:2022: Map port 2022 in the container to port 2022 on the host machine. -v C:/path/to/license.txt:/app/license: Map license file path on the host machine to the file path in container. –name gridjs-demo-container: Assign a name to the container.
To check if your container is running, use the following command:
docker ps
This will list all running containers. You should see your container listed along with its name and status.
Open a web browser and go to http://localhost:2022. You should see your application running.
To stop a running container, use the following command:
docker stop gridjs-demo-container
To remove a stopped container, use the following command:
docker rm gridjs-demo-container
To remove an image, use the following command:
docker rmi gridjs-demo-python
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.