forked from codefresh-contrib/cfstep-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.aarch64
67 lines (53 loc) · 2.1 KB
/
Dockerfile.aarch64
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
63
64
65
66
67
ARG HELM_VERSION
FROM arm64v8/golang:1.12-buster as setup
ARG HELM_VERSION
RUN echo "HELM_VERSION is set to: ${HELM_VERSION}" && mkdir /temp
RUN curl -L "https://get.helm.sh/helm-v${HELM_VERSION}-linux-arm64.tar.gz" -o helm.tar.gz \
&& tar -zxvf helm.tar.gz \
&& mv ./linux-arm64/helm /usr/local/bin/helm \
&& bash -c 'if [[ "${HELM_VERSION}" == 2* ]]; then helm init --client-only; echo "using helm3, no need to initialize helm"; fi' \
&& helm plugin install https://github.com/hypnoglow/helm-s3.git \
&& helm plugin install https://github.com/nouney/helm-gcs.git \
&& helm plugin install https://github.com/chartmuseum/helm-push.git
# Run acceptance tests
COPY Makefile Makefile
COPY bin/ bin/
COPY lib/ lib/
COPY acceptance_tests/ acceptance_tests/
RUN apt-get update \
&& apt-get install -y python3-venv \
&& make acceptance
FROM arm64v8/alpine:3.6
ARG KUBE_VERSION="v1.14.3"
ARG HELM_VERSION
RUN echo "HELM_VERSION is set to: ${HELM_VERSION}"
ENV FILENAME="helm-v${HELM_VERSION}-linux-arm64.tar.gz"
RUN apk add --update ca-certificates && update-ca-certificates \
&& apk add --update curl \
&& apk add bash \
&& apk add jq \
&& apk add python \
&& apk add make \
&& apk add git \
&& apk add openssl \
&& apk add py-pip \
&& pip install yq \
&& curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/arm64/kubectl -o /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl \
&& curl -L https://get.helm.sh/${FILENAME} -o /tmp/${FILENAME} \
&& tar -zxvf /tmp/${FILENAME} -C /tmp \
&& mv /tmp/linux-arm64/helm /bin/helm \
# Cleanup uncessary files
&& rm /var/cache/apk/* \
&& rm -rf /tmp/*
RUN if [[ "${HELM_VERSION}" == 2* ]]; then helm init --client-only; echo "using helm3, no need to initialize helm"; fi
ARG HELM_VERSION
COPY --from=setup /temp /root/.helm/* /root/.helm/
COPY bin/* /opt/bin/
RUN chmod +x /opt/bin/*
COPY lib/* /opt/lib/
# Install Python3
RUN apk add --no-cache python3 \
&& rm -rf /root/.cache
ENV HELM_VERSION ${HELM_VERSION}
ENTRYPOINT ["/opt/bin/release_chart"]