Skip to content

Instantly share code, notes, and snippets.

@kampta
Last active August 23, 2016 17:36
Show Gist options
  • Save kampta/56f5efe50f5ce04ac27a4e4e27a71649 to your computer and use it in GitHub Desktop.
Save kampta/56f5efe50f5ce04ac27a4e4e27a71649 to your computer and use it in GitHub Desktop.
script for docker-machine upgrade, when local driver and remote driver are not in sync (borrowed from https://github.com/docker/machine/issues/3308). I was getting the following error ```Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.23)```
mcn_name=MACHINE_NAME
apt_url='https://apt.dockerproject.org'
lsb_dist='ubuntu'
dist_version='trusty'
arch=$(docker-machine ssh ${mcn_name} dpkg --print-architecture)
repo='main'
docker-machine ssh ${mcn_name} "echo deb [arch=${arch}] ${apt_url}/repo ${lsb_dist}-${dist_version} ${repo} | sudo tee /etc/apt/sources.list.d/docker.list"
docker-machine ssh ${mcn_name} sudo apt-get update
docker-machine ssh ${mcn_name} sudo apt-get install -y docker-engine
docker-machine regenerate-certs ${mcn_name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment