Skip to content
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

feat: add support for settings volumes #632

Merged
merged 1 commit into from
Jun 20, 2024
Merged

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Jun 20, 2024

Fixes #406.

@gzm0 gzm0 marked this pull request as ready for review June 20, 2024 06:58
@@ -22,7 +22,7 @@ oci_image_rule = _oci_image
oci_image_index = _oci_image_index
oci_push_rule = _oci_push

def oci_image(name, labels = None, annotations = None, env = None, cmd = None, entrypoint = None, exposed_ports = None, **kwargs):
def oci_image(name, labels = None, annotations = None, env = None, cmd = None, entrypoint = None, exposed_ports = None, volumes = None, **kwargs):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding the naming of the argument (referring to the discussion here: #503 (comment)).

The reference in that comment is about mounts in running containers, not the volume directive in images.

Volumes in images are specified here (and called volumes):
https://github.com/opencontainers/image-spec/blob/main/config.md#properties

Mounts are concrete attachments to paths inside the container (so they need a counterpart path on the host or an actual volume).

Volumes are merely metadata about an image, stating that it stores data there. (docker uses this to automatically create anonymous volumes, I do not know whether this behavior is specified).

@thesayyn thesayyn merged commit 0d90696 into bazel-contrib:2.x Jun 20, 2024
14 checks passed
@thesayyn thesayyn mentioned this pull request Jun 20, 2024
@gzm0 gzm0 deleted the volumes branch June 21, 2024 15:27
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.

2 participants