Files
hydros/Containerfile
Eriq Taing 04a110c5da
All checks were successful
Build container image / Build and push image (push) Successful in 31m40s
Move systemd into build.sh (#15)
Reviewed-on: #15
Co-authored-by: Eriq Taing <eriq12@protonmail.com>
Co-committed-by: Eriq Taing <eriq12@protonmail.com>
2025-11-01 18:58:55 -04:00

34 lines
907 B
Docker

# Build args
ARG BASE_IMAGE="${BASE_IMAGE_NAME:-quay.io/fedora-ostree-desktops/base-atomic}"
ARG FEDORA_VERSION="${FEDORA_VERSION:-42}"
# Allow build scripts to be referenced without being copied into the final image
FROM scratch AS ctx
COPY ./build_files /
# Hold system files
FROM scratch as system-files
COPY ./system_files /
# Hold key
FROM scratch as key
COPY ./cosign.pub /keys/hydros.pub
# Base Image
FROM ${BASE_IMAGE}:${FEDORA_VERSION}
## build
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=bind,from=key,source=/keys,target=/tmp/keys \
--mount=type=bind,from=system-files,source=/,target=/tmp/sys_files \
--mount=type=cache,dst=/var/cache/ \
--mount=type=cache,dst=/usr/etc/ \
--mount=type=tmpfs,dst=/var/log/ \
--mount=type=tmpfs,dst=/tmp \
/ctx/build.sh
### LINTING
## Verify final image and contents are correct.
RUN bootc container lint