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

Nightly version? #5

Closed
ghotiphud opened this issue Aug 16, 2017 · 13 comments
Closed

Nightly version? #5

ghotiphud opened this issue Aug 16, 2017 · 13 comments

Comments

@ghotiphud
Copy link

I was trying to dockerize a Rocket app, and wanted to use the official Rust Docker image, but it seems there's no nightly?

Also, I'm new to Docker, so I may be mistaken.

@sfackler
Copy link
Member

The Rust installs in the images are managed by rustup, so a simple approach would just be to run rustup update nightly; rustup default nightly; before building. You still have to pay the cost of downloading the full stable toolchain along with the image, though.

The official images have some rules around repeatability of images - not sure if there are exceptions for images intended to be non-repeatable like this one would be.

@yosifkit Is this a thing that's come up before in other images? For some background, Rust publishes nightly builds of the compiler and standard libraries which allow use of unstable functionality which is not available on the standard versioned releases. If we added a "nightly" image, the specific version of the distribution it ended up with would vary across builds every day or so.

@ghotiphud
Copy link
Author

Ah, somehow I didn't think of that approach, I've just done this for now:
https://github.com/ghotiphud/rust-web-starter/blob/51948e2560313405d4e2241075349298421514c0/api_server/Dockerfile

@sfackler
Copy link
Member

Cool - I believe all of the dependencies you're installing are already available on the buildpack image, bu the way: https://github.com/docker-library/buildpack-deps/blob/587934fb063d770d0611e94b57c9dd7a38edf928/stretch/Dockerfile#L3.

@ghotiphud
Copy link
Author

Ha, you're probably right. I was using scorpil/rust:nightly until I had everything actually working.

@yosifkit
Copy link

Any nightly or dev image in the official images would still need to maintain the repeatability aspect. All builds make heavy use of docker build cache so if the RUN line does not change, the image would not change. Base images get updates and cause dependent images to rebuild and we don't want those situations to cause a version bump to the main software of the image. The only other time an image gets built is via a commit in official-images that changes the respective library/ file. eggdrop is one image that has a develop build that they update once in a while (like docker-library/official-images#3051).

There is a related discussion in docker-library/official-images#1281.

@sfackler
Copy link
Member

Thanks @yosifkit, that all makes sense. The option of a rust-lang/rust:nightly rather than rust:nightly is interesting, and might be a good option!

@andre-richter
Copy link
Member

Would also love to see a nightly image. I think the additional rust-lang namespace should not be a problem to for most people, it's just a matter of knowing where to find it.

@sfackler
Copy link
Member

sfackler commented Aug 24, 2017

I've started building this out: https://hub.docker.com/r/sfackler/rust/. It should trigger a rebuild every night. Don't depend on it for anything real yet - I'll be deleting that image when it's moved over to a rust-lang org.

@andre-richter
Copy link
Member

Thanks, appreciate it.

In case you are interested in a use case for using the container locally (also interactively) and caching cargo downloads and builds, kindly have a look my repository where I wrapped around your containers to achieve that:

https://github.com/andre-richter/docker-rust-persistent

@sfackler
Copy link
Member

This is now set up: https://hub.docker.com/r/rustlang/rust/

@amouat
Copy link

amouat commented Apr 9, 2018

Hmm, could this be reopened? Or will this repo never support rust nightly?

I don't really understand the arguments against having it. Wouldn't you just have a script to update the build version each day, so it would still be repeatable?

I'm currently using rustlang/rust, but it's currently blocked and I feel an official image would get better support.

@sfackler
Copy link
Member

sfackler commented Apr 9, 2018

New versions of official images are produced by opening a pull request against https://github.com/docker-library/official-images with a new version of the library manifest file: https://github.com/docker-library/official-images/blob/master/library/rust. They are not going to merge an update very day forever.

@amouat
Copy link

amouat commented Apr 9, 2018

I didn't realise it was so manual. I was figuring this could all be done with bots. Ok, I'll find a workaround.

It just kinda feels like the official image should support nightly.

Thanks for the reply and your work on this anyway.

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