Skip to content

Remove rules_docker, make multiarch images canonical#13324

Merged
prestonvanloon merged 2 commits intodevelopfrom
rm-rules-docker
Dec 13, 2023
Merged

Remove rules_docker, make multiarch images canonical#13324
prestonvanloon merged 2 commits intodevelopfrom
rm-rules-docker

Conversation

@prestonvanloon
Copy link
Copy Markdown
Member

What type of PR is this?

Feature

What does this PR do? Why is it needed?

The rules_docker repo is no longer maintained. It has been abandoned and functionality has been
fragmented to multiple repos. As of bazel 7.0.0 (#13321), rules_docker will no longer function
without patches. This PR removes rules_docker from the repository and relies on OCI images.

Which issues(s) does this PR fix?

Related issues: #13241, #4900

Other notes for review

@prestonvanloon
Copy link
Copy Markdown
Member Author

Some CI changes are required to support this PR. I'll leave it as a draft until the CI changes have been made.

@prestonvanloon prestonvanloon marked this pull request as ready for review December 13, 2023 19:34
@prestonvanloon prestonvanloon requested a review from a team as a code owner December 13, 2023 19:34
@prestonvanloon prestonvanloon added this pull request to the merge queue Dec 13, 2023
Comment thread WORKSPACE
name = "io_bazel_rules_docker",
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"],
name = "rules_distroless",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rules_docker is deprecated and is no longer supported.

rules_distroless offers some of the functionality that rules_docker supported. Specifically, it replaced the passwd.tar generation in tools/BUILD.bazel

Comment thread WORKSPACE
platforms = [
"linux/amd64",
"linux/arm64",
"linux/arm64/v8",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does the v8 here do?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it's just the long version of arm64. For whatever reason, this image was no longer publishing "linux/arm64" so I had to explicitly set the variant.

Also see: https://github.com/docker-library/official-images#architectures-other-than-amd64

binary = ":beacon-chain",
entrypoint = ["/beacon-chain"],
repository = "gcr.io/prylabs-dev/prysm/beacon-chain",
repository = "gcr.io/prysmaticlabs/prysm/beacon-chain",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't related right? this just fixes the namespace?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is the "make multiarch images canonical" half of the PR.

prysm_image_upload(
name = "push_images",
binary = ":bootnode",
entrypoint = ["/bootnode"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this thing still need visibility? visibility = ["//visibility:private"],

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that isn't necessary for this macro

Merged via the queue into develop with commit 09f3df3 Dec 13, 2023
@prestonvanloon prestonvanloon deleted the rm-rules-docker branch December 13, 2023 23:50
github-merge-queue Bot pushed a commit to matter-labs/zksync-era that referenced this pull request Dec 20, 2023
## What ❔

The canonical images after OffchainLabs/prysm#13324 now multiarch, that
is including Apple Silicon builds.

## Why ❔

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `cargo spellcheck
--cfg=./spellcheck/era.cfg --code 1`.
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.

3 participants