Skip to content

Commit 657039a

Browse files
author
Claudio Raimondi
committed
Separate submodules initialization from Dockerfile [skip ci]
1 parent 4c72f15 commit 657039a

File tree

4 files changed

+3465
-11
lines changed

4 files changed

+3465
-11
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Dockerfile
22
contrib/docker/Dockerfile.*
3-
target
3+
target
4+
.git/

.github/workflows/docker-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: actions/checkout@v4
3737
with:
3838
ref: ${{ github.ref }} # Ensures the branch triggering the workflow is checked out
39+
submodules: 'recursive'
40+
fetch-depth: 0
3941

4042
- name: Set up QEMU
4143
uses: docker/setup-qemu-action@v3

Dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ ARG POSTGRES_TARBALL=postgresql-${POSTGRES_VERSION}.tar.gz
114114

115115
WORKDIR /opt/postgres
116116

117-
ADD ${POSTGRES_URL}/v${POSTGRES_VERSION}/${POSTGRES_TARBALL} .
118-
ADD ${POSTGRES_URL}/v${POSTGRES_VERSION}/${POSTGRES_TARBALL}.sha256 .
117+
ADD ${POSTGRES_URL}/v${POSTGRES_VERSION}/${POSTGRES_TARBALL} .
118+
ADD ${POSTGRES_URL}/v${POSTGRES_VERSION}/${POSTGRES_TARBALL}.sha256 .
119119
#TODO: add gpgs
120120

121121
#TODO verify gpgs
@@ -129,11 +129,8 @@ ADD --chmod=750 https://sh.rustup.rs install-rust.sh
129129

130130
WORKDIR /opt/lightningd
131131

132-
#TODO: fix docker caching at this stage.
133132
COPY . .
134133

135-
RUN git submodule update --init --recursive
136-
137134
FROM base-builder AS base-builder-linux-amd64
138135

139136
ARG target_host=x86_64-linux-gnu
@@ -226,11 +223,10 @@ RUN apt-get update -qq && \
226223
apt-get clean && \
227224
rm -rf /var/lib/apt/lists/*
228225

229-
#TODO: only copy necessary bitcoin/litecoin binaries.
230-
COPY --from=downloader /opt/bitcoin/bin/ /usr/bin/
231-
COPY --from=downloader /opt/litecoin/bin/ /usr/bin/
232-
COPY --from=builder /tmp/lightning_install/ /usr/local/
233-
COPY --from=builder /tmp/postgres_install/lib/ /usr/lib/
226+
COPY --from=downloader /opt/bitcoin/bin/bitcoin-cli /usr/bin/
227+
COPY --from=downloader /opt/litecoin/bin/litecoin-cli /usr/bin/
228+
COPY --from=builder /tmp/lightning_install/ /usr/local/
229+
COPY --from=builder /tmp/postgres_install/lib/ /usr/lib/
234230

235231
COPY tools/docker-entrypoint.sh /entrypoint.sh
236232

0 commit comments

Comments
 (0)