-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from abichinger/master
fix(Dockerfile): use default name for build stage
- Loading branch information
Showing
1 changed file
with
4 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
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 . | ||
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"] |