Skip to content

Instantly share code, notes, and snippets.

@tobert
Last active November 15, 2015 08:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tobert/b249e55cc7e225bc5ad8 to your computer and use it in GitHub Desktop.
Save tobert/b249e55cc7e225bc5ad8 to your computer and use it in GitHub Desktop.
Docker w/ link-local API
This is a silly example for dinking around with the Docker API on a link-local dummy interface.
sudo modprobe dummy
sudo ip addr add 169.254.169.254/32 dev dummy0
curl 169.254.169.254/containers/json
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target
[Service]
ExecStart=/usr/bin/docker -d -H unix:///var/run/docker.sock -H tcp://169.254.169.254:80
LimitNOFILE=1048576
LimitNPROC=1048576
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment