-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add docker and kind * fix, 24.0.5 not signed yet (?) * install s6 * need the dockerfiles in the context * s6 services config for docker * docker as nonroot * rename * fix typo * fix iptables issue * add modprobe * use rootless install script * add env vars * fix * fix * fix * rm debug code * try with fuse-overlayfs * test * test dockerfile systemd * fix build * add missing iproute2 * pod yamls * jammy test with plural login * update image * sysbox priv * add user/contents.d * test podman build * this at least works with --privileged * rm dockerd s6 service, clogs logs * try on sysbox runc * shouldn't matter, but let's see * unset mount program, be specific about defaults * test with new storage.conf * simplify * for some reason this does make a difference * try with vfs * makes it worse * fix perm on volume * add back mknod * force newer version of podman, crun dep is ancient * trigger build * build with docker-ce-cli only * dind sidecar approach * clean up * create dind dockerfile with systemd conf * add make target * dont ignore systemd files * add dind build gh wf step * rm trest image dockerfile * rm debug yamnls * clean up * clean up, not needed with correct unit file * rm dependencies of podman * clean up * rm get-docker.sh was need for debugging * update yaml * delete sidecar yaml example, not needed in repo
- Loading branch information
Showing
7 changed files
with
241 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ packer/ | |
hack/ | ||
Makefile | ||
Dockerfile | ||
dockerfiles/ | ||
dockerfiles | ||
!dockerfiles/dind-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
FROM ubuntu:jammy | ||
|
||
# | ||
# Systemd installation | ||
# | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
systemd \ | ||
systemd-sysv \ | ||
libsystemd0 \ | ||
ca-certificates \ | ||
dbus \ | ||
iptables \ | ||
iproute2 \ | ||
kmod \ | ||
locales \ | ||
sudo \ | ||
udev && \ | ||
\ | ||
# Prevents journald from reading kernel messages from /dev/kmsg | ||
echo "ReadKMsg=no" >> /etc/systemd/journald.conf && \ | ||
\ | ||
# Housekeeping | ||
apt-get clean -y && \ | ||
rm -rf \ | ||
/var/cache/debconf/* \ | ||
/var/lib/apt/lists/* \ | ||
/var/log/* \ | ||
/tmp/* \ | ||
/var/tmp/* \ | ||
/usr/share/doc/* \ | ||
/usr/share/man/* \ | ||
/usr/share/local/* | ||
|
||
# Disable systemd services/units that are unnecessary within a container. | ||
RUN systemctl mask systemd-udevd.service \ | ||
systemd-udevd-kernel.socket \ | ||
systemd-udevd-control.socket \ | ||
systemd-modules-load.service \ | ||
sys-kernel-debug.mount \ | ||
sys-kernel-tracing.mount | ||
|
||
# Make use of stopsignal (instead of sigterm) to stop systemd containers. | ||
STOPSIGNAL SIGRTMIN+3 | ||
|
||
|
||
# Install Docker | ||
RUN apt-get update && apt-get install -y curl \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh \ | ||
ADD https://raw.githubusercontent.com/docker/docker-ce/master/components/cli/contrib/completion/bash/docker /etc/bash_completion.d/docker.sh | ||
|
||
COPY dockerfiles/dind-config/docker.service /lib/systemd/system/docker.service | ||
COPY dockerfiles/dind-config/daemon.json /etc/docker/daemon.json | ||
|
||
|
||
# Set systemd as entrypoint. | ||
ENTRYPOINT [ "/sbin/init", "--log-level=err" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[Unit] | ||
Description=Docker Application Container Engine | ||
Documentation=https://docs.docker.com | ||
After=network-online.target docker.socket firewalld.service containerd.service time-set.target | ||
Wants=network-online.target containerd.service | ||
Requires=docker.socket | ||
|
||
[Service] | ||
Type=notify | ||
# the default is not to use systemd for cgroups because the delegate issues still | ||
# exists and systemd currently does not support the cgroup feature set required | ||
# for containers run by docker | ||
#ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock | ||
#### BEGIN MOD #### | ||
ExecStart=/usr/bin/dockerd --config-file /etc/docker/daemon.json --containerd=/run/containerd/containerd.sock | ||
#### END MOD ###### | ||
ExecReload=/bin/kill -s HUP $MAINPID | ||
TimeoutStartSec=0 | ||
RestartSec=2 | ||
Restart=always | ||
|
||
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229. | ||
# Both the old, and new location are accepted by systemd 229 and up, so using the old location | ||
# to make them work for either version of systemd. | ||
StartLimitBurst=3 | ||
|
||
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230. | ||
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make | ||
# this option work for either version of systemd. | ||
StartLimitInterval=60s | ||
|
||
# Having non-zero Limit*s causes performance problems due to accounting overhead | ||
# in the kernel. We recommend using cgroups to do container-local accounting. | ||
LimitNOFILE=infinity | ||
LimitNPROC=infinity | ||
LimitCORE=infinity | ||
|
||
# Comment TasksMax if your systemd version does not support it. | ||
# Only systemd 226 and above support this option. | ||
TasksMax=infinity | ||
|
||
# set delegate yes so that systemd does not reset the cgroups of docker containers | ||
Delegate=yes | ||
|
||
# kill only the docker process, not all processes in the cgroup | ||
KillMode=process | ||
OOMScoreAdjust=-500 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |