-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
50 lines (40 loc) · 1.66 KB
/
Dockerfile
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
FROM centos:7
MAINTAINER Karl Stoney <[email protected]>
# Component versions used in this build
ENV KUBECTL_VERSION 1.5.3
ENV TERRAFORM_VERSION 0.8.7
ENV PEOPLEDATA_CLI_VERSION 1.2.36
# Get nodejs repos
RUN curl --silent --location https://rpm.nodesource.com/setup_7.x | bash -
# Setup gcloud repos
ENV CLOUDSDK_INSTALL_DIR /usr/lib64/google-cloud-sdk
ENV CLOUDSDK_PYTHON_SITEPACKAGES 1
COPY gcloud.repo /etc/yum.repos.d/
RUN mkdir -p /etc/gcloud/keys
# Install packages
RUN yum -y -q update && \
yum -y -q install google-cloud-sdk nodejs wget httpd-tools \
python-openssl build-essential libssl-dev g++ unzip which openssh && \
yum -y -q clean all
# Disable google cloud auto update... we should be pushing a new agent container
RUN gcloud config set --installation component_manager/disable_update_check true
RUN sed -i -- 's/\"disable_updater\": false/\"disable_updater\": true/g' $CLOUDSDK_INSTALL_DIR/lib/googlecloudsdk/core/config.json
# Terraform
RUN cd /tmp && \
wget --quiet https://releases.hashicorp.com/terraform/$TERRAFORM_VERSION/terraform_$TERRAFORM_VERSION\_linux_amd64.zip && \
unzip terraform_*.zip && \
mv terraform /usr/local/bin && \
rm -rf *terraform*
# Get the target version of KubeCTL
RUN cd /usr/local/bin && \
wget --quiet https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl && \
chmod +x kubectl
# Add the Peopledata CLI
ARG GO_DEPENDENCY_LABEL_CLI_PEOPLEDATA=
RUN npm install -g --depth=0 --no-summary --quiet peopledata-cli@$PEOPLEDATA_CLI_VERSION && \
rm -rf /tmp/npm*
RUN mkdir -p /app
WORKDIR /app
# Boot commands
COPY / /app/
ENTRYPOINT ["/app/start"]