Docker Swarm container orchestration to be built in to Docker 1.12

After spending some time over the past few days getting up to speed with Docker Compose, one of the major announcements at DockerCon this week so far is that the Compose functionality is to be integrated into the core Docker Engine (rather than being a separate feature as it has been up until now).

If you missed my most recent getting up to speed with Docker posts, here’s a quick recap:

Selecting multiple files in Midnight Commander

At one point file managers like Midnight Commander were the best thing ever. I just came across Midnight Commander on the RetroPie install for managing game roms, and got stuck trying to work out how to select multiple files. Pressing Insert selects/deselects.

There’s a good intro to using MC here.

docker-compose.yml for 1x MongoDB container plus 1x data volume container

I’m starting to dabble with docker-compose to link up some container goodness. If you’ve followed my other Docker related posts the past couple of days (here), then you might have noticed that I have something Raspberry Pi related cooking 🙂

Although I’ll have to redo these with a Pi compatible base images, to get MongoDB running in one container with a separate data volume container is actually pretty simple. Here’s what I ended up with. To start it up, ‘docker-compose up -d’ and you’re up and running (copy this to docker-compose.yml):

mongodata: 
 image: mongo:3.2
 volumes:
 - /data/db
 entrypoint: /bin/bash
mongo: 
 image: mongo:3.2
 volumes_from:
 - mongodata
 ports:
 - "27017:27017"

Docker typical workflow (rough notes)

I’m still scratching the surface getting up to speed with Docker, but here’s some rough notes for what seems to be a typical development workflow.

Build an image (from Dockerfile):

docker build -t imagename .

Run an image (create a container):

docker run -d -p port:port imagename

 

If pushing an image to a local Registry to share to other machines:

Tag an image:

docker tag imagename ip-of-registry:port/imagename

Push image to registry:

docker push ip-of-registry:port/imagename

For my other notes and experiences in Dockerland so far, see here.