Rename part1
This commit is contained in:
parent
bcf1e3361f
commit
108f52dbd5
21 changed files with 0 additions and 0 deletions
1
Part1/Exercise_01/output.txt
Normal file
1
Part1/Exercise_01/output.txt
Normal file
|
@ -0,0 +1 @@
|
|||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
2
Part1/Exercise_02/containers.txt
Normal file
2
Part1/Exercise_02/containers.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
[devops@devops ~]$ docker ps -a
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
2
Part1/Exercise_02/images.txt
Normal file
2
Part1/Exercise_02/images.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
[devops@devops ~]$ docker images
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
16
Part1/Exercise_03/output.txt
Normal file
16
Part1/Exercise_03/output.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
[devops@devops part1]$ docker run -d -it devopsdockeruh/simple-web-service:ubuntu
|
||||
[devops@devops part1]$ docker exec -it gifted_boyd bash
|
||||
root@b9703c4c7c48:/usr/src/app# tail -f ./text.log
|
||||
Secret message is: 'You can find the source code here: https://github.com/docker-hy'
|
||||
2023-03-13 11:04:51 +0000 UTC
|
||||
2023-03-13 11:04:53 +0000 UTC
|
||||
2023-03-13 11:04:55 +0000 UTC
|
||||
2023-03-13 11:04:57 +0000 UTC
|
||||
2023-03-13 11:04:59 +0000 UTC
|
||||
Secret message is: 'You can find the source code here: https://github.com/docker-hy'
|
||||
2023-03-13 11:05:01 +0000 UTC
|
||||
2023-03-13 11:05:03 +0000 UTC
|
||||
2023-03-13 11:05:05 +0000 UTC
|
||||
2023-03-13 11:05:07 +0000 UTC
|
||||
2023-03-13 11:05:09 +0000 UTC
|
||||
root@b9703c4c7c48:/usr/src/app# exit
|
24
Part1/Exercise_04/commands.txt
Normal file
24
Part1/Exercise_04/commands.txt
Normal file
|
@ -0,0 +1,24 @@
|
|||
[devops@devops part1]$ docker run --name curl -it ubuntu sh -c 'while true; do echo "Input website:"; read website; echo "Searching.."; sleep 1; curl http://$website; done'
|
||||
Input website:
|
||||
helsinki.fi
|
||||
Searching..
|
||||
sh: 1: curl: not found
|
||||
|
||||
Open another terminal:
|
||||
[devops@devops part1]$ docker exec -it curl bash
|
||||
root@6774b835507a:/# apt install curl
|
||||
-> Failed due to missing package db
|
||||
root@6774b835507a:/# apt update
|
||||
root@6774b835507a:/# apt install curl
|
||||
root@6774b835507a:/# exit
|
||||
|
||||
Back in original terminal:
|
||||
Input website: helsinki.fi
|
||||
Searching..
|
||||
<html>
|
||||
<head><title>301 Moved Permanently</title></head>
|
||||
<body>
|
||||
<center><h1>301 Moved Permanently</h1></center>
|
||||
<hr><center>nginx/1.20.1</center>
|
||||
</body>
|
||||
</html>
|
10
Part1/Exercise_05/output.txt
Normal file
10
Part1/Exercise_05/output.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
Image sizes:
|
||||
Ubuntu - 83MB
|
||||
Alpine - 15.7MB
|
||||
|
||||
[devops@devops part1]$ docker run -d -it devopsdockeruh/simple-web-service:alpine
|
||||
[devops@devops part1]$ docker exec -it modest_curie sh
|
||||
/usr/src/app # tail -f text.log
|
||||
2023-03-13 11:54:03 +0000 UTC
|
||||
2023-03-13 11:54:05 +0000 UTC
|
||||
Secret message is: 'You can find the source code here: https://github.com/docker-hy'
|
4
Part1/Exercise_06/commands.txt
Normal file
4
Part1/Exercise_06/commands.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
[devops@devops part1]$ docker run -it devopsdockeruh/pull_exercise
|
||||
Give me the password: basics
|
||||
You found the correct password. Secret message is:
|
||||
"This is the secret message"
|
5
Part1/Exercise_07/Dockerfile
Normal file
5
Part1/Exercise_07/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM ubuntu:20.04
|
||||
WORKDIR /usr/src/app
|
||||
RUN apt update && apt install -y curl
|
||||
COPY web-server.sh .
|
||||
CMD ./web-server.sh
|
6
Part1/Exercise_07/web-server.sh
Executable file
6
Part1/Exercise_07/web-server.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
while true
|
||||
do
|
||||
echo "Input website:"
|
||||
read website; echo "Searching.."
|
||||
sleep 1; curl http://$website
|
||||
done
|
2
Part1/Exercise_08/Dockerfile
Normal file
2
Part1/Exercise_08/Dockerfile
Normal file
|
@ -0,0 +1,2 @@
|
|||
FROM devopsdockeruh/simple-web-service:alpine
|
||||
CMD server
|
6
Part1/Exercise_08/command.txt
Normal file
6
Part1/Exercise_08/command.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
[devops@devops part1]$ docker run --rm web-server
|
||||
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
|
||||
|
||||
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env: export GIN_MODE=release - using code: gin.SetMode(gin.ReleaseMode)
|
||||
[GIN-debug] GET /*path --> server.Start.func1 (3 handlers)
|
||||
[GIN-debug] Listening and serving HTTP on :8080
|
1
Part1/Exercise_09/command.txt
Normal file
1
Part1/Exercise_09/command.txt
Normal file
|
@ -0,0 +1 @@
|
|||
[devops@devops part1] touch text.log && docker run -v "$(pwd)/text.log:/usr/src/app/text.log" --rm devopsdockeruh/simple-web-service
|
8
Part1/Exercise_10/output.txt
Normal file
8
Part1/Exercise_10/output.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
Command used:
|
||||
|
||||
[devops@devops part1]$ docker run --rm -p 8080:8080 web-server
|
||||
|
||||
|
||||
I then connected to http://devops:8080/ with Firefox from another machine and received:
|
||||
|
||||
{"message":"You connected to the following path: /","path":"/"}
|
8
Part1/Exercise_11/Dockerfile
Normal file
8
Part1/Exercise_11/Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
|||
FROM openjdk:8-oracle
|
||||
|
||||
EXPOSE 8080
|
||||
WORKDIR /usr/src/app
|
||||
COPY pom.xml ./
|
||||
COPY . .
|
||||
RUN ./mvnw package
|
||||
CMD ["java", "-jar", "./target/docker-example-1.1.3.jar"]
|
8
Part1/Exercise_12/Dockerfile
Normal file
8
Part1/Exercise_12/Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
|||
FROM node:16.19
|
||||
EXPOSE 5000
|
||||
WORKDIR /usr/src/app
|
||||
COPY package*.json ./
|
||||
COPY . .
|
||||
RUN npm install && npm run build
|
||||
RUN npm install -g serve
|
||||
CMD ["serve", "-s", "-l", "5000", "build"]
|
6
Part1/Exercise_13/Dockerfile
Normal file
6
Part1/Exercise_13/Dockerfile
Normal file
|
@ -0,0 +1,6 @@
|
|||
FROM golang:1.16
|
||||
EXPOSE 8080
|
||||
WORKDIR /usr/src/app
|
||||
COPY . .
|
||||
RUN go build
|
||||
CMD ["./server"]
|
1
Part1/Exercise_13/command.txt
Normal file
1
Part1/Exercise_13/command.txt
Normal file
|
@ -0,0 +1 @@
|
|||
docker run --rm -it -p 8080:8080 example-backend:1.13
|
7
Part1/Exercise_14/Dockerfile_back
Normal file
7
Part1/Exercise_14/Dockerfile_back
Normal file
|
@ -0,0 +1,7 @@
|
|||
FROM golang:1.16
|
||||
EXPOSE 8080
|
||||
WORKDIR /usr/src/app
|
||||
COPY . .
|
||||
ENV REQUEST_ORIGIN=http://devops:5000
|
||||
RUN go build
|
||||
CMD ["./server"]
|
9
Part1/Exercise_14/Dockerfile_front
Normal file
9
Part1/Exercise_14/Dockerfile_front
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM node:16.19
|
||||
EXPOSE 5000
|
||||
WORKDIR /usr/src/app
|
||||
COPY package*.json ./
|
||||
COPY . .
|
||||
ENV REACT_APP_BACKEND_URL=http://devops:8080
|
||||
RUN npm install && npm run build
|
||||
RUN npm install -g serve
|
||||
CMD ["serve", "-s", "-l", "5000", "build"]
|
2
Part1/Exercise_14/commands.txt
Normal file
2
Part1/Exercise_14/commands.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
docker run --rm -it -p 5000:5000 example-frontend:1.14
|
||||
docker run --rm -it -p 8080:8080 example-backend:1.14
|
5
Part1/Exercise_15/submission.txt
Normal file
5
Part1/Exercise_15/submission.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
GitHub repository with README etc.:
|
||||
https://github.com/ArcticCoder/dockerhub-demo
|
||||
|
||||
Dockerhub page:
|
||||
https://hub.docker.com/r/arcticcoder/dockerhub-demo
|
Reference in a new issue