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
88 changes: 88 additions & 0 deletions Henri Francois.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Answers

Lastname: FRANCOIS
Firstname: HENRI

## 2.2
command:

docker build . -t hey
docker run hey

## 2.3
question:

It is not possible through postman to access the container, indeed the port isn't opened.

command:

docker run -p 3000:3000 -td hey

## 2.5
question:

In order to push an image to our dockhub repo, we have to login and then tag the image.

command:

docker login <username>
docker tag indexfinal.js Henri000/devops_lab

## 2.6
command:

docker system prune -a

question:

Before container start, we pull the image.

command:

docker create Henri000/devops_lab

command:

docker run --detach Henri000/devops_lab

## 2.7
question:

We can see the container's names, ids, when they were created and their status.
question:
command:

docker ps

command:

docker rename jovial_yalow application
docker run --detach Henri000/devops-lab:test1

## 2.8
question:

we want to to find the info about the current OS running our DOcker container

output:

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.8.1
PRETTY_NAME="Alpine Linux v3.8"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"

## 3.1
command:

docker-compose up

## 3.4
command:

docker-compose up -d

command:

docker-compose logs
41 changes: 0 additions & 41 deletions answers.md

This file was deleted.

7 changes: 7 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node
WORKDIR /app
COPY indexfinal.js /app
RUN npm install mysql
RUN npm install express
EXPOSE 3000
CMD node indexfinal.js
Loading