All the code from this blog can be found here: https://github.com/ContainerSolutions/toolset.git
Recently we’ve been playing about with a simple enough web-application that we call ‘Toolset’. The Toolset allows users to run desktop applications by copying and pasting Docker scripts into their terminal. We do this so that people can get used to using Docker. Some people learn by reading, others by following a training course. With toolset you can learn by copying-and-pasting - which is how I learn.
In order to run 'Toolset' locally as if we would in production, we use Docker Compose. To experiment with Docker Compose, you can pull the 'Toolkit' from the repo and run it on your local machine.
git clone https://github.com/ContainerSolutions/toolset.git cd toolset docker-compose up
Now you can navigate to the application through your browser. Click here: http://localhost. If you are using boot2docker on the Mac, you can do the following:
open http://$(boot2docker ip)
Pay attention to the docker-compose.yml file. That's where all the magic happens. Here it is in full:
toolset: build: . ports: - "80:80" volumes: - public:/usr/share/nginx/html
Anyone who reads my blogs knows that I have a (maybe irrational) hatred of configuration. I do it because I have to but my real passion lies in objects and 'growing' code. I get annoyed when I am distracted from that. Being annoyed is not productive. Thus, my theory is that any tools that 'make the machine go away' will help developers to be more productive.
Right. That's enough for now - and anyway there's not much left to say. Pull the repo, or have a look at the video below, and enjoy Docker and Docker Compose.