forked from jenkins-x/jx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-tfo-gcp
34 lines (26 loc) · 963 Bytes
/
Dockerfile-tfo-gcp
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
FROM google/cloud-sdk:slim
USER root
ARG TARGETARCH
ARG TARGETOS
ARG VERSION
LABEL org.opencontainers.image.source https://github.com/jenkins-x/jx
# unzip
RUN apt-get install -y unzip bash jq && \
rm -rf /var/lib/apt/lists/*
# terraform
ENV TERRAFORM 1.1.2
RUN curl -LO https://releases.hashicorp.com/terraform/${TERRAFORM}/terraform_${TERRAFORM}_linux_amd64.zip && \
unzip terraform_${TERRAFORM}_linux_amd64.zip && \
chmod +x terraform && mv terraform /usr/bin && rm terraform_${TERRAFORM}_linux_amd64.zip
# jx
RUN echo using jx version ${VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \
mkdir -p /home/.jx3 && \
curl -L https://github.com/jenkins-x/jx/releases/download/v${VERSION}/jx-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \
mv jx /usr/bin
# lets install the boot plugins
RUN jx upgrade plugins --boot --path /usr/bin
# lets install the admin plugin
RUN jx admin help
COPY run.sh /run.sh
ENTRYPOINT ["/bin/bash"]
CMD ["run.sh"]