I’m trying to use this package https://github.com/tonistiigi/buildcache to handle image caching on Ubuntu 14.04 environment.
But running the buildcache program throws an error client is newer than server (client API version: 1.23, server API version: 1.22)
.
I tried updating Docker to 1.10 following the instructions at Docker 1.10.0 is available (Beta), but it seems the API versions for that are also 1.22.
How do I upgrade the API version to 1.23?
Here’s a snippet of my circle.yml
machine
environment:
GODIST: "go1.7.linux-amd64.tar.gz"
post:
# update golang to 1.7, required by tonistiigi/buildcache
- mkdir -p download;
test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST &&
sudo rm -rf /usr/local/go &&
sudo tar -C /usr/local -xzf download/$GODIST;
- go version
- docker version
dependencies:
cache_directories:
- "~/docker"
pre:
- go get github.com/tonistiigi/buildcache/cmd/buildcache
override:
- if [ -e ~/docker/latest_image.tar.gz ]; then
echo "Loading cached latest image...";
docker load -i docker/latest_image.tar.gz;
fi
- if [ -e ~/docker/latest_cache.tar.gz ]; then
echo "Loading latest cache...";
docker load -i docker/latest_cache.tar.gz;
fi
- docker build --rm=false -t my-image backend/main
- mkdir -p ~/docker
- docker save my-image | gzip > ~/docker/latest_image.tar.gz
- sudo `which buildcache` save -o ~/docker/latest_cache.tar.gz my-image
- sudo chown $USER ~/docker/latest_cache.tar.gz