Skip to content

Commit be806dc

Browse files
docker: Add vls remote_hsmd_socket binary
This Dockerfile builds the VLS binaries during the builder stage and copy only the `remote_hsmd_socket` binary into the final image. Changelog-Added: Included VLS's remote_hsmd_socket binary with the Core Lightning image.
1 parent 8732410 commit be806dc

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

Dockerfile

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,32 @@ RUN find /tmp/lightning_install -type f -executable -exec \
163163
awk -F: '/ELF/ {print $1}' | \
164164
xargs -r ${STRIP} --strip-unneeded
165165

166+
# Build VLS remote_hsmd_socket
167+
WORKDIR /opt
168+
ARG VLS_VERSION=v0.14.0
169+
170+
RUN git clone --depth 1 --branch ${VLS_VERSION} https://gitlab.com/lightning-signer/validating-lightning-signer.git
171+
172+
WORKDIR /opt/validating-lightning-signer
173+
RUN mkdir -p .cargo && tee .cargo/config.toml <<EOF
174+
175+
[build]
176+
target = "${target_arch_rust}"
177+
rustflags = ["-C", "target-cpu=generic"]
178+
179+
[target.${target_arch_rust}]
180+
linker = "${CC}"
181+
182+
EOF
183+
184+
RUN cargo build --release
185+
186+
RUN cp -r ./target/${target_arch_rust}/release/ /tmp/vls_install/ \
187+
&& find /tmp/vls_install -type f -executable -exec \
188+
file {} + | \
189+
awk -F: '/ELF/ {print $1}' | \
190+
xargs -r ${STRIP} --strip-unneeded
191+
166192
FROM base-target AS final
167193

168194
RUN apt-get update && \
@@ -176,8 +202,9 @@ RUN apt-get update && \
176202
apt-get clean && \
177203
rm -rf /var/lib/apt/lists/*
178204

179-
COPY --from=downloader /opt/bitcoin/bin/bitcoin-cli /usr/bin/
180-
COPY --from=builder /tmp/lightning_install/ /usr/local/
205+
COPY --from=downloader /opt/bitcoin/bin/bitcoin-cli /usr/bin/
206+
COPY --from=builder /tmp/lightning_install/ /usr/local/
207+
COPY --from=builder /tmp/vls_install/remote_hsmd_socket /var/lib/vls/bin/
181208

182209
COPY tools/docker-entrypoint.sh /entrypoint.sh
183210

0 commit comments

Comments
 (0)