forked from jenkinsci/docker-inbound-agent
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
161 lines (139 loc) · 5.71 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# The MIT License
#
# Copyright (c) 2015, CloudBees, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
FROM jenkinsci/slave:3.27-1
LABEL [email protected]
USER root
COPY jenkins-slave /usr/local/bin/jenkins-slave
ENV BUILD_PACKAGES apt-transport-https \
build-essential \
ca-certificates \
curl \
lsb-release \
python-pip \
software-properties-common
ENV RUNTIME_PACKAGES apt-transport-https \
awscli \
build-essential \
docker-ce=17.06.2~ce-0~ubuntu \
elixir \
esl-erlang \
g++ \
libproj-dev \
nodejs \
postgresql \
postgresql-contrib \
rsync \
software-properties-common \
vagrant \
zip \
ruby-dev \
zlib1g \
zlib1g-dev \
apache2-utils
RUN echo "151.101.32.162 registry.npmjs.org" >> /etc/hosts
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get update && \
apt-get install -y --no-install-recommends $BUILD_PACKAGES && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" && \
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
dpkg -i erlang-solutions_1.0_all.deb && \
apt-get update && \
apt-get install -y $RUNTIME_PACKAGES
RUN echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 && \
apt-get update && \
apt-get install -y ansible
RUN wget https://github.com/kelseyhightower/confd/releases/download/v0.14.0/confd-0.14.0-linux-amd64 && \
mv confd-0.14.0-linux-amd64 /usr/local/bin/confd && \
wget -O packer.zip https://releases.hashicorp.com/packer/1.4.0/packer_1.4.0_linux_amd64.zip?_ga=2.243599746.608711644.1512069049-1880364814.1510687238 && \
unzip packer.zip && \
mv packer /usr/local/bin/packer && \
chmod 755 /usr/local/bin/confd && \
wget https://get.helm.sh/helm-v3.2.4-linux-amd64.tar.gz && \
tar -xvzf helm-v3.2.4-linux-amd64.tar.gz && \
chmod +x linux-amd64/helm && \
mv linux-amd64/helm /usr/local/bin/helm && \
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl
RUN wget https://github.com/heptio/ark/releases/download/v0.7.0/ark-v0.7.0-linux-amd64.tar.gz && \
tar -xvzf ark-v0.7.0-linux-amd64.tar.gz && \
chmod +x ark && \
mv ark /usr/local/bin/ark
RUN wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
pip install \
elasticsearch-curator==5.4.0 \
boto==2.48.0 \
anchorecli
# Install Vault
RUN curl -O https://releases.hashicorp.com/vault/0.9.6/vault_0.9.6_linux_amd64.zip && \
unzip vault_0.9.6_linux_amd64.zip && \
mv vault /usr/local/bin && \
chmod 755 /usr/local/bin/vault
# Install Ruby bundler
RUN gem install bundler
# Clean up
#RUN apt-get remove -y --purge $BUILD_PACKAGES $RUNTIME_PACKAGES && \
# rm -rf /var/lib/apt/lists/*
# yarn stuff
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && \
apt update && \
apt install -y yarn
# apk stuff
ENV GRADLE_HOME /opt/gradle/gradle-4.10.2
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-amd64/
RUN wget https://services.gradle.org/distributions/gradle-4.10.2-bin.zip -P /tmp && \
unzip -d /opt/gradle /tmp/gradle-*.zip
# Siege installation:
RUN wget http://download.joedog.org/siege/siege-latest.tar.gz && \
tar -zxvf siege-latest.tar.gz && \
cd siege-*/ && \
./configure && \
make && \
make install && \
siege.config
RUN wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
pip install \
ansible==2.4 \
elasticsearch-curator==5.4.0 \
boto==2.48.0 \
cryptography~=2.0.3 \
pyopenssl \
urllib3 \
ndg-httpsclient \
pyasn1 \
sh \
tabulate \
troposphere \
pytz \
python-dateutil && \
pip install awscli --upgrade --user
# Install golang 1.10
RUN wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz && \
rm -rf go1.10.linux-amd64.tar.gz
ENV PATH="${PATH}:/usr/local/go/bin"
ENTRYPOINT ["jenkins-slave"]