-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile-alpine
23 lines (16 loc) · 714 Bytes
/
Dockerfile-alpine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ARG GO_VERSION=1.20.7-alpine
ARG TERRAFORM_VERSION=1.5.4
ARG ALPINE_VERSION=3.18.3
FROM golang:${GO_VERSION} as builder
RUN apk add --no-cache make git bash
WORKDIR /workspace/cluster-dev
COPY . /workspace/cluster-dev
RUN make linux_amd64
FROM hashicorp/terraform:${TERRAFORM_VERSION} as terraform
FROM alpine:${ALPINE_VERSION}
RUN apk add --no-cache git bash curl jq \
&& curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& chmod +x ./kubectl && mv ./kubectl /usr/local/bin/kubectl
COPY --from=terraform /bin/terraform /bin/terraform
COPY --from=builder /workspace/cluster-dev/bin/linux-amd64/cdev /bin/cdev
ENTRYPOINT ["/bin/cdev"]