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

Downgrade docker installed in Che image #1833

Merged
merged 1 commit into from
Jul 19, 2016

Conversation

l0rd
Copy link
Contributor

@l0rd l0rd commented Jul 18, 2016

What does this PR do?

Use Docker version 1.6 in Che image

What issues does this PR fix or reference?

On a machine with Docker 1.10 or lower Che failed to start in a container.
image

Previous Behavior

image

New Behavior

image

Tests written?

No

Docs requirements?

No

Signed-off-by: Mario Loriedo [email protected]

@codenvy-ci
Copy link

Can one of the admins verify this patch?

@TylerJewell
Copy link

Lgtm

@ghost
Copy link

ghost commented Jul 19, 2016

@l0rd wouldn't it be possible then that client IP version is lower than the one a user might have locally?

@l0rd
Copy link
Contributor Author

l0rd commented Jul 19, 2016

@eivantsov yes that's the goal: docker client version inside the container is lower than docker daemon version on the host. The client does not complain speaking with a daemon that uses a more recent API. And the docker commands we use in the shell scripts works fine.

That's the same solution used by Rancher agent: https://github.com/rancher/rancher/blob/master/agent/Dockerfile#L24. They have the same need that we do (a client inside a container that need to speak to daemons of any version) and they solved it using a Docker client version 1.6.

apk add --update docker openjdk8 sudo bash && \
apk add --update ca-certificates curl openssl openjdk8 sudo bash && \
curl -sL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-$DOCKER_VERSION" \
> /usr/bin/docker; chmod +x /usr/bin/docker && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that > /usr/bin/docker is an ending of previous command should not be moved to a new line.
Also ; chmod +x /usr/bin/docker means skip error of previous step. It is better to use && instead

@l0rd l0rd force-pushed the downgrade-docker-version branch from 1d4924d to 0fb6ebe Compare July 19, 2016 12:41
@l0rd
Copy link
Contributor Author

l0rd commented Jul 19, 2016

@garagatyi I've updated / splitted the curl command

@TylerJewell
Copy link

lgtm +1

@garagatyi
Copy link

LGTM

@l0rd
Copy link
Contributor Author

l0rd commented Jul 19, 2016

We should merge this after #1683

@l0rd l0rd force-pushed the downgrade-docker-version branch from 0fb6ebe to 480fb6d Compare July 19, 2016 13:30
@TylerJewell TylerJewell merged commit 0526577 into eclipse-che:master Jul 19, 2016
@TylerJewell
Copy link

Thanks, @l0rd for the fix.

@TylerJewell TylerJewell added this to the 4.6.0 milestone Jul 22, 2016
@TylerJewell TylerJewell added the kind/bug Outline of a bug - must adhere to the bug report template. label Jul 22, 2016
@bmicklea bmicklea mentioned this pull request Jul 26, 2016
64 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants