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 8fd20e5 commit e2603e6
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions challenge/vm/init
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,8 @@ 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 &
if [ -e /challenge/.initvm ]; then
. /challenge/.initvm
fi

if [ -e /usr/sbin/docker-init ]; then
Expand Down

0 comments on commit e2603e6

Please sign in to comment.