Skip to content

Commit 3950800

Browse files
committed
fix: ensure we can access git information from within Docker
1 parent 42e0e26 commit 3950800

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docker_build.sh

+7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
#!/bin/sh
22
set -ex
3+
34
echo "Building the docker image"
45
docker build -t wasi-sdk-builder:latest .
6+
7+
if ! git config safe.directory | grep /workspace; then
8+
echo "Setting up Git safe directory"
9+
git config --global --add safe.directory /workspace
10+
fig
11+
512
echo "Building the package in docker image"
613
mkdir -p ~/.ccache
714
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 commit comments

Comments
 (0)