2022-03-18 20:03:45 +00:00
|
|
|
FROM golang:alpine
|
|
|
|
|
2023-04-06 15:17:13 +00:00
|
|
|
ARG TF_VERSION=1.4.0
|
|
|
|
ENV TERRAFORM_VERSION $TF_VERSION
|
2022-03-18 20:03:45 +00:00
|
|
|
|
|
|
|
RUN apk update && \
|
|
|
|
apk upgrade --update-cache --available && \
|
2023-04-06 15:17:13 +00:00
|
|
|
apk add --no-cache curl git jq bash openssh unzip gcc g++ make ca-certificates && \
|
|
|
|
if [ "$(uname -m)" = "aarch64" ]; then \
|
|
|
|
KUBE_ARCH="linux/arm64" && \
|
|
|
|
TF_ARCH="linux_arm64"; \
|
|
|
|
else \
|
|
|
|
KUBE_ARCH="linux/amd64" && \
|
|
|
|
TF_ARCH="linux_amd64"; \
|
|
|
|
fi && \
|
|
|
|
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/${KUBE_ARCH}/kubectl" && \
|
2022-03-18 20:03:45 +00:00
|
|
|
chmod +x ./kubectl && \
|
2022-04-13 15:55:05 +00:00
|
|
|
mv ./kubectl /usr/local/bin && \
|
|
|
|
mkdir tmp && \
|
2023-04-06 15:17:13 +00:00
|
|
|
curl "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_${TF_ARCH}.zip" -o tmp/terraform.zip && \
|
2022-03-18 20:03:45 +00:00
|
|
|
unzip tmp/terraform.zip -d /usr/local/bin && \
|
|
|
|
chmod +x /usr/local/bin/terraform && \
|
|
|
|
rm -rf tmp
|
|
|
|
|
|
|
|
WORKDIR $GOPATH/src/github.com/k3s-io/k3s
|
|
|
|
|
2023-04-06 15:17:13 +00:00
|
|
|
COPY . .
|