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

OCI build from Dockerfile #2280

Merged
merged 26 commits into from
Nov 6, 2023
Merged

OCI build from Dockerfile #2280

merged 26 commits into from
Nov 6, 2023

Conversation

preminger
Copy link
Contributor

Description of the Pull Request (PR):

This PR adds support for building an OCI-SIF from a Dockerfile (build --oci).

This fixes or addresses the following GitHub issues:

@preminger preminger force-pushed the dockerfile-build branch 14 times, most recently from 0f2df5a to ae097d6 Compare October 31, 2023 13:56
Copy link
Member

@dtrudg dtrudg left a comment

Choose a reason for hiding this comment

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

Just starting to look through and note a few things to think about later. Not necessarily any action needed here.

@preminger preminger force-pushed the dockerfile-build branch 5 times, most recently from d9dc068 to 2eb55ab Compare November 1, 2023 16:33
@preminger
Copy link
Contributor Author

preminger commented Nov 1, 2023

Some info that pertains to storage, locking, caches and dbs, etc.:

  • The buildkitd.sock and corresponding buildkitd.lock file get created in /run/buildkit/ (when we run as root) or /run/user/<uid>/buildkit/ (when we run as a regular user).
    • If I understand the workings of /run correctly, local-only lock will work just fine here, since /run is always local anyway.
    • That said, I don't think we should necessarily prohibit a pair of these builds running simultaneously, each launching their own ad-hoc buildkitd & tearing it down when they're done.
    • I'll explore the possibility of adding a PID-based string to the dirnames above (/run/buildkit/ / /run/user/<uid>/buildkit/).
      • ETA: Implemented.

buildkitd's cache, however - which is the part that uses a bolt db - is saved in ${HOME}/.local/share/buildkit when running as a regular user. (/var/lib/buildkit when running as root.)

  • I think it would be possible to modify the code so that it uses /var/tmp for this, if we decide that would be preferable

Copy link
Member

@dtrudg dtrudg left a comment

Choose a reason for hiding this comment

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

Had a pretty good think through what's here, and left a bunch of comments / questions. Looking good to me so far.

@preminger preminger force-pushed the dockerfile-build branch 2 times, most recently from e9b53ac to 5fb36c9 Compare November 6, 2023 14:29
@preminger preminger marked this pull request as ready for review November 6, 2023 14:45
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.

Build from Dockerfile to OCI-SIF (build --oci)
2 participants