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

Lastname:
Firstname:
Lastname: Nguyen
Firstname: Mickael

## 2.2
command:
command: docker run app

## 2.3
question:
command:
question: The call fails because ports are not opened

command: docker -i --expose:portNumber //with portNumber = port we open

## 2.5
question:
command:
question: The reason is that the "docker push" uses the tag to identify the repository where it is supposed to push the image

commands: docker login //giving my logs

docker tag appp myNameAccount/devops_lab //with myNameAccount our docker hub ID AND devops_lab the docker hub repository name

docker push myNameAccount/devops_lab

## 2.6
command:
command:docker system prune -a //delete all images created from the start of the lab on the computer

question:
Using --net=host permits the container to be able to reach localhost on the computer (the conainer having its own network by default)

question:
command:
command: docker run myNameAccount/devops_lab

command:
command: docker start -d --net=host dreamy_pare //name found in the column "NAMES" and associated to the container previously created

## 2.7
question:
question:
command:
question: just use the command "docker ps -a" to display all containers and check the column "STATUS"

command:
question: the name of the container is dreamy_pare

command: docker ps -a

command: docker start -d --name newName myNameAccount/devops_lab //with newName the name corresponding to its function

## 2.8
question:
output:
question: Going into interactive mode : docker run -it myNameAccount/devops_lab /bin/bash , then by using the command given in the lab -> cat /etc/*release, we have the following output (and we can see that the OS from the container is Debian) :

output: 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/"

## 3.1
command:
command: sudo docker-compose up

## 3.4
command:
command:
command: sudo docker-compose up -d

command: sudo docker-compose logs
Loading