From ebeec5aed3cd2c5b1d68bf139385a96fe6795abc Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sun, 25 Oct 2020 15:16:00 -0600 Subject: util/docker: Update coreboot-sdk consolidate coreboot build Because docker saves a container for every run command, by breaking the coreboot build into 3 commands, it greatly increased the size of the docker containers needed. When combined as one run command, the coreboot repo that is downloaded, along with the coreboot test build are deleted before the container is created. Since those directories are deleted in a later run command, they don't even make it into the final container, and just force coreboot-sdk users to download extra data for no reason. While splitting the build may help with debugging failures when creating the docker container, that debugging can be done locally by splitting up a working copy. Signed-off-by: Martin Roth Change-Id: Ia28ee4e22c0a76dc45343755c45678795308adca Reviewed-on: https://review.coreboot.org/c/coreboot/+/46801 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- util/docker/coreboot-sdk/Dockerfile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'util/docker/coreboot-sdk') diff --git a/util/docker/coreboot-sdk/Dockerfile b/util/docker/coreboot-sdk/Dockerfile index 0ae63c8d2c..3946814274 100644 --- a/util/docker/coreboot-sdk/Dockerfile +++ b/util/docker/coreboot-sdk/Dockerfile @@ -84,21 +84,17 @@ RUN \ && ln -s /usr/bin/aclocal /usr/bin/aclocal-1.15 RUN \ - cd /root && \ + cd /tmp && \ git clone https://review.coreboot.org/coreboot && \ cd coreboot && \ - git checkout {{DOCKER_COMMIT}} - -RUN \ + git checkout {{DOCKER_COMMIT}}; \ if echo {{CROSSGCC_PARAM}} | grep -q ^all; then \ - make -C/root/coreboot/util/crossgcc/ build_clang \ + make -C /tmp/coreboot/util/crossgcc/ build_clang \ BUILD_LANGUAGES=c,ada CPUS=$(nproc) DEST=/opt/xgcc; \ - fi - -RUN \ - make -C/root/coreboot/util/crossgcc/ {{CROSSGCC_PARAM}} \ + fi; \ + make -C /tmp/coreboot/util/crossgcc/ {{CROSSGCC_PARAM}} \ BUILD_LANGUAGES=c,ada CPUS=$(nproc) DEST=/opt/xgcc && \ - rm -rf /root/coreboot + rm -rf /tmp/coreboot RUN mkdir /home/coreboot/.ccache && \ chown coreboot:coreboot /home/coreboot/.ccache && \ -- cgit v1.2.3