lightning: remote_hsmd_socket & remove env files

- build vls and copy binary in final layer
- update configs
- add vls port, network, rust log and rpc url in env
- compose: set env variable in compose only
- dont separate env files, ease of access on env vars with compose
- common across networks set in dockerfile
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
Lakshya Singh
2023-10-31 20:57:04 +05:30
parent 1731716944
commit 9cb9062ce8
7 changed files with 27 additions and 14 deletions

View File

@@ -61,6 +61,20 @@ RUN git clone $PLUGINS_REPO && \
cd plugins && \
git checkout $PLUGINS_GIT_HASH
RUN apk add \
cargo \
rust \
grpc \
protobuf \
protobuf-dev
ARG VLS_GIT_HASH=af02dac8b855c361d74234387d288a9591fad1d5
ARG VLS_REPO=https://gitlab.com/lightning-signer/validating-lightning-signer.git
RUN git clone $VLS_REPO && \
cd validating-lightning-signer && \
git checkout $VLS_GIT_HASH && \
cargo build --bins -r
# final stage with runtime dependencies and pkgs
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as runner
@@ -98,6 +112,7 @@ COPY --from=builder /usr/share/man/man8 /usr/share/man/man8
COPY --from=builder /usr/share/doc/c-lightning /usr/share/doc/c-lightning
COPY --from=builder /usr/bin/clboss /usr/bin/clboss
COPY --from=builder /build/plugins/summary /usr/local/src/plugins/summary
COPY --from=builder /build/validating-lightning-signer/target/release/remote_hsmd_socket /usr/libexec/c-lightning/remote_hsmd_socket
RUN addgroup -S lightning && adduser -S lightning -G lightning && \
mkdir -p ${LIGHTNINGD_DATA} && \