paulo@108: # Use the official lightweight Python image. paulo@108: # https://hub.docker.com/_/python paulo@108: FROM python:3.6-slim paulo@108: paulo@108: # Copy local code to the container image. paulo@108: ENV APP_HOME /app paulo@108: WORKDIR $APP_HOME paulo@108: COPY . ./ paulo@108: paulo@108: # Install production dependencies. paulo@108: RUN pip install -r requirements.pip paulo@108: paulo@108: # Run the web service on container startup. Here we use the gunicorn paulo@108: # webserver, with one worker process and 8 threads. paulo@108: # For environments with multiple CPU cores, increase the number of workers paulo@108: # to be equal to the cores available. paulo@108: CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 myrss_flask:flask_app