Run dockerd manually if ischroot is detected

This commit is contained in:
nicolas.dorier 2019-06-17 22:20:47 +09:00
parent 974b0a37e1
commit 4841b45a57
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -311,6 +311,14 @@ if ! [ -x "$(command -v docker-compose)" ]; then
return
fi
if $START && [ -x "$(command -v ischroot)" ] && ischroot; then
echo "chroot detected, running dockerd in background..."
dockerd &
echo "Waiting /var/run/docker.sock to be created..."
while [ ! -f "/var/run/docker.sock" ]; do sleep 1; done
echo "/var/run/docker.sock is created"
fi
# Generate the docker compose in BTCPAY_DOCKER_COMPOSE
. ./build.sh
@ -406,4 +414,9 @@ fi
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
install_tooling
if $START && [ -x "$(command -v ischroot)" ] && ischroot; then
echo "Killing dockerd in the background..."
kill %-
fi
cd $ORIGINAL_DIRECTORY