Skip to content

Commit

Permalink
clean shutdown before podman commit
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Feb 23, 2024
1 parent 7c54812 commit c16ab39
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export FIRST=${FIRST:-""}
if [ ! -e $CONFIG ]; then
# create a new docker image with the bootstrapped version of your cluster
./bin/spinner "Bootstrapping your hind cluster..." /app/bin/bootstrap.sh

./bin/spinner 'cleanly shutting down' /app/bin/shutdown.sh
./bin/spinner 'committing bootstrapped image' podman commit hind hind


Expand Down
11 changes: 11 additions & 0 deletions bin/shutdown.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/zsh -eu

# cleanly shutdown so we dont have a dangling supervisord socket at `podman commit` time

cd /etc/supervisor
supervisorctl stop nomad
supervisorctl stop consul
supervisorctl stop consul-template
supervisorctl stop caddy-restarter
supervisorctl shutdown
sleep 5

0 comments on commit c16ab39

Please sign in to comment.