Last active
February 3, 2020 10:43
-
-
Save eloylp/f05b4de931cc0a0cdd1e713b015639ba to your computer and use it in GitHub Desktop.
Install docker and expose docker daemon over TCP. Prepared for GCP metadata startup script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -fsSL https://get.docker.com | bash | |
DOCKER_CONFIG_OVERRIDE_DIR=/etc/systemd/system/docker.service.d | |
mkdir -p $DOCKER_CONFIG_OVERRIDE_DIR | |
cat <<EOF > $DOCKER_CONFIG_OVERRIDE_DIR/override.conf | |
[Service] | |
ExecStart= | |
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376 | |
EOF | |
systemctl daemon-reload | |
systemctl restart docker.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment