Skip to content

Commit

Permalink
fix docker build of action and support arm images
Browse files Browse the repository at this point in the history
  • Loading branch information
bxq2011hust committed Sep 22, 2022
1 parent 5556923 commit 0b2dc39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
with:
context: .
push: true
file: ./tools/.ci/Dockerfile
platforms: linux/amd64
file: tools/ci/Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ steps.set_docker_tag.outputs.docker_tag }}

- name: Image digest
Expand Down
6 changes: 4 additions & 2 deletions tools/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ LABEL maintainer [email protected]
WORKDIR /

ARG SOURCE_BRANCH
ARG TARGETARCH

ENV DEBIAN_FRONTEND=noninteractive \
SOURCE=${SOURCE_BRANCH:-master}
SOURCE=${SOURCE_BRANCH:-master-2.0}

RUN apt-get -q update && apt-get install -qy --no-install-recommends \
git clang make build-essential cmake libssl-dev zlib1g-dev ca-certificates \
Expand All @@ -16,7 +18,7 @@ RUN apt-get -q update && apt-get install -qy --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/FISCO-BCOS/FISCO-BCOS.git && cd FISCO-BCOS \
&& git checkout ${SOURCE} && cmake . && make -j2 && strip bin/fisco-bcos
&& git checkout ${SOURCE} && if [[ "${TARGETARCH}" != "amd64" ]]; then cmake . ;else cmake -DARCH_NATIVE=on .;fi && make -j2 && strip bin/fisco-bcos

FROM ubuntu:18.04
LABEL maintainer [email protected]
Expand Down

0 comments on commit 0b2dc39

Please sign in to comment.