Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker::Image broken on docker v0.8.0 #83

Closed
svenfuchs opened this issue Feb 9, 2014 · 10 comments
Closed

Docker::Image broken on docker v0.8.0 #83

svenfuchs opened this issue Feb 9, 2014 · 10 comments

Comments

@svenfuchs
Copy link

The latest Docker version seems to ship a broken v1.6 API: /images/json returns empty ID values.

Using v1.7 seems to fix this, at least for Docker::Image.

Maybe it would make sense to test against different Docker versions on Travis CI?

$ docker -v
Docker version 0.8.0, build cc3a8c8

$ curl http://localhost:4243/v1.6/images/json
[{"Created":1384460541,"ID":"","Repository":"travis","Size":0,"Tag":"ruby","VirtualSize":4847453689}]
@bfulton
Copy link
Contributor

bfulton commented Feb 10, 2014

We're using vcr to record interactions with a single version of Docker then replaying during the Travis CI build. Depending on speed, testing against a real Docker Remote API and multiple versions could be a great direction. What is the state of Travis support for Docker? If it's there, can it be made to work with the build matrix feature?

@svenfuchs
Copy link
Author

Ah, yeah, using vcr of course makes sense, too, especially since API payloads won't change for any released verison of Docker. You could still apply the same for a matrix of different docker versions to run against.

The basic idea is to make your test suite depend on an env var like DOCKER_VERSION and either

  • run against that Docker version live or
  • run against vcr cassettes recorded for that Docker version

If you don't want to record vcr cassettes for different Docker versions then you could install the required Docker version in a before_script on Travis CI, something like sudo apt-get update; sudo apt-get install lxc-docker-$DOCKER_VERSION.

Since you already have vcr in place I'd personally probably go for the pre-recorded approach for ease of development though.

Does that make sense?

@bfulton
Copy link
Contributor

bfulton commented Feb 10, 2014

Yes, great feedback, thanks.

In the short term, we should upgrade our Remote API version, preferably to 1.8. That solved the equivalent issue for docker-py.

I like the idea of continuing to use vcr for the DOCKER_VERSION that we're developing against, and trying out live Docker on Travis CI for different values. Created #84.

Depending on how that goes, we could eventually look at whether vcr is still necessary.

@svenfuchs
Copy link
Author

@bfulton Awesome, sounds great. Please let us know if there's anything we can help with.

❤️

@logicminds
Copy link
Contributor

Note that api version 1.9 is available in Docker 0.8. Do we have any expected timeline for completing this API upgrade?

@bfulton
Copy link
Contributor

bfulton commented Feb 11, 2014

Understood. Since 1.8 is listed as latest stable, we'll target that now. ETA for released upgrade is this week.

@janstenpickle
Copy link

I have a fork where I'm trying to get api version 1.9 to work with all the tests. It seems 0.8 is a pretty buggy release, as a number of things don't seem to work. I've encountered a couple of bugs already: moby/moby/issues/4099 and moby/moby/issues/1141.

Looks like we may have to wait for 0.8.1 for some of these things to be fixed.

@nahiluhmot
Copy link
Contributor

This should be fixed with this pull.

@janstenpickle
Copy link

Awesome, beat me to it! 😄

@nahiluhmot
Copy link
Contributor

Tested against live docker, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants