Install config files after buildroot compile

Saves build time when only making minor config changes.

Signed-off-by: Kyle Harding <kyle@balena.io>
This commit is contained in:
Kyle Harding
2022-01-15 14:32:30 -05:00
parent 36eab1586e
commit db9e2c2338
3 changed files with 7 additions and 8 deletions
+7 -4
View File
@@ -1,5 +1,6 @@
#syntax=docker/dockerfile:1.2
# set by buildkit (DOCKER_BUILDKIT=1)
# hadolint ignore=DL3029
FROM --platform=$BUILDPLATFORM debian:bullseye-20211220-slim AS buildroot-base
@@ -42,8 +43,11 @@ FROM buildroot-base as rootfs
WORKDIR /home/br-user/buildroot
# set by buildkit (DOCKER_BUILDKIT=1)
ARG TARGETARCH
ARG TARGETVARIANT
# musl or glibc (musl is smaller)
ARG ROOTFS_LIBC=musl
COPY *.patch ./
@@ -53,12 +57,9 @@ RUN git apply ./*.patch
COPY config ./config
RUN support/kconfig/merge_config.sh -m \
config/common.cfg \
config/arch/"${TARGETARCH}${TARGETVARIANT}".cfg \
config/libc/"${ROOTFS_LIBC}".cfg \
config/unbound.cfg
COPY rootfs_overlay ./rootfs_overlay
config/*.cfg
RUN --mount=type=cache,target=/cache,uid=1000,gid=1000,sharing=private \
make olddefconfig && make source && make
@@ -74,4 +75,6 @@ FROM scratch
COPY --from=rootfs rootfs/ /
COPY --chown=unbound:unbound rootfs_overlay/ /
ENTRYPOINT [ "unbound" ]
-2
View File
@@ -1,2 +0,0 @@
/etc/unbound d 750 unbound unbound - - - - -
/etc/unbound/root.key f 750 unbound unbound - - - - -
-2
View File
@@ -3,6 +3,4 @@ BR2_PACKAGE_BIND_SERVER=n
BR2_PACKAGE_BIND_TOOLS=y
BR2_PACKAGE_UNBOUND=y
BR2_PACKAGE_UNBOUND_DNSCRYPT=y
BR2_ROOTFS_OVERLAY="$(TOPDIR)/rootfs_overlay"
BR2_ROOTFS_USERS_TABLES="$(TOPDIR)/config/users_table.txt"
BR2_ROOTFS_DEVICE_TABLE="$(TOPDIR)/config/device_table.txt"