OS X + Core OS + Docker
If you want to try out Core OS on OS X (via Vagrant) and manage Docker without having to log in, follow these steps:
This assumes you've already:
- Installed Vagrant: http://www.vagrantup.com/downloads
- Pulled the Core OS image: https://coreos.com/docs/running-coreos/platforms/vagrant/
- Installed the Docker client:
brew install docker
Edit the Core OS Vagrant file to forward port 4243
Vagrant.configure("2") do |config|
...
config.vm.network "forwarded_port", guest: 4243, host: 4243
...
end
- Boot your Core OS image
vagrant up
- SSH in
vagrant ssh
- Add the following to
/media/state/units/docker-local.service
[Unit]
Description=docker local
[Service]
PermissionsStartOnly=true
ExecStartPre=/usr/bin/systemctl kill docker.service
ExecStart=/usr/bin/docker -d -H tcp://0.0.0.0:4243
[Install]
WantedBy=local.target
Logout of the box
Restart it
vagrant reload
- Connect with docker
docker -H localhost version
Written by Paul Guelpa
Related protips
1 Response
Original gist for overriding the Core OS Docker @ https://gist.github.com/philips/7555876
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Os x
Authors
mikker
63.06K
themichael'tips
28.98K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#