Skip to content

Commit

Permalink
fix: ensure we can access git information from within Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
abrown committed Mar 8, 2024
1 parent 42e0e26 commit 59e5556
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker_build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/sh
set -ex

echo "Building the docker image"
docker build -t wasi-sdk-builder:latest .

if ! git config safe.directory | grep --quiet /workspace; then
echo "Setting up Git safe directory"
git config --global --add safe.directory /workspace
fi

echo "Building the package in docker image"
mkdir -p ~/.ccache
docker run --rm -v "$PWD":/workspace -v ~/.ccache:/root/.ccache -e NINJA_FLAGS=-v --workdir /workspace --tmpfs /tmp:exec wasi-sdk-builder:latest make package LLVM_CMAKE_FLAGS=-DLLVM_CCACHE_BUILD=ON

0 comments on commit 59e5556

Please sign in to comment.