forked from hassbert/docker-jenkins-cicd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
72 lines (64 loc) · 2.09 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
FROM jenkins/jnlp-slave:3.27-1
# Required Environment variables
ENV CHROME_BIN /usr/bin/chromium
ENV CHROMIUM_BIN /usr/bin/chromium
ENV CHROMEDRIVER_BIN /usr/bin/chromedriver
# Upgrade permissions
USER root
# Update references to various repositories ( NodeJS 8.x, Yarn, etc. )
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# Install required packages
##############################
RUN apt-get update && apt-get install -y --no-install-recommends \
# Maven
maven \
# NodeJS + NPM + Yarn
nodejs \
yarn \
# Chromium + Chrome driver
chromium \
chromium-driver \
# cypress dependencies
xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 \
# SVN
git-svn \
subversion \
# Utilities
zip \
unzip \
curl \
rsync \
jq \
git-crypt \
# AWS CLI requirement
python \
python-setuptools \
python-wheel \
python-pip \
# Source code building ( node-gyp, etc. )
build-essential \
# Cloudfoundry CLI
&& curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&source=github" | tar -zx \
&& mv cf /usr/local/bin \
&& chmod +x /usr/local/bin/cf \
# Akamai CLI
&& curl -L "https://github.com/akamai/cli/releases/download/1.0.2/akamai-1.0.2-linuxamd64" -o /usr/local/bin/akamai \
&& chmod +x /usr/local/bin/akamai \
# Akamai purge CLI
&& curl -L "https://github.com/akamai/cli-purge/releases/download/1.0.0/akamai-purge-1.0.0-linuxamd64" -o /usr/local/bin/akamai-purge \
&& chmod +x /usr/local/bin/akamai-purge \
# Move to the root home directory
&& cd \
# Install AWS CLI
&& pip install --no-cache-dir awscli
# Cleanup
#########
RUN find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& rm -rf /var/lib/apt/lists/*
# Downgrade permissions
USER jenkins