diff options
author | Cory Snider <csnider@mirantis.com> | 2022-09-21 19:03:04 -0400 |
---|---|---|
committer | Cory Snider <csnider@mirantis.com> | 2022-10-26 12:04:37 -0400 |
commit | 1f32e3c95d72a29b3eaacba156ed675dba976cb5 (patch) | |
tree | 517e71e3b1e72b8261712812e37fb20681ef0f5a /hack | |
parent | 542c735926c9208dc0fe9fc02026a110ca0343f9 (diff) | |
download | docker-1f32e3c95d72a29b3eaacba156ed675dba976cb5.tar.gz |
Add integration test for #38995, #43390
Modify the DinD entrypoint scripts to make the issue reproducible inside
a DinD container.
Co-authored-by: Bjorn Neergaard <bneergaard@mirantis.com>
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
Signed-off-by: Cory Snider <csnider@mirantis.com>
Diffstat (limited to 'hack')
-rwxr-xr-x | hack/dind | 4 | ||||
-rwxr-xr-x | hack/dind-systemd | 5 |
2 files changed, 9 insertions, 0 deletions
@@ -37,6 +37,10 @@ if [ -f /sys/fs/cgroup/cgroup.controllers ]; then > /sys/fs/cgroup/cgroup.subtree_control fi +# Change mount propagation to shared to make the environment more similar to a +# modern Linux system, e.g. with SystemD as PID 1. +mount --make-rshared / + if [ $# -gt 0 ]; then exec "$@" fi diff --git a/hack/dind-systemd b/hack/dind-systemd index 27e07badd3..5ab0d25fc1 100755 --- a/hack/dind-systemd +++ b/hack/dind-systemd @@ -13,6 +13,11 @@ if [ ! -t 0 ]; then exit 1 fi +# Change mount propagation to shared, which SystemD PID 1 would normally do +# itself when started by the kernel. SystemD skips that when it detects it is +# running in a container. +mount --make-rshared / + env > /etc/docker-entrypoint-env cat > /etc/systemd/system/docker-entrypoint.target << EOF |