This repository has been archived by the owner on Dec 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile-old.tpl
74 lines (64 loc) · 2.73 KB
/
Dockerfile-old.tpl
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
# This Dockerfile is used to build an image containing basic stuff to be used as a Jenkins slave build node.
FROM ubuntu:15.10
LABEL maintainer "Fábio Tramasoli <fabio@tramasoli.com>"
ENV JAVA_HOME=/opt/jdk \
PATH=\$\{PATH\}:/opt/jdk/bin
# Install and configure a basic SSH server
RUN apt-get update &&\
apt-get install -y openssh-server &&\
apt-get clean -y && rm -rf /var/lib/apt/lists/* &&\
sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd &&\
mkdir -p /var/run/sshd
# Set user jenkins to the image
RUN adduser --quiet jenkins --home /var/jenkins_home &&\
echo "jenkins:jenkins" | chpasswd
# Change shell do BASH
RUN cd /bin && rm sh && ln -s bash sh
# Install SCM and build tools
RUN apt-get update &&\
apt-get install -y git subversion maven &&\
apt-get clean -y && rm -rf /var/lib/apt/lists/*
# Install Oracle JDK (thanks to Anastas Dancha <anapsix@random.io>)
RUN mkdir /opt && \
curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie" -o /tmp/java.tar.gz \
%JVM_URL% && \
gunzip /tmp/java.tar.gz && \
tar -C /opt -xf /tmp/java.tar && \
ln -s /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} /opt/jdk && \
sed -i s/#networkaddress.cache.ttl=-1/networkaddress.cache.ttl=0/ $JAVA_HOME/jre/lib/security/java.security && \
rm -rf /opt/jdk/*src.zip \
/opt/jdk/lib/missioncontrol \
/opt/jdk/lib/visualvm \
/opt/jdk/lib/*javafx* \
/opt/jdk/jre/plugin \
/opt/jdk/jre/bin/javaws \
/opt/jdk/jre/bin/jjs \
/opt/jdk/jre/bin/orbd \
/opt/jdk/jre/bin/pack200 \
/opt/jdk/jre/bin/policytool \
/opt/jdk/jre/bin/rmid \
/opt/jdk/jre/bin/rmiregistry \
/opt/jdk/jre/bin/servertool \
/opt/jdk/jre/bin/tnameserv \
/opt/jdk/jre/bin/unpack200 \
/opt/jdk/jre/lib/javaws.jar \
/opt/jdk/jre/lib/deploy* \
/opt/jdk/jre/lib/desktop \
/opt/jdk/jre/lib/*javafx* \
/opt/jdk/jre/lib/*jfx* \
/opt/jdk/jre/lib/amd64/libdecora_sse.so \
/opt/jdk/jre/lib/amd64/libprism_*.so \
/opt/jdk/jre/lib/amd64/libfxplugins.so \
/opt/jdk/jre/lib/amd64/libglass.so \
/opt/jdk/jre/lib/amd64/libgstreamer-lite.so \
/opt/jdk/jre/lib/amd64/libjavafx*.so \
/opt/jdk/jre/lib/amd64/libjfx*.so \
/opt/jdk/jre/lib/ext/jfxrt.jar \
/opt/jdk/jre/lib/ext/nashorn.jar \
/opt/jdk/jre/lib/oblique-fonts \
/opt/jdk/jre/lib/plugin.jar \
/tmp/*
COPY ./scripts/Dockerfile-ssh.bootstrap /bootstrap.sh
# Standard SSH port
EXPOSE 22
CMD ["/bin/bash","/bootstrap.sh"]