diff --git a/Dockerfile b/Dockerfile index fbe76a4..df3f130 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]