File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM ubuntu:18.04
2+
3+
4+ # Make sure the package repository is up to date.
5+ RUN apt-get update && \
6+ apt-get -qy full-upgrade && \
7+ apt-get install -qy git && \
8+ # Install a basic SSH server
9+ apt-get install -qy openssh-server && \
10+ sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd && \
11+ mkdir -p /var/run/sshd && \
12+ # Install JDK 8 (latest stable edition at 2019-04-01)
13+ apt-get install -qy openjdk-8-jdk && \
14+ # Install maven
15+ apt-get install -qy maven && \
16+ # Cleanup old packages
17+ apt-get -qy autoremove && \
18+ # Add user jenkins to the image
19+ adduser --quiet jenkins && \
20+ # Set password for the jenkins user (you may want to alter this).
21+ echo "jenkins:jenkins" | chpasswd && \
22+ mkdir /home/jenkins/.m2
23+
24+ #ADD settings.xml /home/jenkins/.m2/
25+ # Copy authorized keys
26+ COPY .ssh/authorized_keys /home/jenkins/.ssh/authorized_keys
27+
28+ RUN chown -R jenkins:jenkins /home/jenkins/.m2/ && \
29+ chown -R jenkins:jenkins /home/jenkins/.ssh/
30+
31+ # Standard SSH port
32+ EXPOSE 22
33+
34+ CMD ["/usr/sbin/sshd", "-D"]
You can’t perform that action at this time.
0 commit comments