-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix : timeout issue for argocd and vault for public clouds (#363)
* fix : timeout issue for argocd and vault * Update Dockerfile * Update argocd.go
- Loading branch information
Showing
2 changed files
with
52 additions
and
17 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,37 +1,41 @@ | ||
FROM golang:alpine AS builder | ||
|
||
ENV GO111MODULE=on \ | ||
CGO_ENABLED=0 \ | ||
GOOS=linux \ | ||
GOARCH=amd64 | ||
CGO_ENABLED=0 \ | ||
GOOS=linux \ | ||
GOARCH=amd64 | ||
|
||
WORKDIR /build | ||
|
||
# Download go dependencies | ||
COPY go.mod . | ||
COPY go.sum . | ||
|
||
RUN go mod download | ||
|
||
# Copy into the container | ||
COPY . . | ||
|
||
# Build the application | ||
RUN go build -o kubefirst-api . | ||
|
||
# Build final image using nothing but the binary | ||
FROM alpine:3.18.2 | ||
|
||
COPY --from=builder /build/kubefirst-api / | ||
COPY --from=builder /build/docs /docs | ||
|
||
RUN apk update && \ | ||
apk add git openssh aws-cli | ||
apk add --no-cache \ | ||
git \ | ||
openssh \ | ||
aws-cli \ | ||
curl | ||
|
||
RUN mkdir -p /root/.ssh | ||
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts | ||
RUN ssh-keyscan gitlab.com >> /root/.ssh/known_hosts | ||
RUN mkdir -p /root/.ssh \ | ||
&& ssh-keyscan github.com >> /root/.ssh/known_hosts \ | ||
&& ssh-keyscan gitlab.com >> /root/.ssh/known_hosts | ||
|
||
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl \ | ||
&& chmod +x ./kubectl \ | ||
&& mv ./kubectl /usr/local/bin/kubectl | ||
|
||
COPY --from=builder /build/kubefirst-api / | ||
COPY --from=builder /build/docs /docs | ||
|
||
EXPOSE 8081 | ||
|
||
# Command to run | ||
ENTRYPOINT ["/kubefirst-api"] |
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