Removed unused stuff from dockerfile
This commit is contained in:
parent
0a2ef56854
commit
4e19398db3
@ -1,8 +1,6 @@
|
||||
# === BUILD STAGE === #
|
||||
FROM golang:1.20-alpine3.16 as build
|
||||
|
||||
RUN apk add --no-cache git
|
||||
|
||||
WORKDIR /srv/app
|
||||
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
|
||||
|
||||
@ -10,8 +8,7 @@ COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go test -v ./...
|
||||
RUN go build -ldflags="-w -s" -o build
|
||||
RUN go test -v ./... && go build -ldflags="-w -s" -o build
|
||||
|
||||
# === RUN STAGE === #
|
||||
FROM registry.odit.services/hub/library/alpine:3.16 as run
|
||||
@ -25,7 +22,6 @@ RUN apk update \
|
||||
WORKDIR /srv/app
|
||||
COPY --from=build /srv/app/build /srv/app/build
|
||||
|
||||
ENV LISTEN_ADDRESS 0.0.0.0:8080
|
||||
ENV GIN_MODE release
|
||||
ENV LISTEN_ADDRESS=0.0.0.0:8080 GIN_MODE=release
|
||||
|
||||
CMD ["/srv/app/build"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user