flatcar-scripts/sdk_lib/Dockerfile.sdk-build
Thilo Fromm 433f62c0e0
SDK container: include circular deps pkgs (#2340)
This change builds all packages required to break circular dependencies
and includes these in the SDK image. This way, emerge-<arch> can be used
right away and build_packages only builds packages with production USE
flags.

The change significantly reduces the build time at the cost of a larger
SDK image and longer SDK container build time. Uncompressed:
               Size before       Size after
all arches       7.75GB             9.29GB
arm64            5.7GB              6.58GB
amd64            5.64GB             6.45GB

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2024-09-23 12:20:43 +02:00

20 lines
783 B
Docker

ARG VERSION
FROM flatcar-sdk-import:${VERSION}
ARG BINHOST
ARG OFFICIAL=0
# mark build as official where appropriate
RUN echo "export COREOS_OFFICIAL=$OFFICIAL" > /mnt/host/source/.env
RUN /home/sdk/sdk_entry.sh ./setup_board --board="arm64-usr" --binhost="${BINHOST}/arm64-usr"
RUN /home/sdk/sdk_entry.sh ./setup_board --board="arm64-usr" --regen_configs
RUN /home/sdk/sdk_entry.sh ./build_packages --board="arm64-usr" --only_resolve_circular_deps
RUN /home/sdk/sdk_entry.sh ./setup_board --board="amd64-usr" --binhost="${BINHOST}/amd64-usr"
RUN /home/sdk/sdk_entry.sh ./setup_board --board="amd64-usr" --regen_configs
RUN /home/sdk/sdk_entry.sh ./build_packages --board="amd64-usr" --only_resolve_circular_deps
RUN rm /mnt/host/source/.env
RUN rm -rf /home/sdk/toolchain-pkgs