Skip to content

Commit

Permalink
Fix Docker build to work on Apple silicon (#6431)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Sep 20, 2024
1 parent 38b22ad commit a6e0748
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To build run 'docker build . -t openchat'
FROM ubuntu:22.04 as builder
FROM ubuntu:22.04 AS builder
SHELL ["bash", "-c"]

ARG git_commit_id
Expand All @@ -11,9 +11,7 @@ ENV TZ=UTC

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apt -yq update && \
apt -yqq install --no-install-recommends curl ca-certificates \
build-essential libssl-dev llvm-dev liblmdb-dev clang cmake \
git pkg-config
apt -yqq install --no-install-recommends curl ca-certificates build-essential

# Install Rust and Cargo in /opt
ENV RUSTUP_HOME=/opt/rustup \
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker-build-all-wasms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GIT_COMMIT_ID=$(git rev-parse HEAD)

echo "CommitId: $GIT_COMMIT_ID"

docker build -t openchat --build-arg git_commit_id=$GIT_COMMIT_ID . || exit 1
docker build -t openchat --build-arg git_commit_id=$GIT_COMMIT_ID --platform linux/amd64 . || exit 1

container_id=$(docker create openchat)
rm -rf wasms
Expand Down
2 changes: 1 addition & 1 deletion scripts/verify-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ echo "Tag: $TAG_ID"
echo "Commit Id: $GIT_COMMIT_ID"
echo "Canister name: $CANISTER_NAME"

docker build -t openchat --build-arg git_commit_id=$GIT_COMMIT_ID --build-arg canister_name=$CANISTER_NAME . || exit 1
docker build -t openchat --build-arg git_commit_id=$GIT_COMMIT_ID --build-arg canister_name=$CANISTER_NAME --platform linux/amd64 . || exit 1

container_id=$(docker create openchat)
rm -rf wasms
Expand Down

0 comments on commit a6e0748

Please sign in to comment.