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