ci/cd test
This commit is contained in:
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
# Builder
|
||||
FROM golang:alpine AS builder
|
||||
|
||||
WORKDIR /go/src/app
|
||||
|
||||
ARG MAIN_GO=cmd/main.go
|
||||
|
||||
COPY src ./
|
||||
|
||||
RUN go mod download && \
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /go/bin/app $MAIN_GO
|
||||
|
||||
# Destination image
|
||||
FROM gcr.io/distroless/base-debian10
|
||||
|
||||
LABEL author="Piotr Biernat"
|
||||
LABEL vendor="Egommerce"
|
||||
LABEL version="1.0"
|
||||
|
||||
COPY --from=builder /go/bin/app /app
|
||||
COPY .env.dist /.env
|
||||
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/app"]
|
||||
Reference in New Issue
Block a user