Give Codeship’s CI/CD Platform a Try

Want to learn more?

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.

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.

Subscribe via Email

Over 60,000 people from companies like Netflix, Apple, Spotify and O'Reilly are reading our articles. Subscribe to receive a weekly newsletter with articles around Continuous Integration, Docker, and software development best practices.

We promise that we won't spam you. You can unsubscribe any time.

Join the Discussion

Leave us some comments on what you think about this topic or if you like to add something.