Skip to content

hack: Rework+cleanup container build #1295

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cgwalters
Copy link
Collaborator

Main motivation: I was looking at making more changes here

  • Use an idiom I'd like to standardize more of copy context to FROM scratch image which is then mounted and consumed in other phases by mounting. This helps avoid polluting later containers with intermediate copied files.
  • Change build.sh to handle being run from any directory
  • Drop the dev-rootfs stuff as it's weird and awkward; instead we should encourage multi-step builds deriving from this image
  • Don't make bootc.tar.zst only to immediately untar it; just use COPY from the build container
  • Use heredocs to condense multiple RUN invocations to avoid pointless small layers

@cgwalters cgwalters force-pushed the rework-containerfile branch from b9d533b to a5c272b Compare May 2, 2025 15:18
cgwalters added 2 commits May 2, 2025 14:30
Main motivation: I was looking at making more changes here

- Use an idiom I'd like to standardize more of copy context to `FROM scratch` image
  which is then mounted and consumed in other phases by mounting. This helps
  avoid polluting later containers with intermediate copied files.
- Change `build.sh` to handle being run from any directory
- Drop the `dev-rootfs` stuff as it's weird and awkward; instead we should
  encourage multi-step builds deriving from this image
- Don't make `bootc.tar.zst` only to immediately untar it; just use `COPY`
  from the build container
- Use heredocs to condense multiple `RUN` invocations to avoid pointless
  small layers

Signed-off-by: Colin Walters <[email protected]>
So we can use heredocs.

Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters force-pushed the rework-containerfile branch from a5c272b to d126574 Compare May 2, 2025 18:30
@cgwalters
Copy link
Collaborator Author

ERROR Installing to filesystem: Creating ostree deployment: Pulling: Importing: Parsing layer blob sha256:0f299f3f346782473308fd887c25d99af245027c4bf8df55ddf47121b4aa2d36: error: (null): Processing tar: Failed to commit tar: ExitStatus(unix_wait_status(256))

Humm...very confused by this failure

@henrywang
Copy link
Collaborator

.git was added in gitignore, so there's an error fatal: not a git repository (or any of the parent directories): .git and when we do tar -C / --zstd -xvf /tmp/bootc.tar.zst, some of files report tar: ./usr/bin/bootc: implausibly old time stamp -9223372036854775808. That might be the root cause?

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