Category Archives: boot2docker

Docker CE – Installing Test(“RC”) version

Starting with Docker 17.03, Docker introduced Community edition(CE) and Enterprise edition(CE) version of their Docker software. The release numbering also changed. From Docker 1.13.1, we jump to 17.03 version. Docker CE is the free version while Docker EE is the commercially supported enterprise version. Docker enterprise edition comes in different flavors based on the cost. Please refer this link for details on comparison between different Docker editions and the supported platforms for each editions. Both Docker CE and EE follow time based release schedule. Docker CE has 3 editions. CE “stable” edition gets released once every 3 months. CE “edge” edition gets released once every month. CE “test” edition is a release candidate that gets folded into “edge” and “stable” versions. I have used Docker release candidate(“test” edition) to try out new features before they get released. The steps to install release candidate Docker version is slightly different from installing “stable” and “edge” versions. Docker CE 17.06.0-ce-rc2 got released few days back and I have started trying out the new features in this version. This is a precursor to 17.06 release that will happen in few weeks. In this blog, I will cover installation steps for Docker CE edition release candidate software versions. I have focused on 17.06.0-ce-rc2, but the steps applies to any release candidate versions. The 3 approaches I have tried are installation from Docker static binaries, Docker machine with boot2docker and installation in Ubuntu platform with package manager.

Installation using Docker machine

When Docker RC version is released, the corresponding boot2docker image also gets released. I used the steps below to to the installation.

Continue reading Docker CE – Installing Test(“RC”) version

Advertisements

Compare Docker for Windows options

As part of Dockercon 2017, there was an announcement that Linux containers can run as hyperv container in Windows server. This announcement made me to take a deeper look  into Windows containers. I have worked mostly with Linux containers till now. In Windows, I have mostly used Docker machine or Toolbox till now. I recently tried out other methods to deploy containers in Windows. In this blog, I will cover different methods to run containers in Windows, technical internals on the methods and comparison between the methods. I have also covered Windows Docker base images and my experiences trying the different methods to run Docker containers in Windows. The 3 methods that I am covering are Docker Toolbox/Docker machine, Windows native containers, hyper-v containers.

Docker Toolbox

Docker Toolbox runs Docker engine on top of boot2docker VM image running in Virtualbox hypervisor. We can run Linux containers on top of the Docker engine. I have written few blogs(1, 2) about Docker Toolbox before. We can run Docker Toolbox on any Windows variants.

Windows Native containers

Continue reading Compare Docker for Windows options

Service Discovery and Load balancing Internals in Docker 1.12

Docker 1.12 release has revamped its support for Service Discovery and Load balancing. Prior to 1.12 release, support for Service discovery and Load balancing was pretty primitive in Docker. In this blog, I have covered the internals of Service Discovery and Load balancing in Docker release 1.12. I will cover DNS based load balancing, VIP based load balancing and Routing mesh.

Technology used

Docker service discovery and load balancing uses iptables and ipvs features of Linux kernel. iptables is a packet filtering technology available in Linux kernel. iptables can be used to classify, modify and take decisions based on the packet content. ipvs is a transport level load balancer available in the Linux kernel.

Sample application

Following is the sample application used in this blog:

Continue reading Service Discovery and Load balancing Internals in Docker 1.12

Experimental Docker with Docker machine

Docker Experimental channel is used to release experimental Docker features so that Docker users can try the new features and provide feedback.  It is nice to use the experimental Docker in a test environment rather than upgrading Docker in the main development machine. The preferred approach is to use docker-machine and create a VM with experimental Docker. In this blog, I will describe the approach that I use to create docker-machine with experimental Docker VM. For basics of Docker machine, please refer to my blog on Docker machine.

Following are the steps needed to build the experimental boot2docker ISO and copy it to the docker-machine default location:

git clone https://github.com/boot2docker/boot2docker.git
cd boot2docker
docker build -t my-boot2docker-img -f Dockerfile.experimental .
docker run --rm my-boot2docker-img > boot2docker.iso
mv boot2docker.iso ~/.docker/machine/cache/boot2docker.iso

We need to specify Docker experimental release location in Dockerfile.experimental. In this case, it is https://experimental.docker.com/builds/Linux/x86_64/docker-latest.

Following command will start a Docker machine in Virtualbox with experimental Docker:

docker-machine create -d virtualbox exp

Following is the experimental Docker version running in my host:

$ docker --version
Docker version 1.11.0-dev, build 6c2f438, experimental

