Skip to content

Commit

Permalink
Bypass dind hack when running with Sysbox (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs authored May 9, 2024
1 parent 5083a49 commit c5c29d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions devcontainer/rootfs/etc/s6-overlay/s6-rc.d/dind/run
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

echo "[dind] starting service" >&2

set -- s6-notifyoncheck -c /etc/s6-overlay/s6-rc.d/dind/check_readiness.sh

if grep -qw sysboxfs /proc/self/mountinfo; then
exec "${@}" dockerd
fi

# the sleep helps workaround the "sed: couldn't flush stdout: Device or resource busy"
# error on first startup attempt
exec s6-notifyoncheck -c /etc/s6-overlay/s6-rc.d/dind/check_readiness.sh \
bash -c 'sleep 0.5s && exec dind dockerd'
exec "${@}" bash -c 'sleep 0.5s && exec dind dockerd'

0 comments on commit c5c29d0

Please sign in to comment.