Skip to content

Commit

Permalink
vm start - source challenge specific initvm
Browse files Browse the repository at this point in the history
  • Loading branch information
robwaz committed Dec 4, 2023
1 parent d16f107 commit 2964a08
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions challenge/vm/init
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,7 @@ find /challenge -name '*.ko' -exec /usr/sbin/insmod {} \;

service ssh start

# Note: This currently only works on custom challenge images
if [ -e /challenge/.docker ]; then
# /var/lib/docker needs to be ext4 in order to use overlayfs
dd if=/dev/zero of=/tmp/data bs=1M count=0 seek=2000
yes | mkfs.ext4 -O ^has_journal /tmp/data
mount /tmp/data -o X-mount.mkdir /var/lib/docker

# get my cgroup mounts into /sys/fs/cgroup
cgroupfs-mount

sudo dockerd > /dev/null 2>&1 &
fi
. /challenge/.initvm

if [ -e /usr/sbin/docker-init ]; then
exec /usr/sbin/docker-init /bin/sleep -- 6h
Expand Down

0 comments on commit 2964a08

Please sign in to comment.