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
51 changes: 31 additions & 20 deletions answers.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
# Answers

Nom:
Prénom:
NB:
Nom: TRBOVIC
Prénom: Alexandre
NB: 7

## 1.3
command:
command: docker run 092db6b799e9
(docker build .
avec un cd tp2/app/back)

## 1.4
answer:
command:
answer: Probleme de variable d'environnement
command: docker run -it --rm --name my-running-app -p 8080:8080 my-python-app

## 1.5
command:
command: docker run -it -e ENVIRONMENT='dev' --rm --name my-running-app -p 8080:8080 my-python-app

## 1.6
answer:
command:
answer: il fallait rajouter le tag
command: docker push alexandretrb/my-python-app

## 1.7
answer:
command:
command:
command:
answer: docker rmi -f 48c172c969dc
command: docker run -p 8080:8080 -e ENVIRONMENT=dev alexandretrb/back
command: docker run -p 8080:8080 -e ENVIRONMENT=dev -d alexandretrb/back (pour lancer en mode détaché le container)

## 1.8
answer:
command:
command:
answer: docker ps
command: nom du container : adoring_bartik
command: docker rename adoring_bartik nomquiadusens

## 1.9
answer:
answer:
answer: docker exec -it 9e9263e66d0e bash
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 -e APP_PORT=8081 -e WS_BACK_URL=172.17.0.1 -p 8081:8081 alexandretrb/front
answer: http://0.0.0.0:8081/aaa ==>> With path : aaa (from URL path)
http://0.0.0.0:8081/write/testwritelog

## 2.1
command:
Expand Down
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.7.1-stretch

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/front/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.7.1-stretch

WORKDIR /usr/src/app/front

COPY requirements.txt ./

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

COPY . .

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