-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (24 loc) · 1.16 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
FROM ubuntu:bionic
MAINTAINER Rodrigo de la Fuente <[email protected]>
LABEL Description="Ubuntu container to be used as a Jenkins agent " \
Vendor="ACME Products" \
Version="1.0"
USER root
RUN set -e; \
mkdir -p /var/run/sshd; \
apt update; \
apt full-upgrade -y; \
apt install -y build-essential \
git \
sudo \
openssh-server \
docker-compose \
openjdk-8-jdk; \
apt autoremove; \
apt clean; \
/usr/bin/ssh-keygen -A; \
useradd -m -d /home/jenkins -s /bin/sh jenkins; \
echo 'jenkins:jenkins' | chpasswd; \
echo 'jenkins ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/10-sudo
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]