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
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM alpine:latest

WORKDIR /app

COPY index.js /app

RUN apk add nodejs-current nodejs-npm
RUN npm install express
RUN npm install mysql

EXPOSE 3000

CMD node index.js
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To get more help about fork, see the [official documentation](https://guides.git
Clone your newly forked project on your computer

### 1.3: Faire un commit
After the clone, you should have your copy of the project on your computer. Go into cloned folder and add your firstname and lastname to **answers.md** file.
After the clone, you should have your copy of the project on your computer. Go into cloned folder and add your firstname and lastname to it.

Commit and push your changes. You should see your change on Github graphical interface.

Expand Down
47 changes: 28 additions & 19 deletions answers.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,50 @@
# Answers

Lastname:
Firstname:
Lastname: COMAK
Firstname: MUSTAFA

## 2.2
command:
docker run testapp

## 2.3
question:
command:
question: the port is not opened, the container's ports aren't published.
command: docker run -p 3000:3000 app

## 2.5
question:
command:
question: For Docker the image has to be tagged accordingly for it to be uploaded correctly to the Docker Hub, so we have to name the tag of the image to match the repository
command: docker login --username=mustufu
docker tag app Mustufu/devops_lab:imagetest
docker push Mustufu/devops_lab:imagetest

## 2.6
command:
command: docker prune -a

question:
command:
question: We just deleted all local images on our computer, if we make a new container there would be no images to build from. But Docker can pull an image from our repository. We will give him the name with the command
command: docker run Mustufu/devops-lab:imagetest

command:
command: docker run --detach Mustufu/devops-lab:imagetest

## 2.7
question:
question:
command:
question: we will run the comman "sudo docker ps -a", we will get all the containers with ID, Names etc. We will then see if the container was started correctly by finding it's ID and check its status. The status is up.
question: my container's name is evil_curry
command: docker ps -a

command:
command: docker run --name devopslab --detach Mustufu/devops-lab:imagetest
WE COULD ALSO USE : command : docker rename evil_curry devopslab

## 2.8
question:
output:
question: Linux
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:
command: docker-compose up

## 3.4
command:
command:
command: docker-compose up -d
command: docker-compose logs
Loading