From 162b342023297a2d838fee1418532d272dfc2344 Mon Sep 17 00:00:00 2001 From: Nestura Date: Thu, 8 Nov 2018 12:37:36 +0100 Subject: [PATCH 1/2] Name --- answers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/answers.md b/answers.md index 25c43e4..685ccb9 100644 --- a/answers.md +++ b/answers.md @@ -1,8 +1,8 @@ # Answers -Nom: -Prénom: -NB: +Nom: SEWERYN +Prénom: Antoine +NB: 7 ## 1.3 command: From 49eaf40e747ac6c573a7b050d977e52247bbb159 Mon Sep 17 00:00:00 2001 From: Nestura Date: Thu, 8 Nov 2018 14:32:51 +0100 Subject: [PATCH 2/2] Dockerfile --- answers.md | 7 ++++--- app/back/Dockerfile | 11 +++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 app/back/Dockerfile diff --git a/answers.md b/answers.md index 685ccb9..28f8410 100644 --- a/answers.md +++ b/answers.md @@ -6,13 +6,14 @@ NB: 7 ## 1.3 command: - +docker build -t my-python-app . +docker run -it --rm --name my-running-app my-python-app ## 1.4 answer: -command: +command: docker run -it -e ENVIRONMENT='dev' --rm --name my-running-app -p 8080:8080 my-python-app ## 1.5 -command: +command: command: docker run -it -e ENVIRONMENT='dev' --rm --name my-running-app -p 8080:8080 my-python-app ## 1.6 answer: diff --git a/app/back/Dockerfile b/app/back/Dockerfile new file mode 100644 index 0000000..41e70e9 --- /dev/null +++ b/app/back/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.7.1-stretch +WORKDIR /usr/MS_TP2/tp2/app/back + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +CMD [ "python", "-u", "./webservice.py" ] + +