Tutorial by Examples

Edit /etc/init/docker.conf and update the DOCKER_OPTS variable to the following: DOCKER_OPTS='-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock' Restart Docker deamon service docker restart Verify if Remote API is working curl -X GET http://localhost:4243/images/json
Linux running systemd, like Ubuntu 16.04, adding -H tcp://0.0.0.0:2375 to /etc/default/docker does not have the effect it used to. Instead, create a file called /etc/systemd/system/docker-tcp.socket to make docker available on a TCP socket on port 4243: [Unit] Description=Docker Socket for the AP...
Copy the package installer unit file to /etc where changes will not be overwritten on an upgrade: cp /lib/systemd/system/docker.service /etc/systemd/system/docker.service Update /etc/systemd/system/docker.service with your options on ExecStart: ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0...
Here is an example of image pulling using Go and Docker Engine API and the same progress bars as the ones shown when you run docker pull your_image_name in the CLI. For the purposes of the progress bars are used some ANSI codes. package yourpackage import ( "context" "en...
When using cURL for some queries to the Docker API, it might be a bit tricky to pass some complex structures. Let's say, getting a list of images allows using filters as a query parameter, which have to be a JSON representation of map[string][]string (about the maps in Go you can find more here). H...

Page 1 of 1