stock_information_app / Dockerfile
Sarat Chandra
"Multi Threaded Approach"
aec0f90
raw
history blame
684 Bytes
# Use a Python base image
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /code
# Copy the required files to the working directory
COPY app_socket_multi_threaded.py .
COPY ./templates/index_socket.html /code/templates/index_socket.html
COPY ./requirements.txt /code/requirements.txt
# Install the required packages
RUN pip install --no-cache-dir -r /code/requirements.txt
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
# Expose the port that the Flask app will run on
EXPOSE 7860
# Start the Flask app
CMD ["python", "app_socket_multi_threaded.py"]