Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions startupscript/butane/prepare-devcontainer-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ if [[ -n "${DOCKER_DIR+x}" ]]; then
popd
fi

# Report success before docker is stopped. On AWS set_metadata tags the instance
# by running the AWS CLI in a container, so it cannot run once the docker daemon
# is gone.
# shellcheck source=/dev/null
source '/home/core/metadata-utils.sh'
set_metadata 'startup_script/status' "COMPLETED"

# Stop docker and prevent it from starting again
systemctl mask docker
systemctl stop docker
Expand All @@ -74,9 +81,5 @@ find /var/lib/docker \
! -name engine-id \
-exec rm -rf {} +

# shellcheck source=/dev/null
source '/home/core/metadata-utils.sh'
set_metadata 'startup_script/status' "COMPLETED"

# Shut down the instance to signal that the image is ready to be saved.
systemctl poweroff
Loading