4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

client is newer than server (client API version: 1.23, server API version: 1.22) と言われたときに対応する方法

Last updated at Posted at 2016-04-23

Docker swarmを使っていてサーバー側とクライアント側のAPIのバージョンが違う場合に

client is newer than server (client API version: 1.23, server API version: 1.22)

と出力されて動かない場合は、クライアント側のバージョンを環境変数に指定して実行します。

サーバーとクライアントのバージョンが違う状況
$ docker -H 192.168.yy.zz:2378 version
Client:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 18:38:59 2016
 OS/Arch:      linux/amd64

Server:
 Version:      swarm/1.1.0
 API version:  1.22
 Go version:   go1.5
 Git commit:   HEAD
 Built:        <unknown>
 OS/Arch:      linux/arm

上が docker クライアント API Version 1.23
下が docker サーバー(swarm) API Version 1.22
です。

DOCKER_API_VERSIONの環境変数を指定します。
DOCKER_API_VERSION=1.22 docker version

バージョンを環境変数で指定した状況
$ DOCKER_API_VERSION=1.22 docker -H 192.168.yy.zz:2378 version
Client:
 Version:      1.11.0
 API version:  1.22
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 18:38:59 2016
 OS/Arch:      linux/amd64

Server:
 Version:      swarm/1.1.0
 API version:  1.22
 Go version:   go1.5
 Git commit:   HEAD
 Built:        <unknown>
 OS/Arch:      linux/arm

API Version が同じになりました。

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?