FROM python:3-slim # set a directory for the app RUN groupadd app && useradd -m -g app app # install dependencies WORKDIR /srv RUN pip3 install setuptools gunicorn COPY carga-gtfs/requirements.txt /srv/daemon/requirements.txt RUN pip3 install --no-cache-dir -r daemon/requirements.txt # copy all the files to the container COPY daemon.py /srv COPY carga-gtfs /srv/daemon RUN chown -R app:app /srv USER app # define the port number the container should expose EXPOSE 8000 # run the command CMD ["python3", "daemon.py"]