diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 62e36e787593..cc54e78223bc 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -27,22 +27,11 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . push: true - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/arm/v7 tags: | - shahanafarooqui/lightningd:${{ github.event.inputs.version }} - shahanafarooqui/lightningd:latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache + elementsproject/lightningd:${{ github.event.inputs.version }} diff --git a/Dockerfile b/Dockerfile index f99f24396331..840c421fa3f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -164,6 +164,13 @@ FROM base-builder-${TARGETOS}-${TARGETARCH} as builder ENV LIGHTNINGD_VERSION=master +# Build the configurator binary for each architecture +# Fix `configurator: Exec format error` on ARM and ARM64 +WORKDIR /opt/lightningd/ccan/tools/configurator +COPY ccan/tools/configurator/configurator.c configurator.c +RUN gcc -o configurator configurator.c +WORKDIR /opt/lightningd + RUN mkdir zlib && tar xvf zlib.tar.gz -C zlib --strip-components=1 \ && cd zlib \ && ./configure ${ZLIB_CONFIG} \