Merge pull request #2261 from tonistiigi/daemonless-wait

daemonless: wait for daemon to finish before exit
v0.9 dockerfile/1.3.0
Tõnis Tiigi 2021-07-15 20:11:23 -07:00 committed by GitHub
commit c8bb937807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,7 @@ set -eu
# * addr
# * log
tmp=$(mktemp -d /tmp/buildctl-daemonless.XXXXXX)
trap "kill \$(cat $tmp/pid); rm -rf $tmp" EXIT
trap "kill \$(cat $tmp/pid); wait \$(cat $tmp/pid) || true; rm -rf $tmp" EXIT
startBuildkitd() {
addr=
@ -57,3 +57,4 @@ waitForBuildkitd() {
startBuildkitd
waitForBuildkitd
$BUILDCTL --addr=$(cat $tmp/addr) "$@"