feat: introduce Docker setup for image creation and upload

- Added Dockerfile to facilitate the creation of a Docker image for the application.
- Included .dockerignore to specify files and directories to exclude during the Docker image build.
- Configured the Dockerfile to upload the created image to Docker Hub for easier distribution and accessibility.
This commit is contained in:
Rajtilak Bhattacharjee 2023-11-14 20:38:39 +05:30
parent 2b5a53e4d5
commit 8bbc10ce6d
2 changed files with 29 additions and 0 deletions

11
.dockerignore Normal file
View File

@ -0,0 +1,11 @@
__pycache__
*.pyc
*.pyo
*.pyd
node_modules
*.log
*.db
*.sqlite
.venv/
.site/
.github/

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/streamlit/streamlit-example.git .
RUN pip3 install -r requirements.txt
EXPOSE 8501
ENTRYPOINT ["streamlit", "run", "src/main.py", "--server.port=8501", "--server.address=0.0.0.0"]