TL;DR
These days, updating software that we use is very easy. Installation scripts are automated and tested. In this post I will describe the issue caused with docker upgrade and how I analysed issue in order to resolve it.
In one of my previous post, I described how to create docker image for headless selenium chrome testing. And that worked for some time.
Then I needed to upgrade docker from version 1.9.1 to 1.10.2 because of this Docker 1.9.1 hanging at build step “Setting up ca-certificates-java” issue.
After upgrade, Chrome refused to start in docker image.
After I logged in to headless chrome docker container using configuration described in previous post:
>docker-compose run web bash
>google-chrome
>"Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted"
Lets try to downgrade docker. But how to do that? I remembered that every docker machine has docker version:
docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default - virtualbox Running tcp://192.168.99.100:2376 v1.10.2 dev * virtualbox Running tcp://192.168.99.101:2376 v1.9.1
Which means that with docker upgrade, only default machine is automatically upgraded.
So I switched to dev machine:
eval "$(docker-machine env dev)"
And using docker-compose I was able to run again cucumber headless chrome test:
docker-compose run web /bundle/bin/cucumber features/feature_name
One last issue. docker tool was upgraded, so when you run:
docker ps -a
Error response from daemon: client is newer than server (client API version: 1.22, server API version: 1.21)
Here comes docker version manager to the rescue. Install it and run its help:
dvm help
Conclusion
Docker is complex technology, it consists of great number of moving parts. Be very carefull when you decide to upgrade docker, especially when around early versions like 1.10.