-
-
Save impaler/81eba4235f6679b4cf96 to your computer and use it in GitHub Desktop.
enabling docker remote API on Ubuntu 14.04 on GCE
This file contains hidden or 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
* spin up a VM on GCE and | |
install docker (based on [these](https://docs.docker.com/installation/ubuntulinux/) instructions) | |
```bash | |
gcloud compute instances create dave --machine-type n1-standard-1 --image ubuntu-14-04 | |
gcloud compute ssh dave | |
wget -qO- https://get.docker.com/ | sh | |
``` | |
* to verify install is working | |
```bash | |
sudo docker run hello-world | |
``` | |
* based on | |
[this](http://www.virtuallyghetto.com/2014/07/quick-tip-how-to-enable-docker-remote-api.html) | |
and | |
[this](http://blog.tutum.co/2013/11/23/remote-and-secure-use-of-docker-api-with-python-part-ii/) | |
enable docker's remote API | |
```bash | |
sudo sed -i -e 's/#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"/DOCKER_OPTS="-H tcp:\/\/0.0.0.0:4243 -H unix:\/\/\/var\/run\/docker.sock"/g' /etc/default/docker | |
sudo service docker restart | |
``` | |
* verify the remote API is enabled | |
```bash | |
curl -s http://127.0.0.1:4243/images/json | python -m json.tool | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment