Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 39 additions & 22 deletions answers.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,64 @@
# Answers

Nom:
Prénom:
NB:
Nom: GAIDIER
Prénom: Clément
NB: 4

## 1.3
command:
command: docker build -t tp2back ./
docker run tp2back

## 1.4
answer:
command:
answer: Les ports TCP ne sont pas ouverts
command: docker run -p 8080:8080 tp2back

## 1.5
command:
command: docker run -p 8080:8080 -e ENVIRONMENT=dev tp2back

## 1.6
answer:
command:
answer: L'image n'a pas de tag donc il faut associer un tag à l'image
command: docker tag tp2back clementgaidier/tp2back
docker push clementgaidier/tp2back

## 1.7
answer:
command:
command:
command:
answer:
command: docker rmi -f $(docker images -a -q)
command: docker run -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2back
command: docker run -d -p 8080:8080 -e ENVIRONMENT=dev clementgaidier/tp2back

## 1.8
answer:
command:
command:
answer: nom de mon container est mystifying_cohen
command: docker ps
command: docker rename 26f620eee85b tp2back

## 1.9
answer:
answer:
answer: Debian 9 (stretch)
answer: PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


## 1.11
command:
answer:
command: docker run -d -p 8081:8081 -e APP_PORT=8081 -e WS_BACK_URL=172.17.0.1 clementgaidier/tp2front
answer: You called at : 2018-11-13 14:32:08.315980 (dynamic)
On environment : dev (from env variable)
With path : write (from URL path)
With front : 8f0ff760d00d (from real hostname of front service)
With back : 59e6de57fb02 (from real hostname of back service)

## 2.1
command:
command: docker-compose up

## 2.6
command:
command: docker-compose up -d
command: docker-compose logs

## 2.9
command:


12 changes: 12 additions & 0 deletions app/back/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.7.1-stretch

WORKDIR /app/back

COPY requirements.txt ./
RUN pip install -r requirements.txt

COPY . .

CMD ["python", "-u", "./webservice.py" ]

VOLUME /app/log
18 changes: 18 additions & 0 deletions app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'
services:
tp2back:
image: 9e4ba5d15d97
ports:
- "8080:8080"
environment:
- ENVIRONMENT=dev
tp2front:
image: 80646dee17d5
ports:
- "8081:8081"
environment:
- APP_PORT=8081
- WS_BACK_URL=172.17.0.1
volumes:
data:
external: true
12 changes: 12 additions & 0 deletions app/front/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.7.1-stretch

WORKDIR /app/front

COPY requirements.txt ./
RUN pip install -r requirements.txt

COPY . .

CMD ["python", "-u", "./front.py" ]

VOLUME /app/log