Open polarathene opened 3 years ago
Yes please, I found this very confusing. I assumed that rustlang/rust
was simply an abbreviated way to refer to the rust
images. My initial confusion came down to: Why is it different? Is it still official? Why don't the official docs mention it?
The README says: "An image tracking the Rust nightly toolchain is available via rustlang/rust:nightly." -- and has said so for the last 6 years. Is this sufficient advice, or do you think it should be mentioned somewhere else too?
The README says do you think it should be mentioned somewhere else too?
Yes... that's the problem. You only see that if you land on the README here on Github.
No where on the DockerHub page for the official image does it mention anything about nightly toolchain (or the alternative image for it). Often Docker users will land on DockerHub when searching for an image, and rarely expect the documentation to differ in any meaningful way at the source (which is not always linked to).
Meanwhile, the nightly image is clear that despite the image name, it's only focused on nightly builds, and references the reader to the official image for anything else. The official image should likewise link to the nightly image for those that need that.
"An image tracking the Rust nightly toolchain is available via rustlang/rust:nightly." -- and has said so for the last 6 years.
I assume I did not see that, nor did the reporter of the issue I referenced :man_shrugging: Perhaps I landed on that issue directly via Google, I don't recall. Either way, requesting a mention on the DockerHub page still seems valid.
Sorry, I re-read what I wrote a year ago and had no idea what I meant. But I think the issue/workflow was: let's say you come at this resource via working on CI. Your CI config has
image: rust:1.56-slim
for MSRV testsimage: rust:1-slim
for latest stable testsYou want to add nightly tests. You know the images follow the pattern rust:<version>-slim
but nightly
doesn't quite fit that pattern. nightly-slim
? 1-nightly-slim
? Welp, off to the last place you saw this pattern documented, the official Docker image page.
Oh, there's no nightly there. But the image page says it's official, and maintained by the Rust project devs, which links to here. So I come here, I read the README. I see there's a rustlang/rust:nightly
. Wait, isn't rustlang/rust
where I just came from?
Turns out, no! It's not! Where I came from was an official Docker image. This new thing (rustlang/rust
) is... not? Where the official image has a Rust logo, and a nice green Docker Official Image tag, this one does not. The original one has no "by" link, but this one does. So... is it the same team or not? Where the official image had a _/
in the URL, this has r/rustlang
. The team page has no description and doesn't contain or link to the official images.
These are the kinds of heuristics that go through my mind when I'm trying to make sure I don't accidentally use a malicious image for CI, or use an out-of-date image, etc. etc. Any little inconsistency is a red flag.
And eventually, yes, going through the code and the docs confirms that this is indeed the "Rust official" image even if it's not a "Rust AND Docker official" image. But it could be clearer I think. Something like:
Images published from this repo
The Docker-official Rust image is probably what you're after if you want a Docker image for testing or deploying Rust programs in a consistent way. It has tags for each stable release, and is has variants for Docker's standard buildpack distro, Debian Slim and Alpine.
(I don't know if this is actually correct!) There are also images published under the
rustlang
community account that provide the nightly toolchain and crater-test images. These are less commonly needed.
...or...
An image tracking the Rust nightly toolchain is available via
rustlang/rust:nightly
. This is officially maintained and kept up-to-date by the same team, but less commonly needed for general development and is therefore not a Docker-official image. It is published under therustlang
community account (is that actually what it is?) .
And then also maybe a liiiiitle more exposition on the Docker team and image pages?
This is not covered on the DockerHub image page.
I came across this issue which mentions
rustlang/rust
and links to the official image. It would be nice to have a mention of preferring that image from the official one as well when interested in the nightly channel.