testcontainers-rs
testcontainers-rs copied to clipboard
Support specifying images using sha256 digests
You can run docker images by specifying the sha256 digest of the designated image instead of using a specific version.
Using sha256 is somewhat more secure as it pins the exact image, thus not allowing possible overriding of a tag by a malicious actor.
Usage can be something along:
impl Image for SomeImage {
type Args = ();
fn name(&self) -> String {
"some name"
}
fn sha256(&self) -> String {
"a826cb8a6a0023..."
}
}
I intend on implementing it (as this can be useful for us), and it will be nice if the project can take part of the current hacktoberfest. Thanks!
I am liking this idea. It would be well in line with the "Reliable" principle in our upcoming "Design principles" draft: https://github.com/testcontainers/testcontainers-rs/pull/420
We would probably have to make it an Option
.
I intend on implementing it (as this can be useful for us), and it will be nice if the project can take part of the current hacktoberfest. Thanks!
I am sorry for getting back to you too late for this to make any sense.
I am liking this idea. It would be well in line with the "Reliable" principle in our upcoming "Design principles" draft: #420
We would probably have to make it an
Option
.I intend on implementing it (as this can be useful for us), and it will be nice if the project can take part of the current hacktoberfest. Thanks!
I am sorry for getting back to you too late for this to make any sense.
Cool, just now saw your comment, will try to implement that tomorrow!
I had created a PR: https://github.com/testcontainers/testcontainers-rs/pull/446