Skip to content

build(eclair): add noble-based image for Eclair nodes - #1363

Open
Jem256 wants to merge 1 commit into
jamaljsr:masterfrom
Jem256:eclair-bug
Open

build(eclair): add noble-based image for Eclair nodes#1363
Jem256 wants to merge 1 commit into
jamaljsr:masterfrom
Jem256:eclair-bug

Conversation

@Jem256

@Jem256 Jem256 commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

Closes #1212

Description

This PR fixes a bug where eclair crashes when trying to open channels with the v0.12.0 & v0.13.1 Docker images. This is with eclair <-> eclair and eclair<->lnd channels. Uses;

  • eclipse-temurin:25.0.2_10-jdk-noble as build image
  • eclipse-temurin:25.0.2_10-jre-noble as runtime image

Steps to Test

  1. Create nextwork eclair and lnd nodes
  2. Create eclair <-> eclair and eclair<->lnd channels

Screenshots

Screenshot from 2026-03-01 21-02-46

@greptile-apps

greptile-apps Bot commented Mar 1, 2026

Copy link
Copy Markdown

Greptile Summary

This PR migrates the Eclair Docker image from Alpine-based eclipse-temurin:25.0.1_8-*-alpine to Ubuntu Noble-based eclipse-temurin:25.0.2_10-*-noble to fix crashes when opening channels in v0.12.0/v0.13.0.1.

  • Dockerfile: Package management switches from apk to apt-get with proper cache cleanup; su-exec is replaced by gosu; mkdir calls gain -p to prevent failure on directory re-creation.
  • docker-entrypoint.sh: Alpine user-management commands (addgroup/adduser/su-exec) are replaced with their Debian/Ubuntu equivalents (groupadd -f/useradd/gosu), correctly preserving UID/GID passthrough from the host for Linux volume permissions.

Confidence Score: 5/5

Safe to merge; the Alpine-to-Noble migration is straightforward and the node crash is correctly addressed.

Both changed files perform a clean Alpine-to-Ubuntu package-manager and user-management translation. The gosu/su-exec swap, apt-get/apk swap, and groupadd/useradd swap are all correct. The one subtle gap (missing -d /home/eclair on useradd) is unlikely to break the node since ECLAIR_DATADIR is set explicitly, but it is worth fixing for correctness.

docker/eclair/docker-entrypoint.sh — the useradd call could benefit from an explicit -d /home/eclair to match Alpine's implicit home-directory assignment.

Important Files Changed

Filename Overview
docker/eclair/Dockerfile Migrates build and runtime images from Alpine-based eclipse-temurin to Ubuntu Noble (24.04 LTS). Package management commands updated from apk to apt-get with correct cache cleanup, su-exec replaced with gosu, and mkdir calls hardened with -p flag. Looks correct.
docker/eclair/docker-entrypoint.sh Alpine user-management commands (addgroup/adduser/su-exec) replaced with Debian equivalents (groupadd/useradd/gosu). The useradd call is missing -d /home/eclair, so the eclair user's registered home directory will be / rather than /home/eclair on Ubuntu; the directory is created/chowned correctly but $HOME will be wrong for the process.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["docker-entrypoint.sh starts"] --> B{"id eclair exists?"}
    B -- No --> C["groupadd -f -g GROUPID eclair"]
    C --> D["useradd -r -u USERID -g GROUPID -o eclair\n(home defaults to / without -d flag)"]
    D --> E["mkdir -p /home/eclair\nchown -R USERID:GROUPID /home/eclair"]
    B -- Yes --> F{"arg[1] == polar-eclair?"}
    E --> F
    F -- Yes --> G["Build JAVA_OPTS from CLI args"]
    G --> H["gosu eclair bash eclair-node/bin/eclair-node.sh JAVA_OPTS\n(uses ECLAIR_DATADIR=/home/eclair/)"]
    F -- No --> I["exec original command"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["docker-entrypoint.sh starts"] --> B{"id eclair exists?"}
    B -- No --> C["groupadd -f -g GROUPID eclair"]
    C --> D["useradd -r -u USERID -g GROUPID -o eclair\n(home defaults to / without -d flag)"]
    D --> E["mkdir -p /home/eclair\nchown -R USERID:GROUPID /home/eclair"]
    B -- Yes --> F{"arg[1] == polar-eclair?"}
    E --> F
    F -- Yes --> G["Build JAVA_OPTS from CLI args"]
    G --> H["gosu eclair bash eclair-node/bin/eclair-node.sh JAVA_OPTS\n(uses ECLAIR_DATADIR=/home/eclair/)"]
    F -- No --> I["exec original command"]
Loading

Reviews (2): Last reviewed commit: "build(eclair): add noble-based image for..." | Re-trigger Greptile

@codecov

codecov Bot commented Mar 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2cd0220) to head (4249574).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1363   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          211       211           
  Lines         7036      7036           
  Branches      1416      1415    -1     
=========================================
  Hits          7036      7036           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erickcestari erickcestari left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! It fixed for me, too!

@theborakompanioni

Copy link
Copy Markdown

Awesome @Jem256 Would be nice to have this for v0.14.0 ... tests are failing for unrelated reasons?

@Jem256
Jem256 marked this pull request as draft June 16, 2026 16:34
@Jem256
Jem256 marked this pull request as ready for review June 16, 2026 16:34
@Jem256

Jem256 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@theborakompanioni it's all good now.

@Jem256

Jem256 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

cc @Abdulkbk for review

@Abdulkbk

Copy link
Copy Markdown
Collaborator

Wanted to reproduce this issue but couldn't because channels open normally. Or is the issue non-deterministic? @Jem256

@theborakompanioni

Copy link
Copy Markdown

Wanted to reproduce this issue but couldn't because channels open normally. Or is the issue non-deterministic? @Jem256

Failure from #1212 (SIGSEGV) reproducible here: https://github.com/theborakompanioni/lightning-regtest-setup-devel/actions/runs/29485167369/job/87577819858?pr=11#step:19:6940
(this is a test setup with multiple regtest nodes, that creates channels and makes some payments)

@Jem256

Jem256 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Wanted to reproduce this issue but couldn't because channels open normally. Or is the issue non-deterministic? @Jem256

To repro on master: linux/amd64 or Windows/x86-64, Eclair v0.12.0 & v0.13.1, open a few channels and retry. Which host OS/arch were you testing on? I've not reproduced this on a Mac, so the behaviour may be different.

@Abdulkbk

Copy link
Copy Markdown
Collaborator

I was testing on a Mac (arm arch). It seems the issue is with linux/amd and windows x86_64.

@Abdulkbk Abdulkbk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

@Abdulkbk

Copy link
Copy Markdown
Collaborator

@jamaljsr will need to push the images for this one

@Abdulkbk
Abdulkbk requested a review from jamaljsr July 22, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: eclair v0.12.0 docker image: eclair crashes when trying to open channels

4 participants