FROM python:3-slim RUN apt-get update \ && apt-get -y install libpq-dev gcc \ && pip install psycopg2 # install dependencies COPY updater/requeriments.txt /srv RUN pip3 install --no-cache-dir -r /srv/requeriments.txt # copy all the files to the container COPY updater /srv/updater COPY static /srv/static COPY utils /srv/utils COPY sync.py /srv WORKDIR /srv RUN useradd -m updater RUN chown -R updater:updater /srv USER updater # run the command ENTRYPOINT ["python"] CMD ["sync.py"]