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
sudo systemctl restart local-enable.service
Have fun!
cat - > /media/state/units/docker-local.service <<EOF
[Unit]
Description=docker local
[Service]
PermissionsStartOnly=true
ExecStartPre=/usr/bin/systemctl kill docker.service
ExecStart=/usr/bin/docker -d
[Install]
WantedBy=local.target
EOF
systemctl restart local-enable.service
WARNING: This opens up the Docker Remote API to anyone! Be absolutely sure you have appropraitely firewalls in place on your network! YOU HAVE BEEN WANRED.
cat - > /media/state/units/docker-local.service <<EOF
[Unit]
Description=docker local
[Service]
PermissionsStartOnly=true
ExecStartPre=/usr/bin/systemctl kill docker.service
ExecStart=/usr/bin/docker -d -H unix:///run/docker.sock -H tcp://0.0.0.0:4243
[Install]
WantedBy=local.target
EOF
systemctl restart local-enable.service