-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockefile.ubuntu-bionic
36 lines (29 loc) · 1.67 KB
/
Dockefile.ubuntu-bionic
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
# Based on: https://github.com/evarga/docker-images/blob/master/jenkins-slave/Dockerfile
FROM ubuntu:bionic
MAINTAINER Jarle Aase <[email protected]>
# In case you need proxy
#RUN echo 'Acquire::http::Proxy "http://127.0.0.1:8080";' >> /etc/apt/apt.conf
RUN apt-get -q update &&\
DEBIAN_FRONTEND="noninteractive" apt-get -q upgrade -y -o Dpkg::Options::="--force-confnew" --no-install-recommends &&\
DEBIAN_FRONTEND="noninteractive" apt-get -q install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends openssh-server &&\
DEBIAN_FRONTEND="noninteractive" apt-get -q install -y g++ git make \
qtdeclarative5-dev qt5-default ruby ruby-dev rubygems build-essential &&\
gem install --no-ri --no-rdoc fpm &&\
apt-get -q autoremove &&\
apt-get -q clean -y && rm -rf /var/lib/apt/lists/* && rm -f /var/cache/apt/*.bin &&\
sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd &&\
mkdir -p /var/run/sshd
# Install JDK 8 (latest edition)
RUN apt-get -q update &&\
DEBIAN_FRONTEND="noninteractive" apt-get -q install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends software-properties-common &&\
add-apt-repository -y ppa:openjdk-r/ppa &&\
apt-get -q update &&\
DEBIAN_FRONTEND="noninteractive" apt-get -q install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends openjdk-8-jre-headless &&\
apt-get -q clean -y && rm -rf /var/lib/apt/lists/* && rm -f /var/cache/apt/*.bin
# Set user jenkins to the image
RUN useradd -m -d /home/jenkins -s /bin/sh jenkins &&\
echo "jenkins:jenkins" | chpasswd
# Standard SSH port
EXPOSE 22
# Default command
CMD ["/usr/sbin/sshd", "-D"]