IP_SuperMartWeb / Dockerfile
Mahendra87's picture
Update Dockerfile
d56c92e verified
raw
history blame contribute delete
691 Bytes
# Use the official Python base image
FROM python:3.10
# Set working directory
WORKDIR /app
# Copy all files into the container
COPY . .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Create writable .streamlit directory with config
RUN mkdir -p /app/.streamlit && \
echo "[server]\nheadless = true\nport = 7860\nenableCORS = false\n" > /app/.streamlit/config.toml
# Set environment variables to force Streamlit to use /app/.streamlit
ENV STREAMLIT_HOME="/app/.streamlit"
ENV XDG_CONFIG_HOME="/app"
# Expose the port Streamlit will run on
EXPOSE 7860
# Run Streamlit
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false"]