I'm trying to utilize Vagrant 1.6's Docker provider and I seem to have run into a snag. I can successfully bring up the Docker container and guest OS, but then I can't access the service I've brought up within the container from the host OS. Here's my Vagrantfile:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.network :forwarded_port, guest: 8000, host: 8000
config.vm.define "icecast" do |v|
v.vm.provider "docker" do |d|
d.image = "moul/icecast"
d.ports = ["8000:8000"]
d.env = {
# SOURCE_PASSWORD: 'password',
ADMIN_PASSWORD: 'password',
# PASSWORD: 'password',
# RELAY_PASSWORD: 'password'
}
end
end
end
My understanding is that running vagrant up --provider=docker
on OS X will start a VM running boot2docker that will then run my container. Running vagrant docker-logs
seems to confirm that my container is created and the service started, but now I can't for the life of me figure out how to access the service from my OS X host. If I was using a standard VirtualBox provider, I would expect the config.vm.network :forwarded_port
directive to handle the forwarding, but adding that doesn't seem to make any difference.
What do I need to do to be able to access this service from my OS X host?
Update: For reference, here is the image's Dockerfile: https://github.com/moul/docker-icecast/blob/master/Dockerfile