rust-lang / docker-rust

The official Docker images for Rust
441 stars 90 forks source link

Provide beta images #14

Open mzabaluev opened 6 years ago

mzabaluev commented 6 years ago

It would be nice to have an official repository of up-to-date Rust beta images, to complete the rustup-like trifecta for automated CI runs and the like.

sfackler commented 6 years ago

Seems reasonable to me!

marcelbuesing commented 6 years ago

I think it would be great to have beta images. Would make sense to update to the current version. Given the frequency of beta updates I assume even some automation would make sense otherwise it's probably outdated within a couple of days, weeks.

TimDiekmann commented 5 years ago

I did some tests for all three toolchains, fully automated:

Three jobs:

First of all, it pulls the current image:

docker pull $REPOSITORY/$IMAGE_NAME:$TOOLCHAIN || true

then the current version is determined:

RUSTC_PULLED=$(docker run $REPOSITORY/$IMAGE_NAME:$TOOLCHAIN rustc --version || true)

Now the new image is generated:

- docker build --rm -t$REPOSITORY/$IMAGE_NAME --build-arg TOOLCHAIN=$TOOLCHAIN .
- RUSTC_GENERATED=$(docker run $REPOSITORY/$IMAGE_NAME rustc --version)

The deploy process is locked behind checking the versions to avoid unnecessary deploying:

deploy:
  provider: script
  script:
    - docker push $REPOSITORY/$IMAGE_NAME
  on:
    branch: master
    condition: $RUSTC_PULLED != $RUSTC_GENERATED

before deploying, the tags are generated:

- docker tag $REPOSITORY/$IMAGE_NAME $REPOSITORY/$IMAGE_NAME:$TOOLCHAIN
- if [[ $TOOLCHAIN = beta || $TOOLCHAIN = nightly ]]; then
    docker tag $REPOSITORY/$IMAGE_NAME $REPOSITORY/$IMAGE_NAME:$TOOLCHAIN;
    docker rmi $REPOSITORY/$IMAGE_NAME;
  fi
sfackler commented 5 years ago

These images aren't pushed directly - it's managed through the docker-library/official-images repository.

TimDiekmann commented 5 years ago

Is there a limitation, how often an image can be pushed to the official repo? Is this done with ~/official-images/test/run.sh "$image"?

sfackler commented 5 years ago

It's done by opening a pull request to that repository. For example https://github.com/docker-library/official-images/pull/5048

TimDiekmann commented 5 years ago

Oh, automation would be hard then anyway, right?

tyranron commented 5 years ago

For those who needs beta Rust Docker images, consider to use instrumentisto/rust Docker images. They try to reuse/follow official Rust Docker images as much as possible.

Venryx commented 2 years ago

For those who needs beta Rust Docker images, consider to use instrumentisto/rust Docker images. They try to reuse/follow official Rust Docker images as much as possible.

It's helpful that your group is providing these Docker images publicly (as it makes using the beta versions of Rust easier), but it might be worth clarifying the identity of the instrumentisto GitHub org so that people can trust it more.

I'm a bit hesitant to do so with there being only one user in the organization (publicly visible anyway), and without an explanation text of who they are or what their motivation is for building and releasing these images.

tyranron commented 2 years ago

@Venryx it's not a concrete organization, but more like a team of people which are/were sharing the same job. Projects there are/were created to solve needs for their jobs, and open sourced, because "why not? someone may use out of it" 🙃

As for "publicly visible" members, it's just they don't bother about it. I've found myself being not publicly visible there only few months ago, while participating there for years. It was just an accident that I saw my profile unathenticated, and only then checked settings where participation visibility was assigned private by default. You may check last contributions to projects there, so this way you will see who are actual active members. We very rarely have contributions outside.

If you're still hesitant about it and/or my statement is not enough, then it's okay for me/us too. We're not advocating for ourselves. It's open source by the way.

Venryx commented 2 years ago

@tyranron Ah okay, thanks for the info! That makes sense to check the contribution lists for more details. :)

tgross35 commented 2 years ago

Is the issue here just that it is lacking some sort of automatic composibility? I wonder if there's a project that could be borrowed from.