1
0
Fork 0

Re-organize submissions

This commit is contained in:
Vili Sinervä 2023-03-15 13:23:44 +02:00
parent 1bbc819280
commit bcf1e3361f
23 changed files with 31 additions and 44 deletions

View file

@ -0,0 +1,2 @@
[devops@devops ~]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

View file

@ -0,0 +1,2 @@
[devops@devops ~]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE

View file

@ -1,5 +1,3 @@
Dockerfile contents:
FROM ubuntu:20.04
WORKDIR /usr/src/app
RUN apt update && apt install -y curl

View file

@ -0,0 +1,6 @@
while true
do
echo "Input website:"
read website; echo "Searching.."
sleep 1; curl http://$website
done

View file

@ -0,0 +1,2 @@
FROM devopsdockeruh/simple-web-service:alpine
CMD server

View file

@ -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.

View file

@ -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

View file

@ -0,0 +1 @@
docker run --rm -it -p 8080:8080 example-backend:1.13

View 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"]

View 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"]

View 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

View file

@ -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"]

View file

@ -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"]