Last active
August 23, 2016 17:36
-
-
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)```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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