1
0
Fork 0
This commit is contained in:
Vili Sinervä 2023-03-17 12:43:43 +02:00
parent 1a5357e1df
commit e98d78b444
16 changed files with 109 additions and 8 deletions

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

View file

@ -0,0 +1,5 @@
Before:
Back - 447MB
After:
Back - 18MB