Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

feature request: bind mounts from the host during build #296

@tummychow

Description

@tummychow

I'd like to be able to bind mount host directories into the ACI before performing acbuild run commands. If I need large files inside the ACI at build time, but not at runtime, I can put those files on the host, then bind mount them into the ACI for acbuild run.

Concrete example: I have a large binary installer (eg for a video game), in the neighborhood of 60GB. If I want to build an ACI for this program, I need to expose the installer to acbuild somehow. But I don't want to acbuild copy the installer into the build context, because 1) that's excruciatingly slow, 2) requires a ton of temporary space on my disk, and 3) I would have to remove it right afterwards to avoid bloating the container. It would be much more convenient to have the binary in a directory on the host, and bind mount that directory into the container for the duration of the single acbuild run command that actually executes the binary.

Another concrete example: I'm running a build process that invokes pacman -Syu, which downloads a bunch of tarballs and puts them in a cache directory. If I have bind mounts, I can bind mount the host's pacman cache into the container before running pacman, and it'll reuse any cached packages that my host already has. This would save bandwidth and download time if I'm rebuilding the container over and over again in an edit-rebuild-run cycle.

Bind mounts look like the obvious solution to me, but I'm open to any other approaches. If it means avoiding a 60GB copy, I'm totally fine with a nasty hack that I can use without waiting for a new feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions