Skip to content

Commit

Permalink
Merge pull request #84 from paulsengroup/fix/dockerfile-arm
Browse files Browse the repository at this point in the history
Fix Dockerfile ARM builds
  • Loading branch information
robomics authored Dec 9, 2023
2 parents 73da27e + 579216e commit da1fd7d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ RUN if [ -z "$C_COMPILER" ]; then echo "Missing C_COMPILER --build-arg" && exit
ENV CC="$C_COMPILER"
ENV CXX="$CXX_COMPILER"

# Install b2 using Conan
RUN printf '[requires]\nb2/4.10.1\n[options]\nb2*:toolset=%s' \
"$(basename "$(which "$CC")")" | cut -f 1 -d - > /tmp/conanfile.txt

RUN conan install /tmp/conanfile.txt \
--build=missing \
-pr:b="$CONAN_DEFAULT_PROFILE_PATH" \
-pr:h="$CONAN_DEFAULT_PROFILE_PATH"

# Build hictk deps using Conan
RUN mkdir -p "$src_dir"

Expand Down Expand Up @@ -106,6 +115,7 @@ RUN if [ -z "$BUILD_BASE_IMAGE" ]; then echo "Missing BUILD_BASE_IMAGE --build-a

# Install runtime dependencies
RUN apt-get update \
&& apt-get install -y ca-certificates-java \
&& apt-get install -y \
openjdk-19-jre-headless \
pigz \
Expand Down
8 changes: 4 additions & 4 deletions utils/devel/build_dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ fi
sudo docker pull docker.io/library/ubuntu:22.04
FINAL_BASE_IMAGE_DIGEST="$(sudo docker inspect --format='{{index .RepoDigests 0}}' docker.io/library/ubuntu:22.04 | grep -o '[[:alnum:]:]\+$')"

BUILD_BASE_IMAGE='ghcr.io/paulsengroup/ci-docker-images/ubuntu-22.04-cxx-clang-15:latest'
BUILD_BASE_IMAGE='ghcr.io/paulsengroup/ci-docker-images/ubuntu-22.04-cxx-clang-17:latest'

sudo docker pull "$BUILD_BASE_IMAGE"

sudo docker build \
sudo docker buildx build --platform linux/amd64,linux/arm64 \
--build-arg "BUILD_BASE_IMAGE=$BUILD_BASE_IMAGE" \
--build-arg "FINAL_BASE_IMAGE=docker.io/library/ubuntu" \
--build-arg "FINAL_BASE_IMAGE_TAG=22.04" \
--build-arg "FINAL_BASE_IMAGE_DIGEST=$FINAL_BASE_IMAGE_DIGEST" \
--build-arg "C_COMPILER=clang-15" \
--build-arg "CXX_COMPILER=clang++-15" \
--build-arg "C_COMPILER=clang-17" \
--build-arg "CXX_COMPILER=clang++-17" \
--build-arg "GIT_HASH=$GIT_HASH" \
--build-arg "GIT_SHORT_HASH=$GIT_SHORT_HASH" \
--build-arg "GIT_TAG=$GIT_TAG" \
Expand Down

0 comments on commit da1fd7d

Please sign in to comment.