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 front-static/requirements.txt /srv/webinterface/requirements.txt RUN pip3 install --no-cache-dir -r webinterface/requirements.txt # copy all the files to the container COPY app.py /srv COPY front-static /srv/webinterface COPY static /srv/webinterface/static COPY templates/layout.html templates/home.html templates/objetivos.html /srv/webinterface/templates RUN chown -R app:app /srv USER app # define the port number the container should expose EXPOSE 8000 # run the command ENTRYPOINT ["gunicorn"] CMD ["-b", "0.0.0.0:8000", "app:iapp"]