-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dockerfile and sample docker compose #176
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Use the official Rust image as the base image | ||
FROM rust:1.81 AS builder | ||
|
||
# Install protobuf compiler | ||
RUN apt-get update && apt-get install -y protobuf-compiler | ||
|
||
# Create a new directory for the application | ||
WORKDIR /app | ||
|
||
# Copy the entire project | ||
COPY . . | ||
|
||
# Build dependencies and the project | ||
RUN cargo build --release | ||
|
||
# Create a new stage with a minimal image | ||
FROM ubuntu:22.04 AS final | ||
|
||
# Install necessary runtime dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y libssl3 ca-certificates && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the built executables from the builder stage | ||
COPY --from=builder /app/target/release/lndk /usr/local/bin/lndk | ||
COPY --from=builder /app/target/release/lndk-cli /usr/local/bin/lndk-cli | ||
|
||
# Set the startup command | ||
CMD ["lndk"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
services: | ||
lnd: | ||
container_name: lnd | ||
image: docker.io/lightninglabs/lnd:v0.18.3-beta.rc3 | ||
restart: unless-stopped | ||
stop_grace_period: 15m30s | ||
volumes: | ||
- /root/lnd:/root/.lnd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using root directory of a host file systems(/root/lnd) seems not a good idea for me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The standard I've seen is |
||
ports: | ||
- "9735:9735" | ||
- "10009:10009" | ||
- "4000:4000" | ||
command: | ||
lnd | ||
|
||
lndk: | ||
container_name: lndk | ||
image: lndk | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replacing with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I like the idea of replacing |
||
depends_on: [lnd] | ||
restart: on-failure | ||
stop_grace_period: 20s | ||
volumes: | ||
- /root/lnd:/lnd:ro | ||
command: > | ||
lndk --address=https://lnd:10009 --cert-path=/lnd/tls.cert --macaroon-path=/lnd/data/chain/bitcoin/mainnet/admin.macaroon | ||
environment: | ||
- RUST_LOG=info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we run lnd without any config and bitcoind?