-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
69 lines (50 loc) · 1.88 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM jenkinsci/jnlp-slave
USER root
RUN apt-get update \
&& apt-get install -y curl wget libxss1 libappindicator1 libindicator7 xvfb apt-transport-https build-essential jq \
&& apt-get -y autoclean
#Add yarn to apt
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# nvm environment variables
ENV NVM_DIR /usr/local/nvm
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
# install chrome for UI testing
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install
RUN apt-get update \
&& apt-get install nodejs \
&& apt-get install --no-install-recommends yarn
ENV NEWMAN_VERSION 3.9.3
RUN npm install -g newman@${NEWMAN_VERSION};
ENV DISPLAY :99
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
# install k8s cli tools
ENV CLOUDSDK_CORE_DISABLE_PROMPTS 1
ENV PATH /opt/google-cloud-sdk/bin:$PATH
RUN curl https://sdk.cloud.google.com | bash && mv google-cloud-sdk /opt
RUN gcloud components install kubectl
# golang
ARG GO_VERSION=1.10.3
RUN wget https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz \
&& tar -xzvf go${GO_VERSION}.linux-amd64.tar.gz \
&& rm go${GO_VERSION}.linux-amd64.tar.gz \
&& mv go /usr/lib/go
ENV GO111MODULE on
ENV GOROOT=/usr/lib/go
RUN chown -R jenkins ${GOROOT}
ENV GOPATH /home/jenkins/go
RUN mkdir /home/jenkins/go \
&& chown -R jenkins ${GOPATH}
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
# docker
RUN curl -fsSL get.docker.com | bash
RUN usermod -aG docker jenkins
# AWS
RUN curl -O https://bootstrap.pypa.io/get-pip.py \
&& python get-pip.py \
# && export PATH=/home/jenkins/.local/bin:$PATH \
&& pip install awscli --upgrade
ENV PATH /home/jenkins/.local/bin:$PATH
RUN chown -R jenkins /home/jenkins/
USER jenkins