Building a Docker binary from the source
Docker recently reorganized the Docker Engine and broke it up into different parts. The main parts are runC (https://github.com/opencontainers/runc), containerD (https://containerd.io), and Moby (https://mobyproject.org). Some of these projects were donated to other organizations to maintain. Docker, the product, is now a combination of these different projects.
Sometimes, it is necessary to build a Docker binary from the source to test a patch. It is very easy to build a Docker binary from the source. In order to build one, you will need to use the source code from the Moby project. Follow these steps to build your own binaries.
Getting ready
Follow these prerequisites:
- Download the Moby source code using Git:
$ git clone https://github.com/moby/moby.git
- Install
make
on Ubuntu, like so:
$ apt-get install -y make
- Make sure Docker is running on the host you are building the code and that you can access it through the Docker client, since the...