continuous-integration icon indicating copy to clipboard operation
continuous-integration copied to clipboard

Bazel CI Release Process should build and publish Bazel docker containers

Open philwo opened this issue 3 years ago • 17 comments

The current Bazel Docker containers are being built by the RBE toolchains team, but they asked us to take this on.

We should setup some tooling and a pipeline (?) to regularly automatically build current Bazel containers for all released versions.

philwo avatar Nov 16 '20 14:11 philwo

@philwo Hello, any news here? This is still blocking us on smoothly upgrading Bazel past 3.5.

kevingessner avatar Jan 19 '21 16:01 kevingessner

@kevingessner Not yet, sorry :( But this is really important to me and I'll get to it as soon as I can, promised!

philwo avatar Jan 25 '21 10:01 philwo

Any updates on this?

EdSchouten avatar Mar 20 '21 15:03 EdSchouten

I'm all for automating this, but for now can we get a manually built image pushed

chasain avatar Jun 01 '21 16:06 chasain

Friendly bump, blocking upgrade from 3.5.0

johanbrandhorst avatar Jul 02 '21 03:07 johanbrandhorst

This is still an issue.

EdSchouten avatar Aug 09 '21 19:08 EdSchouten

Meanwhile, updating the readme with instructions to build it manually would also help!

prawadhwani avatar Oct 06 '21 10:10 prawadhwani

I came across this issue while searching for a docker image that supported bazel 4. I didn't find any, so I made my own and thought I would share.

# Dockerfile
FROM registry.fedoraproject.org/fedora:34

RUN dnf install -y dnf-plugins-core git patch python3 && \
    dnf copr enable -y vbatts/bazel                   && \
    dnf install -y bazel4                             && \
    dnf clean all                                     && \
    rm -rf /var/cache/yum

RUN ln -s /usr/bin/python3 /usr/bin/python

WORKDIR /home/builder

ENTRYPOINT ["bazel"]
$ docker build .
...
Successfully built <container-id>
$ docker run <container-id> --version
bazel 4.2.1

lbhdc avatar Oct 16 '21 20:10 lbhdc

@philwo This is actually more critical than ever. The base image used to build the latest container is using ubuntu 16.04 which as of April 30th is now EOL. This is a security issue now.

I've also experienced CA failures due to the wildly out of date base image.

QuantamHD avatar Oct 26 '21 13:10 QuantamHD

It has been almost a year. Seems a bit long for a P1? Should it be now bumped to P0 to help prioritization?

I came here after updating rules_python to 0.5.0. It mentions Bazel 4 is now the LTS version. I suppose P0 might make sense?

dayfine avatar Oct 30 '21 18:10 dayfine

Any updates here?

ScarletFlash avatar Nov 16 '21 18:11 ScarletFlash

@ScarletFlash I'm not on or affiliated with the Bazel team, but I reached out to one of my contacts inside Google to help get this prioritized.

QuantamHD avatar Nov 16 '21 19:11 QuantamHD

I talked with @alexeagle about this last week who wanted to help me out (thanks!!). Alex, do you already have a Dockerfile that I could try?

philwo avatar Nov 24 '21 16:11 philwo

@philwo Alex asked if I could come up with a Dockerfile for this. How about https://github.com/bazelbuild/continuous-integration/pull/1290?

f0rmiga avatar Dec 14 '21 03:12 f0rmiga

According to this thread the current bazel image is based on the GoogleCloudPlatform/container-definitions repository. Can someone double confirm that is the case? Perhaps this is related to @philwo's initial comment on this thread about the RBE toolchains team giving up control. I'm simply trying to find the code that was used to build the current image.

davidvandebunte avatar Jan 09 '22 01:01 davidvandebunte

Maybe this could be manually updated for Bazel 5.0?

iangudger avatar Mar 25 '22 00:03 iangudger

Potential workaround is to use the cockroach db bazel images https://hub.docker.com/r/cockroachdb/bazel/tags

abhillman avatar Sep 29 '22 02:09 abhillman

Hey - we have bazel images published by Chainguard here at cgr.dev/chainguard/bazel! Feel free to try them out.

dlorenc avatar Dec 18 '22 20:12 dlorenc

I'm closing this one since bazel docker images are already published to gcr.io/bazel-public/bazel for every new Bazel version

meteorcloudy avatar Dec 21 '22 07:12 meteorcloudy

I'm closing this one since bazel docker images are already published to gcr.io/bazel-public/bazel for every new Bazel version

@meteorcloudy could/should that info be added to the bazel docs? it is not very discoverable.

yogurtearl avatar Jan 02 '23 17:01 yogurtearl

@yogurtearl SGTM, sent https://github.com/bazelbuild/bazel/pull/17113

We also have documentation in our release process: https://github.com/bazelbuild/continuous-integration/blob/master/docs/release-playbook.md#push-new-docker-image

meteorcloudy avatar Jan 03 '23 07:01 meteorcloudy