forked from spinnaker/clouddriver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ubuntu
43 lines (38 loc) · 1.93 KB
/
Dockerfile.ubuntu
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
FROM ubuntu:bionic
LABEL maintainer="[email protected]"
ARG TARGETARCH
ENV GOOGLE_CLOUD_SDK_VERSION=412.0.0
ENV PATH "$PATH:/opt/google-cloud-sdk/bin/"
RUN apt-get update && apt-get install -y curl gnupg && \
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
echo "deb https://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/cloud-sdk.list && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
openjdk-11-jre-headless \
wget \
kubectl \
python-pip \
python3 \
git \
openssh-client && \
pip install awscli==1.18.152 --upgrade && \
rm -rf ~/.config/gcloud
RUN curl -o /usr/local/bin/aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/${TARGETARCH}/aws-iam-authenticator && \
chmod +x /usr/local/bin/aws-iam-authenticator && \
ln -s /usr/local/bin/aws-iam-authenticator /usr/local/bin/heptio-authenticator-aws
# Google cloud SDK
RUN [ $TARGETARCH == 'amd64' ] && export GCP_ARCH="x86_64" || export GCP_ARCH="arm" \
&& wget -nv https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GOOGLE_CLOUD_SDK_VERSION}-linux-${GCP_ARCH}.tar.gz \
&& mkdir -p /opt && cd /opt \
&& tar -xzf /google-cloud-sdk-${GOOGLE_CLOUD_SDK_VERSION}-linux-${GCP_ARCH}.tar.gz \
&& rm /google-cloud-sdk-${GOOGLE_CLOUD_SDK_VERSION}-linux-${GCP_ARCH}.tar.gz \
&& CLOUDSDK_PYTHON="python3" /opt/google-cloud-sdk/install.sh --usage-reporting=false --bash-completion=false \
--additional-components app-engine-java app-engine-go gke-gcloud-auth-plugin \
&& rm -rf ~/.config/gcloud \
&& rm -rf /opt/google-cloud-sdk/.install/.backup
RUN adduser --system --uid 10111 --group spinnaker
COPY clouddriver-web/build/install/clouddriver /opt/clouddriver
RUN mkdir -p /opt/clouddriver/plugins && chown -R spinnaker:nogroup /opt/clouddriver/plugins
USER spinnaker
CMD ["/opt/clouddriver/bin/clouddriver"]