-
Notifications
You must be signed in to change notification settings - Fork 8
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 (for Umbrel) #22
Conversation
Umbrel requires images to be built from debian:buster-slim. Is alpine a subset of that image? |
93dd3b8
to
96025a7
Compare
Ill try switch it over, hopefully builds! |
1cf649d
to
2c17b73
Compare
4e41105
to
5d2b4b6
Compare
96a20db
to
44a6d80
Compare
f903e4b
to
3d4dad6
Compare
The prereq PRs are both merged. looks like we're ready to roll a 0.1.1 when this is in! |
@0xBEEFCAF3 could you check this on Umbrel? |
Yes I can do this today |
Build failed
|
@0xBEEFCAF3 that looks like a cargo error to me. I was able to build on my machine, but I just can't deploy it on an umbrel. @nickfarrow what do you think is the best test for "passing" changes to this script into master in the future? I'd like to build a container for armv7 in this Dockerfile in the future, too |
What machine are you trying to build on? Mine is building from x86 with commands:
then
Maybe those will help? |
Would github CI let you do a docker build? My guess is it would never finish arm image since I can barely build it on my 16g ram laptop |
@nickfarrow I was doing it wrong. I just ran
to get the builder. before I checked the logs and had only built the x86_64 version. I will put what's building now on dockerhub and then @0xBEEFCAF3 can run it from there as a smoke test |
=> [linux/arm64 branch-version-arm64 3/4] RUN rustup target add aarch64-unknown-linux-musl 34.8s
=> ERROR [linux/arm64 branch-version-arm64 4/4] RUN cargo install --target aarch64-unknown-linux-musl --path . 188.1s
------
> [linux/arm64 branch-version-arm64 4/4] RUN cargo install --target aarch64-unknown-linux-musl --path .:
#0 4.471 Installing nolooking v0.1.0 (/usr/src/nolooking)
#0 19.38 Updating crates.io index
#0 187.7 Killed
------
Dockerfile:43
--------------------
41 | ENV AR_aarch64_unknown_linux_musl=llvm-ar
42 | ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld"
43 | >>> RUN cargo install --target aarch64-unknown-linux-musl --path .
44 |
45 | # We build for either x86_64 or ARM from above options using the docker $TARGETARCH
--------------------
ERROR: failed to solve: process "/bin/sh -c cargo install --target aarch64-unknown-linux-musl --path ." did not complete successfully: exit code: 137 |
Are you sure you ran the |
yes I also 16gb ram machine. edit: maybe I can add swap space |
I was thinking that this arm build just requires a lot of memory to produce (all the statically linked dependencies), but maybe there is something else going wrong? Using shared local dependencies outside of docker may help, but i haven't tried yet |
Finally got it built and on the chaincase dockerhub Apparently there is a big memory leak in libgit2, a c library cargo depends on. Rust can still leak memory if it depends on c code 🤣 By passing source of the memory leak: rust-lang/cargo#9167 |
Conditionally `cargo build` for platforms of x86_64 or ARM. In the final Docker stage we copy the built binary to alpine, and use a run_nolooking script to start nolooking with the environment: - $LND_HOST, $LND_GRPC_PORT, $TLS_FILE, $MACAROON_FILE" - Binds to 0.0.0.0:4444 (exposed within docker) Resolves payjoin#4
Resolves #4