-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup Dockerfile & update volume mount paths
- Loading branch information
Arnaud Tincelin
committed
Jun 11, 2021
1 parent
147b24b
commit 5670798
Showing
7 changed files
with
56 additions
and
27 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/docs | ||
/tests | ||
/builder | ||
/deployment | ||
*.md |
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,17 +1,33 @@ | ||
FROM golang AS builder | ||
RUN mkdir /app | ||
ADD . /app | ||
WORKDIR /app | ||
RUN CGO_ENABLED=0 GOOS=linux go build github.com/Azure/aks-periscope/cmd/aks-periscope | ||
# Builder | ||
FROM golang:alpine AS builder | ||
|
||
ENV GO111MODULE=on \ | ||
CGO_ENABLED=0 \ | ||
GOOS=linux \ | ||
GOARCH=amd64 | ||
|
||
WORKDIR /build | ||
|
||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
RUN go build ./cmd/aks-periscope | ||
|
||
# Runner | ||
FROM alpine | ||
|
||
RUN apk --no-cache add ca-certificates curl openssl bash | ||
|
||
ADD https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl /usr/local/bin/kubectl | ||
RUN chmod +x /usr/local/bin/kubectl | ||
|
||
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \ | ||
&& chmod +x get_helm.sh \ | ||
&& ./get_helm.sh | ||
RUN mkdir /app | ||
WORKDIR /app | ||
COPY --from=builder /app/aks-periscope . | ||
CMD ["./aks-periscope"] | ||
|
||
COPY --from=builder /build/aks-periscope / | ||
|
||
ENTRYPOINT ["/aks-periscope"] |
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
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
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
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
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