Installing custom software in boot2Docker image:
I had a recent usecase where I needed boot2docker to have ipvsadm installed. Package manager is not available in boot2docker. Other than installing ipvsadm, I had to copy few libraries. Following is my boot2docker.experimental file that I used for this usecase:

FROM boot2docker/boot2docker
MAINTAINER Sreenivas Makam ""

#DESCRIPTION use the latest experimental build of Docker

RUN apt-get update && apt-get install -y ipvsadm
RUN cp /sbin/ipvsadm $ROOTFS/sbin/
RUN cp /lib/x86_64-linux-gnu/libnl-genl-3.so.200 /rootfs/lib/libnl-genl-3.so.200
RUN cp /lib/x86_64-linux-gnu/libnl-3.so.200 /rootfs/lib/libnl-3.so.200
RUN cp /lib/x86_64-linux-gnu/libpopt.so.0 /rootfs/lib/libpopt.so.0

#get the latest experimental docker
RUN cd $ROOTFS/usr/local/bin && curl -fL -O https://experimental.docker.com/builds/Linux/x86_64/docker-1.12.0-rc4.tgz && tar -xvzf docker-1.12.0-rc4.tgz --strip-components=1 && chmod +x $ROOTFS/usr/local/bin/docker* && rm docker-1.12.0-rc4.tgz

RUN echo "" >> $ROOTFS/etc/motd
RUN echo "  WARNING: this is an experimental.docker.com build, not a release." >> $ROOTFS/etc/motd
RUN echo "" >> $ROOTFS/etc/motd

RUN /make_iso.sh
CMD ["cat", "boot2docker.iso"]

Issue faced:
I was not able to use custom Docker image with docker-machine version 0.8.0-rc1. I could not find an option to prevent docker-machine from downloading latest Docker image. I have opened an issue here. The only workaround I found was to copy boot2docker image to ~/.docker/machine/cache/ , remove internet connection and then create docker-machine host.

References:

Docker Toolbox

Docker Toolbox simplifies the creation of Docker environment for Windows and Mac. This deprecates boot2docker. Following components are included in Docker Toolbox.

  • Docker Client
  • Docker Machine
  • Docker Compose (Mac only)
  • Docker Kitematic
  • VirtualBox

I recently tried out Docker Toolbox. I had few issues to get it working and after some hiccups, I was able to get it working with some help from mailers. In this blog, I will share my experiences.

Continue reading Docker Toolbox

Docker Kitematic for Windows

Kitematic simplifies Docker installation for Mac and also provides an easy GUI interface to manage Containers. Recently, Kitematic released an alpha version for Windows. I tried this recently and I will share my experiences in this blog.

I had covered boot2docker in 1 of my earlier blog. Kitematic is boot2docker combined with a GUI for managing containers. Kitematic uses the same Linux VM as boot2docker.

Installation:

After registering for Alpha program, I received the download link 1 day later. Kitematic loads a small Linux VM in Virtualbox over which the Container runs. If Virtualbox is not installed, Kitematic installation program also installs Virtualbox. In my case, I already had Virtualbox installed. When I tried installing, I got this issue:

docker9

I had faced similar issue when installing boot2docker. 1 of the workarounds I found by googling was to delete the host-only interface that Virtualbox creates for Kitematic/boot2docker. I already had 6 host-only interfaces created in my Virtualbox. I deleted 4 of them and tried reinstalling Kitematic and the installation went through after that.

The second issue I faced was with running Docker CLI and it complained that Docker client and agent versions did not match.This was because I had boot2docker installed previously in my Windows machine. I uninstalled boot2docker and Docker CLI worked fine after that.

Kitematic Networking:

Continue reading Docker Kitematic for Windows

Docker hands-on with boot2docker

This blog is part of my Docker series. In my previous blog, I covered installation and usage of Docker on Ubuntu Linux. I had installed Ubuntu Linux as a VM inside Virtualbox running in Windows 7. For folks who are interested in trying Docker using a simpler approach on Windows or Mac, boot2docker is an option.

boot2docker:

Docker is supported currently only on Linux kernel. boot2docker is a tiny distribution of Linux on top of which Docker is installed. Installing boot2docker on Windows would allow us to run Docker on Windows machine. Actually boot2docker runs as a VM on top of Virtualbox. During installation, an option is given to install Virtualbox along with boot2docker. If you have Virtualbox already installed, you can select installation of only boot2docker, otherwise you can install both together. boot2docker for Windows can be installed from here. It does not make much sense to run boot2docker in Linux since Docker is supported natively in Linux and there will be performance impact of running boot2docker in a VM under Linux. Infact, I did not seen an option to install boot2docker under Linux.

Continue reading Docker hands-on with boot2docker