-
Notifications
You must be signed in to change notification settings - Fork 691
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
Update distroless dependencies #1655
Conversation
It's been over a year since they were updated. For Java at least, many security updates in that time. I had to manually skip static and debian9 in the update_deps.sh script, as they failed on https://gcr.io/v2/distroless/static/manifests/debug { errors: [ { code: "MANIFEST_UNKNOWN", message: "Failed to fetch "debug" from request "/v2/distroless/static/manifests/debug"." } ] }
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dhalperi The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hmm. this changes ~the exact same files as #480, yet the tests fail. Not yet able to figure out why. |
@smukherj1 @alex1545 - GitHub seems to have assigned you as reviewers. Any suggestions? |
python3/python3.bzl
Outdated
# "gcr.io/distroless/python3:latest" circa 2019-10-11 13:46 -0400 | ||
"latest": "sha256:de110a5eb0edb950dc4653ae0288f530b8c2af77e44d9bebab117ed0b74d5426", | ||
# "gcr.io/distroless/python3:debug" circa 2020-10-19 11:55 -0700 | ||
"debug": "sha256:1d992aa6631cacd44746d5d2915b21ad93869cfb2519f90bd516a244b528b6fe", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like one of these is problematic. Try manually reverting the changes in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I reran the script completely and it now is reporting errors for both python and go containers :).The errors is non-deterministic, based on which CI step you look at -- which means it may also have messed up any others, but Bazel is reporting the first error.
Locally, I also get errors for cc_image
:
ERROR: /Users/dan/rules_docker/tests/container/rust/BUILD:20:11: //tests/container/rust:rust_image depends on @cc_image_base//image:image in repository @cc_image_base which failed to fetch. no such package '@cc_image_base//image': SHA256 of the image specified does not match SHA256 of the pulled image. Expected sha256:ac75dbf0b249e5e3758134458d447bfd6a85d74c262ecb7cd88df68a3f53c6e3, but pulled image with sha256:c4014bdecaede16f767f8cfc496f968736bc08632bf54a37c004820e85cd8209. It is possible that you have a pin to a manifest list which points to another image, if so, change the pin to point at the actual Docker image
Do you know what the pin it's talking about refers to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Playing around:
$ ~/go/bin/crane digest gcr.io/distroless/cc:latest
2020/10/30 13:17:44 No matching credentials were found, falling back on anonymous
sha256:ac75dbf0b249e5e3758134458d447bfd6a85d74c262ecb7cd88df68a3f53c6e3
$ ~/go/bin/crane manifest gcr.io/distroless/cc:latest
2020/10/30 13:15:34 No matching credentials were found, falling back on anonymous
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 947,
"digest": "sha256:c4014bdecaede16f767f8cfc496f968736bc08632bf54a37c004820e85cd8209",
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 947,
"digest": "sha256:ec7bfcbba262708761909c65c9d26358a1785b849bf32507fa785ddaed77e9bd",
"platform": {
"architecture": "arm64",
"os": "linux"
}
}
]
}%
So I can see where both the shas in the error are coming from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing that google/go-containerregistry#625 is related.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, and duh, I have confirmed that the sha256sum of the manifest is the string returned by crane digest
:
$ ~/go/bin/crane manifest gcr.io/distroless/cc:latest | sha256sum
2020/10/30 13:44:37 No matching credentials were found, falling back on anonymous
ac75dbf0b249e5e3758134458d447bfd6a85d74c262ecb7cd88df68a3f53c6e3 -
This is error-prone: relies on me copying the right latest into the right sha, the right debug into the right sha.
Figured out how to fix update_deps, will send another PR. |
It's been over a year since they were updated. For Java at least, many security updates in that time.
I had to manually skip static and debian9 in the update_deps.sh script, as they
failed on https://gcr.io/v2/distroless/static/manifests/debug
This change is