Skip to content

Commit

Permalink
import oci archive from root
Browse files Browse the repository at this point in the history
  • Loading branch information
korewaChino committed Oct 6, 2024
1 parent 58de0e3 commit 9bf1863
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions base-standalone/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ RUN --mount=type=cache,target=/var/cache \

RUN \
--mount=type=cache,target=/cache \
--mount=type=bind,rw=true,src=/var/tmp,dst=/buildcontext,bind-propagation=shared \
--mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \
rpm-ostree compose image \
--cachedir=/cache \
--format=ociarchive \
--initialize \
out/base/0.yaml /buildcontext/out.ociarchive


FROM oci-archive:/var/tmp/out.ociarchive
# Please build from the root directory of the repository

FROM oci-archive:./base-standalone/out.ociarchive
# Need to reference builder here to force ordering. But since we have to run
# something anyway, we might as well cleanup after ourselves.
RUN --mount=type=bind,from=builder,src=/var/tmp,target=/var/tmp --mount=type=bind,rw=true,src=/var/tmp,dst=/buildcontext,bind-propagation=shared rm /buildcontext/out.ociarchive
RUN --mount=type=bind,from=builder,src=.,target=/var/tmp --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared rm /buildcontext/out.ociarchive

5 changes: 3 additions & 2 deletions base-standalone/justfile → justfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@
# build-tree variant: prep (compile variant) (compose-tree variant)
# build-image variant: prep (compile variant) (compose-image variant)

image_name := "ghcr.io/ultramarine/base-standalone-bootc"

build:
sudo podman build --security-opt=label=disable --cap-add=all --device /dev/fuse -t ultramarine-base-artifact .
build-base-standalone:
sudo podman build --security-opt=label=disable --cap-add=all --device /dev/fuse -t {{image_name}} base-standalone



Expand Down

0 comments on commit 9bf1863

Please sign in to comment.