Re-organize submissions
This commit is contained in:
parent
1bbc819280
commit
bcf1e3361f
23 changed files with 31 additions and 44 deletions
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
|
|
@ -1,5 +1,3 @@
|
|||
Dockerfile contents:
|
||||
|
||||
FROM ubuntu:20.04
|
||||
WORKDIR /usr/src/app
|
||||
RUN apt update && apt install -y curl
|
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
|
|
@ -1,10 +1,3 @@
|
|||
Dockerfile contentents:
|
||||
|
||||
FROM devopsdockeruh/simple-web-service:alpine
|
||||
CMD server
|
||||
|
||||
|
||||
Command and output:
|
||||
[devops@devops part1]$ docker run --rm web-server
|
||||
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
|
||||
|
|
@ -1,3 +1 @@
|
|||
Command used:
|
||||
|
||||
[devops@devops part1] touch text.log && docker run -v "$(pwd)/text.log:/usr/src/app/text.log" --rm devopsdockeruh/simple-web-service
|
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
|
|
@ -1,24 +0,0 @@
|
|||
Commands used:
|
||||
docker run --rm -it -p 5000:5000 example-frontend:1.14
|
||||
docker run --rm -it -p 8080:8080 example-backend:1.14
|
||||
|
||||
Dockerfile for frontend:
|
||||
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"]
|
||||
|
||||
|
||||
Dockerfile for backend:
|
||||
FROM golang:1.16
|
||||
EXPOSE 8080
|
||||
WORKDIR /usr/src/app
|
||||
COPY . .
|
||||
ENV REQUEST_ORIGIN=http://devops:5000
|
||||
RUN go build
|
||||
CMD ["./server"]
|
|
@ -1,9 +0,0 @@
|
|||
Script started on 2023-03-13 12:37:49+02:00 [TERM="rxvt-unicode-256color" TTY="/dev/pts/1" COLUMNS="212" LINES="69"]
|
||||
[devops@devops ~]$ docker ps -a
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
[devops@devops ~]$ docker images
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
[devops@devops ~]$ exit
|
||||
exit
|
||||
|
||||
Script done on 2023-03-13 12:38:14+02:00 [COMMAND_EXIT_CODE="130"]
|
Reference in a new issue