manjun03/crypto2
0
1# Use Python 3.10.12 as the base image2FROM python:3.9.133 4# Set the working directory to /code5WORKDIR /code6 7# Copy the requirements file into the container at /code/requirements.txt8COPY ./requirements.txt /code/requirements.txt9 10# Upgrade pip and install the dependencies11RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt12 13# Create a non-root user with UID 100014RUN useradd -m -u 1000 user15 16# Switch to the non-root user17USER user18 19# Set environment variables for the user20ENV HOME=/home/user \21 PATH=/home/user/.local/bin:$PATH22 23# Set the working directory for the application24WORKDIR $HOME/app25 26# Copy the local code into the container at /home/user/app27COPY --chown=user . $HOME/app28 29# Specify the command to run on container start30CMD ["streamlit", "run", "app.py","--server.port","7860"]31 