Skip to content

Instantly share code, notes, and snippets.

@joelmoss
Forked from philips/gist:7555876
Last active August 29, 2015 13:56
Show Gist options
  • Save joelmoss/8829439 to your computer and use it in GitHub Desktop.
Save joelmoss/8829439 to your computer and use it in GitHub Desktop.

Add a local docker unit file

Create a file called /media/state/units/docker-local.service that has the following contents:

[Unit]
Description=docker local

[Service]
PermissionsStartOnly=true
ExecStartPre=/usr/bin/systemctl kill docker.service
ExecStart=/usr/bin/docker -d -H unix:// -H tcp://

[Install]
WantedBy=local.target

Enable the local docker

sudo systemctl restart local-enable.service

Set DOCKER_HOST

On yor local machine:

export DOCKER_HOST=tcp://VAGRANT_IP:4243

Have fun!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment