From 705158260b3cb67067a7a00aa5927ddff5ce6082 Mon Sep 17 00:00:00 2001 From: Amine GHOZLANE <amine.ghozlane@pasteur.fr> Date: Thu, 13 Jun 2019 20:28:25 +0200 Subject: [PATCH] Add new file --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0b5d5cb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# https://docs.docker.com/engine/reference/builder/ +# FROM refer the image where we start from +# Here we will use a basic python 3 debian image + +FROM python:3 + +# Use the RUN command to pass command to be run +# Here we update the image and add python3 virtualenv + +RUN apt-get update && apt-get upgrade -y && apt-get install \ + -y --no-install-recommends python3 + +# Install pip dependencies +ADD requirements.txt /app/requirements.txt +RUN pip install --default-timeout=100 --upgrade pip && pip install -r /app/requirements.txt + +# We add the current content of the git repo in the /app directory +ADD . /app +WORKDIR /app +RUN rm -rf .gitlab-ci.yml Dockerfile README.md img solution +# We use the CMD command to start the gunicorn daemon +# when we start the container. +# Note the $PORT variable, we will need to define it when we start the container +CMD python manage.py runserver 0.0.0.0:$PORT \ No newline at end of file -- GitLab