Skip to content
Open

name #11

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
54 changes: 33 additions & 21 deletions answers.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,58 @@
# Answers

Nom:
Prénom:
NB:
Nom: Vuong
Prénom: Lisa
NB: 3

## 1.3
command:
docker build -t img .
docker run img

## 1.4
answer:
command:
answer: car les ports ne sont pas ouverts
command: docker run -p 8080:8080 img

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

## 1.6
answer:
command:

answer: car le nom de l'image n'est pas bon
command: docker tag img lisav/img:0.1 --> docker push lisav/img:0.1
## 1.7
answer:
command:
command:
command:
command: sudo docker rmi -f $(docker images -q)
answer: l'image est "pull" du repository docker lisav/img comme il ne le trouve pas localement
command: docker run -e ENVIRONMENT=dev -p 8080:8080 lisav/img
command: docker run -d -e ENVIRONMENT=dev -p 8080:8080 lisav/img

## 1.8
answer:
command:
command:
answer: name = ecstatic_mcnulty and container id = d4fb6f40aa9a.
command: docker ps OU docker container ls
command: docker rename ecstatic_mcnulty realcontainersname

## 1.9
answer: L'OS utilisé est Debian GNU/Linux 9.
answer:
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:
command: docker run -p 8081:8081 -e WS_BACK_URL=172.17.0.1 -e APP_PORT=8081 front
answer:pour le back, ce qui change est : "result": "path_test"
pour le front, ce qui change est : With path : path_test (from URL path)

## 2.1
command:
command: docker-compose up

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


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

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

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

Empty file added app/back/docker
Empty file.
15 changes: 15 additions & 0 deletions app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'
services:
back:
image: a99d471b3ab1
ports:
- "8080:8080"
environment:
- ENVIRONMENT=dev
front:
image: a38dcb68fd6e
ports:
- "8081:8081"
environment:
- APP_PORT=8081
- WS_BACK_URL=172.17.0.1
10 changes: 10 additions & 0 deletions app/front/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:3.7.1-stretch

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

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

VOLUME app/logs
Empty file added app/front/docker
Empty file.