summaryrefslogtreecommitdiff
path: root/util/docker
diff options
context:
space:
mode:
authorNicholas Chin <nic.c3.14@gmail.com>2024-03-08 07:45:09 -0700
committerMartin L Roth <gaumless@gmail.com>2024-03-09 23:46:00 +0000
commit56c3444d85a1b60fcc891910c9c60e5f75ba9197 (patch)
treed34f252e8f723baefa5cff8fbb455f73e5ca2f1e /util/docker
parenta49dafc7d2de4ee0e24bd72d19f80d36218348bb (diff)
util/docker/Makefile: Create Documentation/_build for docker-build-docs
If the host directory of a bind mount does not exist, Docker will create it. However, the newly created directory will be owned by root due to the Docker service running within a root context. The docker command in the recipe for docker-build-docs binds Documentation/_build to /data-out within the container, so if it doesn't already exist, the documentation builder will be unable to copy the HTML output into /data-out since it runs with the same UID and GID as the host user. By creating, if necessary, the _build directory before the `docker run` command, there should always be an existing directory owned by the host user for docker to bind /data-out to (ignoring the case of an existing _build directory the current user does not have permission to write to), avoiding the issue where it cannot write the output. TEST: make -C util/docker docker-build-docs completes without issues with and without an existing Documentation/_build directory Change-Id: I6be9bc1fdca48f4d924f5c07cc261189ab6862fd Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81127 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'util/docker')
-rw-r--r--util/docker/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/docker/Makefile b/util/docker/Makefile
index 77526bba5e..45562d7a7b 100644
--- a/util/docker/Makefile
+++ b/util/docker/Makefile
@@ -177,6 +177,7 @@ docker-jenkins-attach: test-docker
docker-build-docs: test-docker
docker-build-docs:
+ mkdir -p $(top)/Documentation/_build
$(DOCKER) run -it --rm \
--user $(UID):$(GID) \
-v "$(top)/:/data-in/:ro" \