ruebenramirez / blog

My blog
http://blog.ruebenramirez.com/
7 stars 0 forks source link

using vagrant for docker on mac #148

Open ruebenramirez opened 9 years ago

ruebenramirez commented 9 years ago
ruebenramirez commented 9 years ago
ruebenramirez commented 9 years ago

vagrant docker:

ruebenramirez commented 9 years ago

docker logs from vagrant: vagrant docker-logs

source: https://docs.vagrantup.com/v2/docker/commands.html

ruebenramirez commented 9 years ago

Sample Vagrantfile builds and then runs this container with these build/run arguments:

Vagrant.configure("2") do |config|
  config.vm.provider "docker" do |d|
    d.build_dir = "."
    d.name = "myapp"
    d.create_args = ["-t"]
    d.expose = ["5004"]
    d.ports = ["8181:5004"]
  end
  config.vm.network :forwarded_port, guest: 8181, host: 8181
end

this still doesn't appear to be forwarding the 8181 b2d port to the host machine. I tried http://127.0.0.1:8181 and http://localhost:8181, and neither are working yet

ruebenramirez commented 9 years ago

http://www.maori.geek.nz/post/vagrant_with_docker_how_to_set_up_postgres_elasticsearch_and_redis_on_mac_os_x