dreamcat4 / docker-images

Dreamcat4's Docker Images (Trusted Builds)
MIT License
159 stars 66 forks source link

report version compatibility issue on docker engine 1.7.1 #19

Closed larrycai closed 8 years ago

larrycai commented 8 years ago

new here.

It works fine in latest docker engine 1.10.x and docker compose 1.6.x (Windows DockerToolbox).

While when I use it "prod" env where docker engine 1.7.1 is used (I can't upgrade so far), no matter which version of docker-compose is used, it always reports

pipework_1 | Error response from daemon: client is newer than server (client API version: 1.21, server API version: 1.19)

Here is env

$ docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d
OS/Arch (server): linux/amd64

I tried for docker-compose 1.5.2/1.5.1/1.4.2, also tried with env COMPOSE_API_VERSION, it always reports this fault.

Also noticed it is not related with docker-compose

$ docker run -v /var/run/docker.sock:/docker.sock --privileged=true --pid=host --net=host   dreamcat4/pipework --help
Error response from daemon: client is newer than server (client API version: 1.21, server API version: 1.19)
error: can't connect to unix:///docker.sock

Do you have any suggestion ? (old docker image ?)

larrycai commented 8 years ago

Further I tried to use host docker binary (shall be recommended ??) with

docker run -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/docker.sock --privileged=true --pid=host --net=host   dreamcat4/pipework --help 

Then it reports

mkdir: cannot create directory '/sys/fs/cgroup': No such file or directory
mount: mount point /sys/fs/cgroup does not exist
Could not make a tmpfs mount. Did you use -privileged?

No clue how to go further

dreamcat4 commented 8 years ago

Hi. That last error msg is not expected from this issue. Like its not using privileged mode for some other reason in your prod environement.

Aparrently dreamcat4/pipework:1.1.3 runs docker v1.7.1. So Either use that, or rebuild the newest version yourself from master for a latest pipework image on docker v1.7.1.

See other issue 17

larrycai commented 8 years ago

Yes as you said, the later error message about cgroups is related with the configuration on my docker host (redhat6.5)

tag 1.1.3 works as well in my local docker toolbox environment.

Thx,

dreamcat4 commented 8 years ago

Ok glad to hear it.

larrycai commented 8 years ago

just add comments on how to rebuild for the 1.7.1 version, you need to change the Dockerfile

apt-get install -qqy lxc-docker-1.7.1
dreamcat4 commented 8 years ago

Ah ok. Maybe I could do that after taking your PR on master? (ie start building both versions).

dreamcat4 commented 8 years ago

Or if you prefer, I would more appreciate you to fork my project, and start building the 1.7.1 variant for everybody. Since I dont plan on adding any new features anymore.

larrycai commented 8 years ago

so far, what I did

  1. fork and raise the PR #21 to fix issue #20
  2. have separate branch 1.7.1 to have different Dockerfile
  3. auto build the docker image larrycai/pipework:1.7.1

The best way I suggest to have separate branch for 1.7.1 with modified Dockerfile in your repo as well, then you can build two version easily.

u2u

dreamcat4 commented 8 years ago

OK @larrycai. What I'm going to do is direct users to your 1.7.1 image instead. Because that is simpler and your work here is competent / very good.