Skip to content

Commit

Permalink
Merge pull request KhronosGroup#579 from gmlueck/gmlueck/docker-tmp-dir
Browse files Browse the repository at this point in the history
Fix local docker build of PDF spec
  • Loading branch information
gmlueck authored Jul 3, 2024
2 parents 3fa9c77 + 265d21e commit 8f8e6ed
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions adoc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,20 @@ clean_pdf:
# make docker-clean docker-html docker-pdf
# Also useful to have a shell inside docker:
# make docker-bash
#
# Set the user and group inside the container to match the user and group
# outside of the container. This causes the generated files to be owned by the
# current user when accessed from outside the container. However, this user
# probably doesn't have write access to the default HOME directory, so set HOME
# to some directory that does have write access. This is important because
# some tools (e.g. asciidoctor-pdf) write temporary files into HOME. It does
# not matter that we are polluting /tmp here because the entire container will
# be discarded when the build is complete.
docker-%:
# Run with current user and group id the published AsciiDoctor
# capable Khronos docker image with current SYCL specification
# directory mounted in /sycl
# Re-set MAKEFLAGS to pass variables to the inner make since
# variables are dropped by docker.
sudo docker run --user `id --user`:`id --group` \
sudo docker run --user `id --user`:`id --group` --env HOME=/tmp \
--interactive --tty --rm \
--volume $(SYCL_DIR):/sycl \
khronosgroup/docker-images:asciidoctor-spec \
--volume $(SYCL_DIR):/sycl \
khronosgroup/docker-images:asciidoctor-spec \
$(MAKE) MAKEFLAGS="$(MAKEFLAGS)" --directory=/sycl/adoc $*
dock:
Expand Down

0 comments on commit 8f8e6ed

Please sign in to comment.