Switching to Alpine from BusyBox

Contents General I have used Progrium’s excellent BusyBox image as the base of my minicontainers for quite some time. Recently it seems that the upstream changes cause all the packages installed with the opkg package manager it uses to fail as OpenWRT switched to musl. Easiest way forward is to switch to using Alpine as it also has a minimal size. Package manager Alpine uses uses apk as the package management tool instead of opkg that progrium’s BusyBox image used. It seems that apk package are maintained quite well and all the packages I have needed so far are there. ...

July 20, 2015 · 2 min · Ilkka Anttonen

Docker Swarm and experimental multihost networking with docker-machine and boot2docker

Contents General After getting the [overlay networking to work with Docker experimental and docker-machine locally using boot2docker]({% post_url 2015-07-14-docker-multihost-networking-using-overlay-driver-with-docker-machine-and-boot2docker %}), I wanted to get Docker Swarm to work with overlay network as described in Docker’s blog. There were some differences in setting the system up when compared to running it on Digital Ocean like in their example, but with some tweaking the example works. The idea is that first you create a node for running Consul and then a swarm master and one or multiple swarm nodes that run the containers. As all the nodes are configured to use overlay networking by default, the created containers can directly talk to each other without any extra tweaking. ...

July 15, 2015 · 5 min · Ilkka Anttonen

Docker multihost networking using overlay driver with docker-machine and boot2docker

Contents General After getting [boot2docker to work with the Docker experimental version]({% post_url 2015-07-02-using-docker-18-experimental-with-docker-machine-and-virtualbox-driver-boot2docker %}) I wanted to try overlay networking between different hosts. The blog posts on Docker repository are getting better, but still I encountered a few issues before getting things to work locally using boot2docker instead of the Digital Ocean they use as example. This article expects that the Docker experimental command line version has been installed locally. ...

July 14, 2015 · 4 min · Ilkka Anttonen

Using Docker 1.10 experimental with docker-machine and VirtualBox driver (boot2docker)

Contents Update on 20.11.2015 New experimental version is 1.10. The image can be found from here. Major experimental thing is the user namespaces. Update on 27.8.2015 I ran the build for newest experimental and the image for boot2docker for experimental 1.9 can be found from here. I updated the examples to use 1.9. The post can be found from both URLs. TL;DR To use boot2docker.iso which includes the 1.10 experimental Docker (at the moment Docker version 1.10.0-dev, build 0cdc96c, experimental), create the machine with ...

July 2, 2015 · 3 min · Ilkka Anttonen

Elasticsearch, Logstash, Kibana (ELK-stack) and Logspout on Docker

Contents Update on 20th of July 2015! As the BusyBox image’s package manager opkg [doesn’t work anymore I have switched to using Alpine instead]({% post_url 2015-07-20-switching-to-alpine-from-busybox %}). The example images and commands have been updated. At the same time the Dockerfiles have been modularized to help update the tool versions. Note As versions of the tools have changed considerably from the time of the [original blog post]({% post_url 2014-12-29-logstash-and-logspout-on-docker %}), I decided to republish this instead of updating the old post. Now the tool versions are: ...

June 26, 2015 · 5 min · Ilkka Anttonen

'Meteor example with CoffeeScript, Stylus and Jade'

Contents General I have been checking out Meteor periodically since about version 0.5. It was officially bumped to version 1.0 a while a go and is now at 1.1.0.2, so I decided that now it’s a good time to see how mature it is. While playing around with it in the past I’ve usually used CoffeeScript which is easily done as Meteor has a good package management system and CoffeeScript was a native package. Same goes with Stylus. Changing the HTML templating engine used to be harder, but now packages can also be used for that and I like the Jade syntax, which is very concise, better than SpaceBars syntax that is the default for Meteor. ...

June 17, 2015 · 4 min · Ilkka Anttonen

Using HAProxy and Consul for dynamic service discovery on Docker

Contents Update on 20th of July 2015! As the BusyBox image’s package manager opkg [doesn’t work anymore I have switched to using Alpine instead]({% post_url 2015-07-20-switching-to-alpine-from-busybox %}). The example images and commands have been updated. Update on 7th of October 2015! Updated the example commands as the image has later been modified. (Thanks Robert for the heads up) General As I have been using Docker more I have started going towards simpler, stand alone containers. This aligns well with the current rise of microservices. To effectively use microservices a mechanism for service registration and discovery is needed so that the benefits of easy scaling can be realized. ...

May 18, 2015 · 8 min · Ilkka Anttonen

Spring Boot with Scala on Docker using Gradle

Contents General I started experimenting with building containers using Gradle as part of a development cycle with minimum duration feedback cycle and maximum portability for Microservices. I’ll write a bit more about that later, but thought that documenting this process of creating and publishing a container would be useful. At the same time I wanted to combine Spring Boot and Scala, so this also acts as an example for that. ...

April 8, 2015 · 3 min · Ilkka Anttonen

Setting up a new Mac

This post outlines how to set up a new OS X Yosemite with sane default dotfiles and basic applications. Dotfiles are heavily influenced by Mathias Bynes. Install brew 1 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Install brewdler Updated on 9.3.2015 1 brew tap Homebrew/brewdler Clone dotfiles 1 git clone https://github.com/SirIle/dotfiles.git ~/.dotfiles Run brewdler 1 2 cd .dotfiles brew brewdle Run RCM 1 2 rcup rcrc rcup -f Make GNU bash default shell 1 2 echo "/usr/local/bin/bash" | sudo tee -a /etc/shells chsh -s /usr/local/bin/bash Install NPM as non-root 1 2 echo prefix=~/.node >> ~/.npmrc curl -L https://www.npmjs.org/install.sh | sh Add a ~/.extra to contain non-github stuff 1 2 3 4 5 6 7 8 9 # Git credentials # Not in the repository, to prevent people from accidentally committing under my name GIT_AUTHOR_NAME="Ilkka Anttonen" GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" git config --global user.name "$GIT_AUTHOR_NAME" GIT_AUTHOR_EMAIL="ilkka.anttonen@accenture.com" GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" git config --global user.email "$GIT_AUTHOR_EMAIL" git config --global credential.helper osxkeychain

January 26, 2015 · 1 min · Ilkka Anttonen

Dockerfile and container image size

General As I was creating a [minicontainer (minibox)]({% post_url 2014-12-31-fat-containers-microcontainers-and-minicontainers %}) (container that is based on BusyBox, but still contains everything that is needed to run as standalone without the need to use volume containers) I noticed that the resulting containers were way larger than they should have been. I only started paying attention to this as I was trying to create as small a container as possible. After inspecting the resulting image with docker history I noticed that the steps that were executed while installing packages, like having the file downloaded, unpacked using gunzip and after that unpacked using tar all left a large intermediate container in the history. ...

January 1, 2015 · 5 min · Ilkka Anttonen