Skip to content

Commit

Permalink
updated Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
xerexcoded committed Apr 21, 2024
1 parent bcc4dd6 commit 2bb4dc7
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# Use an official Python runtime as a parent image
FROM python:3.12-slim

# Install necessary build tools
RUN apt-get update && apt-get install -y --fix-missing \
# Set the working directory in the container
WORKDIR /app

# Install necessary build tools and dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
libffi-dev \
libssl-dev
libssl-dev \
&& rm -rf /var/lib/apt/lists/*

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy the current directory contents into the container at /usr/src/app
# Copy the current directory contents into the container at /app
COPY . .

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Make port 8501 available to the world outside this container
# Expose port 8501 to the world outside this container
EXPOSE 8501

# Run app.py when the container launches
CMD ["streamlit", "run", "main.py", "--server.port=8501", "--server.address=0.0.0.0"]
# Add a healthcheck
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

# Run the Streamlit app
ENTRYPOINT ["streamlit", "run", "main.py", "--server.port=8501", "--server.address=0.0.0.0"]

0 comments on commit 2bb4dc7

Please sign in to comment.