Skip to content

Commit

Permalink
Fix Dockerfile on non amd64 platforms (ava-labs#1661)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-kim authored Jun 27, 2023
1 parent 2ec1500 commit d7c992b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
# go.mod
# ============= Compilation Stage ================
FROM golang:1.19.6-buster AS builder
ARG ARCH=amd64
RUN apt-get update && apt-get install -y --no-install-recommends bash=5.0-4 make=4.2.1-1.2 gcc=4:8.3.0-1 musl-dev=1.1.21-2 ca-certificates=20200601~deb10u2 linux-headers-${ARCH}
RUN apt-get update && apt-get install -y --no-install-recommends bash=5.0-4 make=4.2.1-1.2 gcc=4:8.3.0-1 musl-dev=1.1.21-2 ca-certificates=20200601~deb10u2 linux-headers-4.19.0-21-all

WORKDIR /build
# Copy and download avalanche dependencies using go mod
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_local_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ full_commit_hash="$(git --git-dir="$AVALANCHE_PATH/.git" rev-parse HEAD)"
commit_hash="${full_commit_hash::8}"

echo "Building Docker Image with tags: $avalanchego_dockerhub_repo:$commit_hash , $avalanchego_dockerhub_repo:$current_branch"
docker build --build-arg ARCH="$arch" -t "$avalanchego_dockerhub_repo:$commit_hash" \
docker build -t "$avalanchego_dockerhub_repo:$commit_hash" \
-t "$avalanchego_dockerhub_repo:$current_branch" "$AVALANCHE_PATH" -f "$AVALANCHE_PATH/Dockerfile"
3 changes: 0 additions & 3 deletions scripts/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ coreth_path=${CORETH_PATH:-"$GOPATH/pkg/mod/github.com/ava-labs/coreth@$coreth_v
# You should probably set it - export DOCKER_REPO='avaplatform/avalanchego'
avalanchego_dockerhub_repo=${DOCKER_REPO:-"avalanchego"}

# System architecture
arch=$(uname -m)

# Current branch
# TODO: fix "fatal: No names found, cannot describe anything" in github CI
current_branch=$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match || true)
Expand Down

0 comments on commit d7c992b

Please sign in to comment.