Today Codeship will be upgrading our Docker version that runs on the Pro build machines to Docker 1.13. This update could cause some changes to your existing Docker workflows. So let’s take a look at the possible ways this upgrade could affect you.
[Tweet “”Using volumes_from with @Codeship? See how the upgrade to Docker 1.13 might affect you””]
Docker 1.13 contains many new and interesting features, as Laura Frank has already covered in “What’s new in Docker 1.13”. But it also includes one change that’s less talked about, and it could potentially break your build.
If you use the
volumes_from directive with a specified host directory but have not already created the directory you’re attempting to mount, building your Docker images on Codeship Pro will fail. The reason behind this is that Docker after version 1.13 no longer auto-creates missing directories. It was regarded as an unnecessary interference with the host and the behaviour was removed.
Although the change only covers some uses of
volumes_from (where Docker will attempt to bind-mount the declared host directory), we expect this to eventually be changed in other areas of Docker as well. For this reason, we’re now recommending that you ensure the required directories exist prior to mounting any type of volume.
Additionally, you may have noticed deprecation notices around the use of absolute paths for mounting volumes. Although this is not directly related to the Docker 1.13 upgrade, there is still a risk that the directory you’re attempting to mount does not exist, and you can’t necessarily expect to be able to create it yourself in case permissions have changed. So, in addition to always ensuring your mount points exist before mounting them, you should also ensure that you use a relative path to a directory within your project, to keep your containers host independent.
[Tweet “”Codeship Upgrading to Docker 1.13″ via @codeship”]