Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 19c1edc

Browse files
ctalledorodnymolina
authored andcommitted
First commit of Dockerfile for jenkins-syscont image. (#14)
* First commit of Dockerfile for jenkins-syscont image.
1 parent 5d50a0d commit 19c1edc

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# System Container with Jenkins Master + Dockerd
3+
#
4+
# Run with: docker run --rm -d --runtime=sysbox-runc -P nestybox/jenkins-syscont
5+
6+
FROM jenkins/jenkins:lts
7+
USER root
8+
9+
#
10+
# Docker install
11+
#
12+
RUN apt-get update && apt-get install --no-install-recommends -y \
13+
apt-transport-https \
14+
ca-certificates \
15+
curl \
16+
gnupg2 \
17+
software-properties-common
18+
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
19+
RUN apt-key fingerprint 0EBFCD88
20+
RUN add-apt-repository \
21+
"deb [arch=amd64] https://download.docker.com/linux/debian \
22+
$(lsb_release -cs) \
23+
stable"
24+
RUN apt-get update && apt-get install --no-install-recommends -y \
25+
docker-ce docker-ce-cli containerd.io
26+
27+
#
28+
# supervisord
29+
#
30+
RUN apt-get install --no-install-recommends -y supervisor
31+
RUN mkdir -p /var/log/supervisor
32+
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
33+
34+
#
35+
# Entrypoint
36+
#
37+
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
38+
RUN chmod +x /usr/bin/docker-entrypoint.sh
39+
40+
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# sys container init:
5+
#
6+
# If no command is passed to the container, supervisord becomes init and
7+
# starts all its configured programs (per /etc/supervisor/conf.f/supervisord.conf).
8+
#
9+
# If a command is passed to the container, it runs in the foreground;
10+
# supervisord runs in the background and starts all its configured
11+
# programs.
12+
#
13+
# In either case, supervisord always starts its configured programs.
14+
15+
if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
16+
exec supervisord -n "$@"
17+
else
18+
supervisord -c /etc/supervisor/conf.d/supervisord.conf &
19+
exec "$@"
20+
fi
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[supervisord]
2+
stdout_logfile=/dev/stdout
3+
stdout_logfile_maxbytes=0
4+
5+
[program:dockerd]
6+
command=/usr/bin/dockerd
7+
priority=1
8+
autostart=true
9+
autorestart=true
10+
startsecs=0
11+
12+
[program:jenkins]
13+
command=/usr/local/bin/jenkins.sh
14+
priority=2
15+
autostart=true
16+
autorestart=true
17+
startsecs=0
18+
username=jenkins

0 commit comments

Comments
 (0)