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

Nom:
Prénom:
NB:
Nom: Asmar
Prénom: Estelle
NB: 6

## 1.3
command:
command: docker build .

## 1.4
answer:
command:
answer:L'adresse URL ne répond rien car les ports ne sont pas ouverts.
command: docker run -p 8080:8080 tp2

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

## 1.6
answer:
command:
answer:Mon image ne peut pas être poussée telle qu'elle est car elle nécessite un TAG.
command:
docker tag 1354c1ef075e ab12cd34/repository1:premiertest
docker push ab12cd34/repository1

## 1.7
answer:
command:
command:
command:
answer: Il faut ajouter ab12cd34/repository1
command:sudo docker rmi -f $(docker images -q)
command:docker run -p 8080:8080 -e ENVIRONMENT=dev ab12cd34/repository1:premiertest
command:docker run -p 8080:8080 -e ENVIRONMENT=dev -d ab12cd34/repository1:premiertest

## 1.8
answer:
command:
command:
answer: En mode détaché, nous pouvons vérifier que le container démarre bien lorsqu'on le relance une fois que nous ayons quitté le terminal.
command: docker ps
command: sudo docker rename stoic_sinoussi dockername
docker restart dockername

## 1.9
answer: L'OS utilisé dans le container 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 APP_PORT=8081 -e WS_BACK_URL=172.17.0.1 -d tp2front

http://localhost:8081/estelle

You called at : 2018-11-20 12:35:48.125434 (dynamic)
On environment : dev (from env variable)
With path : estelle (from URL path)
With front : 20250db07e86 (from real hostname of front service)
With back : 1f81551ed70d (from real hostname of back service)

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

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

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



10 changes: 10 additions & 0 deletions app/back/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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" ]
Empty file added app/back/logs/my_messages.log
Empty file.
25 changes: 25 additions & 0 deletions app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: '3'
services:
service-back:
image: 1354c1ef075e
environment:
- ENVIRONMENT=dev
#volumes:
#- logs
service-front:
image: 885e244446d5
ports:
- "8081:8081"
environment:
- APP_PORT=8081
- WS_BACK_URL=back
links:
- "service-back:back"
#volumes:
#logs:






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

WORKDIR /usr/src/app

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

COPY . .

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