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: Preinstall git in released docker image #2620

Merged
merged 1 commit into from
May 20, 2016
Merged

Docker: Preinstall git in released docker image #2620

merged 1 commit into from
May 20, 2016

Conversation

splattael
Copy link
Contributor

This is a fix for 4f7d5bc which installed git in the wrong image (head).

See #2615

@jhass
Copy link
Member

jhass commented May 19, 2016

Why not in both?

@splattael
Copy link
Contributor Author

Is git really needed in the head image? If so, I'll happily add it.
BTW, what is head actually used for?

@jhass
Copy link
Member

jhass commented May 20, 2016

I don't even know what the release image is really used for, but I imagine similar things for both.

@splattael
Copy link
Contributor Author

splattael commented May 20, 2016

I'm trying to use the release image (built by Dockerfile.release and pushed to crystallang/crystal:0.x.x) on our GitLab CI. I think that's a common use-case. Here, git is useful to use shards.

I suppose that the head images (built by Dockerfile) is used to build crystal itself??
If so, you don't need git there.

Just guessing... 8-)

@jhass
Copy link
Member

jhass commented May 20, 2016

The official release packages are built from crystal-lang/omnibus-crystal. Travis CI support uses the debian packages built by omnibus, as well as the nightly packages built by my fork of the omnibus project. Crystals own Travis CI setup uses the images from jhass/crystal-build-docker.

@splattael
Copy link
Contributor Author

@jhass Thank you for the explanations!

Last question, how are images on docker.io built?
https://hub.docker.com/r/crystallang/crystal/~/dockerfile/ states a Dockerfile which includes llvm.

Running crystallang/crystal:0.17.2 show that it does not contain llvm:

$ docker run -it crystallang/crystal:0.17.2 ls /opt
crystal

Running crystallang/crystal:head DOES contain llvm:

$ docker run -it crystallang/crystal:head ls /opt
crystal  crystal-head  llvm-3.5.0-1

My conclusion, Dockerfile builds head. Dockerfile.release build release images 0.x.x.

I hope I'm right %-)

@asterite
Copy link
Member

@splattael That's exactly right. I think head is built automatically. We manually use Dockerfile.release to create images after each release. But I don't know much about all this, I just run some scripts @waj gave me 😊 (he used to do that, but since I do the part related to omnibus it's better if I do it too so we don't forget to do it). I guess it's OK for git to be in both images because you'll likely want to use shards.

This is a follow-up to 4f7d5bc which installed git only in "head" docker image.

This commit adds git also to the release docker images.
@splattael
Copy link
Contributor Author

@jhass @asterite Ok, got it!

I've added git to Dockerfile.release, so git is now available in head and 0.x.x docker images 💃

PR is rebased.

@jhass jhass merged commit 6909d79 into crystal-lang:master May 20, 2016
@jhass
Copy link
Member

jhass commented May 20, 2016

Thanks!

@splattael splattael deleted the docker-git branch May 20, 2016 17:09
@splattael
Copy link
Contributor Author

💚

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

Successfully merging this pull request may close these issues.

None yet

3 participants