From 48ccb85d797cd76ab895a6b7be8689f04ba0ac25 Mon Sep 17 00:00:00 2001 From: Andreas Bichinger Date: Tue, 14 Dec 2021 14:03:14 +0100 Subject: [PATCH] fix(Dockerfile): use default name for build stage Signed-off-by: Andreas Bichinger --- Dockerfile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index fdea1d9..6e1fdc8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ -FROM golang:1.15-alpine AS build-env +FROM golang:1.15-alpine RUN apk update && apk upgrade && \ apk add --no-cache git -WORKDIR / +RUN mkdir ~/k8s-authz +WORKDIR ~/k8s-authz COPY go.mod . COPY go.sum . @@ -11,11 +12,7 @@ RUN go mod download COPY . . -RUN go build -o ./out/authz +RUN go build -o ./authz -COPY --from=build /out/authz /authz - -WORKDIR "/authz" EXPOSE 443 - CMD ["./authz"] \ No newline at end of file