mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
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>
20 lines
783 B
Docker
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
|