diff options
| -rw-r--r-- | Containerfile | 16 | ||||
| -rwxr-xr-x | build_files/build.sh (renamed from build.sh) | 0 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Containerfile b/Containerfile index 015dfaf..69550ff 100644 --- a/Containerfile +++ b/Containerfile @@ -1,3 +1,8 @@ +# Allow build scripts to be referenced without being copied into the final image +FROM scratch AS ctx +COPY build_files / + +# Base Image FROM ghcr.io/ublue-os/bazzite:stable ## Other possible base images include: @@ -13,11 +18,14 @@ FROM ghcr.io/ublue-os/bazzite:stable ## make modifications desired in your image and install packages by modifying the build.sh script ## the following RUN directive does all the things required to run "build.sh" as recommended. -COPY build.sh /tmp/build.sh - -RUN --mount=type=cache,dst=/var/cache \ +RUN --mount=type=bind,from=ctx,source=/,target=/ctx \ + --mount=type=cache,dst=/var/cache \ --mount=type=cache,dst=/var/log \ --mount=type=tmpfs,dst=/tmp \ - /tmp/build.sh && \ + /ctx/build.sh && \ ostree container commit +### LINTING +## Verify final image and contents are correct. +## This can be quite sensitive, so it's disabled by default. +# RUN bootc container lint
\ No newline at end of file diff --git a/build.sh b/build_files/build.sh index f1e659a..f1e659a 100755 --- a/build.sh +++ b/build_files/build.sh |
