-
Notifications
You must be signed in to change notification settings - Fork 787
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
buildkit: Add support for --mount=type=tmpfs
to allow mounting volatile memory instead of persistent storage.
#3575
buildkit: Add support for --mount=type=tmpfs
to allow mounting volatile memory instead of persistent storage.
#3575
Conversation
--mount=type=tmpfs
to allow mounting volatile memory instead of persistent storage.
We might want to add our own --mount=type=overlay. |
@@ -2400,6 +2400,13 @@ func (b *Builder) runSetupRunMounts(mounts []string, secrets map[string]string, | |||
} | |||
finalMounts = append(finalMounts, *mount) | |||
mountTargets = append(mountTargets, mount.Destination) | |||
case "tmpfs": | |||
mount, err := b.getTmpfsMount(tokens, rootUID, rootGID, processUID, processGID) |
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.
Just curious does this default to tmpcopyup?
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.
@rhatdan No buildah mount does not adds tmpcopyup
during builds by default but we can add it an as option.
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.
Added tmpcopyup
as a new option in separate commit.
Missing Man page changes? |
Less the missing man pages, LGTM |
https://github.com/containers/buildah/blob/main/docs/Containerfile.5.md is not updated about RUN --mount=type=tmpfs . |
8378a2f
to
0bb755d
Compare
Following PR adds supports for buildkit like `--mount=type=tmpfs` which allows end users to mount a chunk of volatile memory instead of a persistent storage device. Signed-off-by: Aditya Rajan <[email protected]>
210242f
to
a0fd279
Compare
@dilyanpalauzov It was already part of https://github.com/containers/buildah/blob/main/docs/buildah-run.1.md but was not supported in |
LGTM |
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.
Code LGTM but a test for tmpcopyup
is missing.
a0fd279
to
3ac8621
Compare
@vrothberg thanks added test for |
LGTM, thank you. Not worth repushing but: the tests are noew in the docs commit. |
Signed-off-by: Aditya Rajan <[email protected]>
Signed-off-by: Aditya Rajan <[email protected]>
3ac8621
to
f1f008a
Compare
@vrothberg thanks for noticing :) fixed. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
Following PR adds supports for buildkit like
--mount=type=tmpfs
whichallows end users to mount a chunk of volatile memory instead of a persistent storage device within container.
Usage
RUN --mount=type=tmpfs,target=/sometarget