Skip to content

Commit

Permalink
docker: Adding ccan configuration
Browse files Browse the repository at this point in the history
docker: updating action to run for correctly capturing BUILDPLATFORM value
  • Loading branch information
ShahanaFarooqui committed May 25, 2024
1 parent a76356b commit 40c7e73
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
elementsproject/lightningd:${{ github.event.inputs.version }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Build and push Docker images
run: |
docker buildx build \
--platform linux/arm64,linux/arm/v7 \
--tag elementsproject/lightningd:${{ github.event.inputs.version }} \
--cache-from type=local,src=/tmp/.buildx-cache \
--cache-to type=local,dest=/tmp/.buildx-cache \
--push .
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ RUN set -ex \

WORKDIR /opt


ENV BITCOIN_VERSION=22.0
ENV BITCOIN_TARBALL bitcoin-${BITCOIN_VERSION}-${TARBALL_ARCH_FINAL}.tar.gz
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL
Expand Down Expand Up @@ -164,6 +163,15 @@ FROM base-builder-${TARGETOS}-${TARGETARCH} as builder

ENV LIGHTNINGD_VERSION=master

# Build the configurator binary for each architecture
WORKDIR /opt/lightningd/ccan/tools/configurator
COPY ccan/tools/configurator/configurator.c configurator.c
RUN gcc -o configurator configurator.c

COPY zlib.tar.gz /opt/lightningd/zlib.tar.gz

WORKDIR /opt/lightningd

RUN mkdir zlib && tar xvf zlib.tar.gz -C zlib --strip-components=1 \
&& cd zlib \
&& ./configure ${ZLIB_CONFIG} \
Expand Down

0 comments on commit 40c7e73

Please sign in to comment.