Ghost Blog on Ubuntu Snappy Core OS

I have Ghost Blog running inside a Snappy VM using these commands:
vagrant init ubuntu/ubuntu-15.04-snappy-core-stable
vagrant up && vagrant ssh

docker pull ghost
docker run -d -p 80:2368 -v /home/ubuntu/blog –name hello-world ghost

  • Mongodb in Docker: numactl --interleave=all explanation
  • .docker/config.json vs .dockercfg
  • How to access webserver running on localhost from a docker container on a network?
  • Selenium tests with dockers or without
  • Allow WordPress write access to Docker mounted folder
  • ADD and COPY to merge the contents of a dir with the one already on the build
  • Now that the blog is running, how can I view it from the outside world?

  • Symfony 3 assets no update
  • Windows Docker in PyCharm - How to locate files on my host computer?
  • Docker caching for travis builds
  • “$ docker build -t docker-whale .” throws an error saying “Some index files failed to download. They have been ignored or old ones used instead.”
  • Customize ONBUILD environment in a dockerfile
  • Docker: Access mysql in docker container using --net=host option from host
  • 2 Solutions collect form web for “Ghost Blog on Ubuntu Snappy Core OS”

    Martin- what do you mean by “outside world”?

    It looks like you started a virtual machine on your development machine using vagrant, and then fired up a docker container on that virtual machine.

    Your docker command publishes the port ghost listens on (2368) to port 80 of the machine that docker is listening on. That is NOT your dev machine though- it is the vagrant virtualbox! This means that on your host machine you cannot run go to localhost to view your blog. (Though, you could ping it from inside the virtualbox using that address…)

    What you need to do is find the IP address of your vagrant virtualbox. SSH in using vagrant ssh. Then run ifconfig and get the IP address of your box. (you’ll need to know a bit here- my vagrant box actually shows this on eth1 instead of eth0)

    You can make this easier in a few ways. You can hard-code an ip address into your vagrantfile…

    ip_address = ""
    Vagrant.configure("2") do |config|
  :private_network, ip: ip_address

    Further, you can use the vagrant plugin ‘hostmanager’ to specify a /etc/hosts entry on your machine that will allow you to point your browser at a hardcoded address and vagrant will always point it at the right machine. If you have that installed (vagrant plugin install vagrant-hostmanager)you can modify your vagrantfile with

      config.hostmanager.enabled = true
      config.hostmanager.manage_host = true
      config.vm.define project_name do |node|
        node.vm.hostname = "" :private_network, ip: ip_address
        node.hostmanager.aliases = [ "" ]

    If you actually mean you want your blog to be visible from the public internet, that is not something you want to do on your private computer without a ton of knowledge that you don’t have (or else you wouldn’t need to ask 🙂 ).

    I edited the Vagrantfile and enabled the forwarded port mapping: “forwarded_port”, guest: 80, host: 8080 , then vagrant reload and vagrant ssh, Now I am logged into the Snappy VM, and start ghost again, docker run -d -p 80:2368 -v /home/ubuntu/blog –name test ghost , then do the port mapping: enter : docker port be2f474bb8c9 , which reveals 2368/tcp -> At this point, I was hoping to browse to localhost:8080 and see my ghost blog.
    Thank you both!

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.