Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose works for MacOS #2143

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "**"
paths:
- 'docker/Dockerfile'
- 'docker/compose.sh'
- 'Cargo.toml'
- '.github/workflows/docker.yml'
workflow_dispatch:
Expand Down
16 changes: 15 additions & 1 deletion docker/compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,21 @@ cleanup() {
trap cleanup EXIT INT

cd "$ROOT_DIR"
docker build -f docker/Dockerfile . -t linera-test

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
docker build -f docker/Dockerfile . -t linera-test
elif [[ "$OSTYPE" == "darwin"* ]]; then
CPU_ARCH=$(sysctl -n machdep.cpu.brand_string)
if [[ "$CPU_ARCH" == *"Apple"* ]]; then
docker build --build-arg target=aarch64-unknown-linux-gnu -f docker/Dockerfile -t linera-test .
else
echo "Unsupported Architecture: $CPU_ARCH"
exit 1;
fi
else
echo "Unsupported OS: $OSTYPE"
exit 1;
fi

cd "$SCRIPT_DIR"

Expand Down
Loading