Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (47 loc) · 2.28 KB
/
Copy pathDockerfile
File metadata and controls
62 lines (47 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM alpine:3.22.1
ENV VERSION v4.3.2
ARG TARGETARCH
LABEL maintainer="Trevor Hartman <[email protected]>"
WORKDIR /
# Enable SSL
RUN apk --update add ca-certificates wget python3 curl tar jq gcompat
# Install gcloud and kubectl
# kubectl will be available at /google-cloud-sdk/bin/kubectl
# This is added to $PATH
ENV HOME=/
ENV PATH=/google-cloud-sdk/bin:$PATH
ENV CLOUDSDK_PYTHON_SITEPACKAGES=1
RUN export ARCH=${TARGETARCH/amd64/x86_64}; export ARCH=${ARCH/arm64/arm}; wget --no-verbose https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-${ARCH}.tar.gz && tar -xf google-cloud-cli-linux-${ARCH}.tar.gz && rm google-cloud-cli-linux-${ARCH}.tar.gz
RUN google-cloud-sdk/install.sh --usage-reporting=true --path-update=true --bash-completion=true --rc-path=/.bashrc --additional-components app kubectl alpha beta
# Disable updater check for the whole installation.
# Users won't be bugged with notifications to update to the latest version of gcloud.
RUN google-cloud-sdk/bin/gcloud config set --installation component_manager/disable_update_check true
ENV FILENAME=helm-${VERSION}-linux-${TARGETARCH}.tar.gz
ENV HELM_URL=https://get.helm.sh/${FILENAME}
RUN echo $HELM_URL
RUN curl -o /tmp/$FILENAME ${HELM_URL} \
&& tar -zxvf /tmp/${FILENAME} -C /tmp \
&& mv /tmp/linux-${TARGETARCH}/helm /bin/helm \
&& rm -rf /tmp
# Helm plugins require git
# helm-diff requires bash, curl
RUN apk --update add git bash
# Install envsubst [better than using 'sed' for yaml substitutions]
ENV BUILD_DEPS="gettext" \
RUNTIME_DEPS="libintl"
RUN set -x && \
apk add --update $RUNTIME_DEPS && \
apk add --virtual build_deps $BUILD_DEPS && \
cp /usr/bin/envsubst /usr/local/bin/envsubst && \
apk del build_deps
# Install Helm plugins
# workaround for an issue in updating the binary of `helm-diff`
ENV HELM_PLUGIN_DIR=/.helm/plugins/helm-diff
# Plugin is downloaded to /tmp, which must exist
RUN mkdir /tmp
RUN helm plugin install https://github.com/viglesiasce/helm-gcs.git
RUN helm plugin install https://github.com/databus23/helm-diff
# Install vals tool
ENV VALS_VERSION=0.25.0
ENV VALS_URL=https://github.com/variantdev/vals/releases/download/v${VALS_VERSION}/vals_${VALS_VERSION}_linux_${TARGETARCH}.tar.gz
RUN curl -sL ${VALS_URL} | tar zx -C /usr/local/bin vals