mirror of
https://github.com/containers/bootc.git
synced 2026-02-06 18:46:25 +01:00
First change `.dockerignore` to be an allowlist. This avoids spurious rebuilds when touching e.g. `tmt/`, and also crucially we don't leak `.git/` into the sources which can easily change as one makes commits/branches. This also requires touching the `hack/` directory which is now fully self contained. While we're here, make clear the roles of Justfile vs Makefile. Remove the `make test`. Signed-off-by: Colin Walters <walters@verbum.org>
39 lines
1.3 KiB
Docker
39 lines
1.3 KiB
Docker
# Build a container image that has extra testing stuff in it, such
|
|
# as nushell, some preset logically bound images, etc. This expects
|
|
# to create an image derived FROM localhost/bootc which was created
|
|
# by the Dockerfile at top.
|
|
|
|
FROM scratch as context
|
|
# We only need this stuff in the initial context
|
|
COPY . /
|
|
|
|
# An intermediate layer which caches the extended RPMS
|
|
FROM localhost/bootc as extended
|
|
# We support e.g. adding cloud-init
|
|
ARG variant=
|
|
# And this layer has additional stuff for testing, such as nushell etc.
|
|
RUN --mount=type=bind,from=context,target=/run/context <<EORUN
|
|
set -xeuo pipefail
|
|
cd /run/context/
|
|
./provision-derived.sh "$variant"
|
|
EORUN
|
|
|
|
# And the configs
|
|
FROM extended
|
|
RUN --mount=type=bind,from=context,target=/run/context <<EORUN
|
|
set -xeuo pipefail
|
|
cd /run/context
|
|
# For test-22-logically-bound-install
|
|
cp -a lbi/usr/. /usr
|
|
for x in curl.container curl-base.image podman.image; do
|
|
ln -s /usr/share/containers/systemd/$x /usr/lib/bootc/bound-images.d/$x
|
|
done
|
|
|
|
# Add some testing kargs into our dev builds
|
|
install -D -t /usr/lib/bootc/kargs.d test-kargs/*
|
|
# Also copy in some default install configs we use for testing
|
|
install -D -t /usr/lib/bootc/install/ install-test-configs/*
|
|
# Finally, test our own linting
|
|
bootc container lint --fatal-warnings
|
|
EORUN
|