summaryrefslogtreecommitdiff
path: root/util/docker
diff options
context:
space:
mode:
authorMartin Roth <martin@coreboot.org>2020-10-25 15:16:00 -0600
committerPatrick Georgi <pgeorgi@google.com>2020-10-27 10:07:20 +0000
commitebeec5aed3cd2c5b1d68bf139385a96fe6795abc (patch)
tree7c3ccb18f9b70f8aa639470aedb5da15d104274d /util/docker
parentb86d2b09354a5a27dec0e73221ca7b4c794976bd (diff)
downloadcoreboot-ebeec5aed3cd2c5b1d68bf139385a96fe6795abc.tar.xz
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 <martin@coreboot.org> Change-Id: Ia28ee4e22c0a76dc45343755c45678795308adca Reviewed-on: https://review.coreboot.org/c/coreboot/+/46801 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/docker')
-rw-r--r--util/docker/coreboot-sdk/Dockerfile16
1 files changed, 6 insertions, 10 deletions
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 && \