Skip to content

Instantly share code, notes, and snippets.

@philips
Created November 20, 2013 01:21
Show Gist options
  • Save philips/7555876 to your computer and use it in GitHub Desktop.
Save philips/7555876 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

[Install]
WantedBy=local.target

Enable the local docker

sudo systemctl restart local-enable.service

Have fun!

@russroy
Copy link

russroy commented May 1, 2014

This was working in earlier versions of CoreOS. I'm returning to CoreOS now after some time away (CoreOS 298.0.0) and this trick no longer works:

core@core-01 ~ $ sudo systemctl restart local-enable.service
Failed to restart local-enable.service: Unit local-enable.service failed to load: No such file or directory.
core@core-01 ~ $

@bpinto
Copy link

bpinto commented Jun 5, 2014

You have to manually enable/start the service now.

systemctl enable docker-local; systemctl start docker-local

@emmanuel
Copy link

emmanuel commented Jul 9, 2014

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