
invisible ink here
Software, Infosec, Open Source, Photography, Speaking, etc…
If you are doing the docker-compose / boot2docker tutorial on the docker site at:
https://docs.docker.com/compose/django/
There are a few typos and items that will stop you, at least on a Mac although I suspect they are an issue on a PC as well. These are my notes, out of context but hopefully they will help someone else having problems with errors and configuration of Django Dockers for their dev environment.
boot2docker up docker-compose up
# the following line runs it in the background docker-compose up -d
To connect the Docker client to the Docker daemon, please set: export DOCKER_HOST=tcp://192.168.59.103:2376
# this tells you your environment variables docker-machine env
http://192.168.59.103:5000/
# The following is incorrect in the docs docker-compose run web python composeexample/manage.py syncdb
Rough notes, but hopefully enough to help you google for more if you are hitting the same wall I did with boot2docker and docker-compose for Django.
Update: also helpfule https://github.com/ambitioninc/container-transform
/Geek Warning – all others flee and hide to avoid boredom./
Boot2Docker is a wrapper that makes working with dockers on a local computer just a bit easier.
That’s the goal. Keep it simple and it works. If we really want to keep it simple we now have kitematic to run docker containers with a GUI.
Plus people in programming mode sometimes get insecure and like to (seriously) debate Vi or Emacs as if those who don’t know it are of a lesser kind. I believe in letting compilers deal with my long select-case/kwargs/collections/dictionaries/whatever you want to call them. Thus I LOVE seeing tools that make programming EASIER. Especially visual ones even though I’m back to preferring the command line.
But back to boot2docker for working with containers locally. On a Mac, it’s nothing most of us haven’t done already with Virtual Box (free) or VMWare (not free but faster than VB) sharing a local folder into the VM. We all do this so we can use our dev tools without even more junk into the VM itself.
Number 1 reason to use it if you use a Mac? It doesn’t make me install homebrew (not a fan – sorry) and mess up the $PATH on my Macs. And Containers are just cleaner than virtualenvs as there are no dependencies, only attached containers. ‘Tis beautiful.
OK, the point of this post – if you are having any problems installing boot2docker on your Mac as I did, first it probably is NOT your fault. OK, well maybe it is because we all like bright shiny things and have a ton of junk installed. For me I would install it and it just would not start up. I found the documentation sort of glazed over a few things. So here you go.
Again – keep it simple and don’t make life complicated like I did. Install the boot2docker app for mac from the site. Install the package for Mac. Then from terminal:
boot2docker init
You only have to run that once. Then from anywhere:
boot2docker up
boot2docker ssh
exit
boot2docker down
Of course you might want to try out some of the exercises after the “boot2docker ssh” line when you are in the environment. Just trying to keep things simple, but no simpler than needed.