diff options
| author | Kyle Gospodnetich <me@kylegospodneti.ch> | 2025-03-22 15:18:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-22 18:18:22 -0400 |
| commit | 4cebc1656fdd3a1f1e06b9e912ffea0028c37f54 (patch) | |
| tree | b7cceb30f1825dbc7c13e069cbd9710e2930f368 /Containerfile | |
| parent | ed7ec5dff8b87c89223056d9f6c231577fe238b6 (diff) | |
| download | AeroCore-OS-4cebc1656fdd3a1f1e06b9e912ffea0028c37f54.tar.gz AeroCore-OS-4cebc1656fdd3a1f1e06b9e912ffea0028c37f54.zip | |
feat: Avoid copying build files into image, add option for linting (#93)
Diffstat (limited to 'Containerfile')
| -rw-r--r-- | Containerfile | 16 |
1 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 |
