Part3
This commit is contained in:
parent
1a5357e1df
commit
e98d78b444
16 changed files with 109 additions and 8 deletions
12
Part3/Exercise09/Dockerfile
Normal file
12
Part3/Exercise09/Dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
FROM golang:1.16.15-alpine3.15 as build-stage
|
||||
WORKDIR /usr/src/app
|
||||
COPY . .
|
||||
RUN adduser -D appuser && CGO_ENABLED=0 go build
|
||||
|
||||
FROM scratch
|
||||
EXPOSE 8080
|
||||
ENV REQUEST_ORIGIN=http://devops:5000
|
||||
COPY --from=build-stage /usr/src/app/server /
|
||||
COPY --from=build-stage /etc/passwd /etc/passwd
|
||||
USER appuser
|
||||
CMD ["/server"]
|
5
Part3/Exercise09/sizes.txt
Normal file
5
Part3/Exercise09/sizes.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
Before:
|
||||
Back - 447MB
|
||||
|
||||
After:
|
||||
Back - 18MB
|
Reference in a new issue