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
58 changes: 35 additions & 23 deletions answers.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,59 @@
# Answers

Nom:
Prénom:
NB:
Nom: Grimault
Prénom: Théophile
NB: 6

## 1.3
command:
command: sudo docker build .

## 1.4
answer:
command:
answer: les ports sont fermés
command: sudo docker run -p 8080:8080 tp2

## 1.5
command:
command: sudo docker run -e ENVIRONMENT=dev tp2

## 1.6
answer:
command:
answer: elle ne peut pas être push car il lui faut un tag
command: sudo docker tag b56321cc8ffc kingsun21/tp2

## 1.7
answer:
command:
command:
command:
answer: il faut mettre sudo docker run kingsun21/tp2 au lieu de juste tp2, car
le dépôt n'existe plus localement, mais seulement sur le hub
command: sudo docker rmi -f $(docker images -q)
command: sudo docker run -p 8080:8080 -e ENVIRONMENT=dev kingsun21/tp2
command: sudo docker run -p 8080:8080 -e ENVIRONMENT=dev -d kingsun21/tp2

## 1.8
answer:
command:
command:
answer: le container démarre après avoir été relancé, une fois le terminal
relancé également
command: sudo docker ds
command: sudo docker rename musing_volhard dockername
sudo docker restart dockername

## 1.9
answer:
answer:
answer: l'OS du container est Debian
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: sudo docker run -p 8081:8081 -e APP_PORT=8081 -e WS_BACK_URL=172.17.0.1 -d fronttp2
answer: http://localhost:8081/theophile (With path : theophile)

## 2.1
command:
command: sudo docker-compose run -p 8080:8080 -e ENVIRONMENT=dev service-back

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

## 2.9
command: sudo docker-compose up -d --scale backtp2=2

59 changes: 59 additions & 0 deletions answers.md~
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Answers

Nom: Grimault
Prénom: Théophile
NB: 6

## 1.3
command: sudo docker build .

## 1.4
answer: les ports sont fermés
command: sudo docker run -p 8080:8080 tp2

## 1.5
command: sudo docker run -e ENVIRONMENT=dev tp2

## 1.6
answer: elle ne peut pas être push car il lui faut un tag
command: sudo docker tag b56321cc8ffc kingsun21/tp2

## 1.7
answer: il faut mettre sudo docker run kingsun21/tp2 au lieu de juste tp2, car
le dépôt n'existe plus localement, mais seulement sur le hub
command: sudo docker rmi -f $(docker images -q)
command: sudo docker run -p 8080:8080 -e ENVIRONMENT=dev kingsun21/tp2
command: sudo docker run -p 8080:8080 -e ENVIRONMENT=dev -d kingsun21/tp2

## 1.8
answer: le container démarre après avoir été relancé, une fois le terminal
relancé également
command: sudo docker ds
command: sudo docker rename musing_volhard dockername
sudo docker restart dockername

## 1.9
answer: l'OS du container est Debian
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: sudo docker run -p 8081:8081 -e APP_PORT=8081 -e WS_BACK_URL=172.17.0.1 -d tp2front
answer: http://localhost:8081/theophile (With path : theophile)

## 2.1
command: sudo docker-compose run -p 8080:8080 -e ENVIRONMENT=dev service-back

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

## 2.9
command: sudo docker-compose up -d --scale backtp2=2

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

WORKDIR /usr/src/app/back

COPY requirements.txt ./

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

COPY . .

RUN mkdir logs

CMD ["python", "-u", "./webservice.py"]
11 changes: 11 additions & 0 deletions app/back/Dockerfile~
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3

WORKDIR /usr/src/app

COPY requirements.txt ./

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

COPY . .

CMD ["python", "-u", "./webservice.py"]
2 changes: 2 additions & 0 deletions app/back/nohup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker: 'daemon' is not a docker command.
See 'docker --help'
17 changes: 17 additions & 0 deletions app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3'
services:
backtp2:
image: kingsun21/front
environment:
- ENVIRONMENT=dev
#volumes:
#- logs
fronttp2:
image: kingsun21/back
ports:
- "8081:8081"
environment:
- APP_PORT=8081
- WS_BACK_URL=back
links:
- "backtp2:back"
Empty file added app/docker-compose.yml~
Empty file.