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 project.js /app

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

EXPOSE 3000

CMD node project.js
48 changes: 27 additions & 21 deletions answers.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,47 @@
# Answers

Lastname:
Firstname:
Lastname: Paban
Firstname: Louis

## 2.2
command:
command: sudo docker run app

## 2.3
question:
command:
question: Ports are not opened so no access
command: sudo docker run -p 3000:3000 -td app

## 2.5
question:
command:
question: change name in order to identify the repository
command: sudo docker tag 38650435o169 louispaban/devops_lab
sudo docker push louispaban/devops_lab

## 2.6
command:

command: docker system prune -a
question:
command:

command:
command: docker pull louispaban/devops-lab
command: docker create louispaban/devops-lab
docker run louispaban/devops-lab

## 2.7
question:
question:
command:
question:
question: The name of the container is serene_wescoff.
command: sudo docker ps -a

command:
command: sudo docker rename serene_wescoff cont_app

## 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: command: sudo docker-compose up

## 3.4
command:
command:
command: command: docker-compose up -d
command: command: docker-compose logs
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'
services:
webService:
ports:
- "3000:3000"
environment:
- MYSQL_HOST=host.docker.internal
- MYSQL_DATABSE=project
- MYSQL_PORT=8889
- MYSQL_USER=root
- MYSQL_PASSWORD=root
image: louispaban/devops-lab:cont_app
Loading