docker: pin the final alpine base image

Open Beginner friendly
#11,437 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@danieldzansi is already working on this.

Since Nov 4, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, go
Domain
devops, release

Research direction

Read the final stages in Dockerfile and dev.Dockerfile, then check .github/workflows/docker.yml to confirm how the images are built. Pin the Alpine base to a release and, if available, its multi-architecture index digest so both linux/amd64 and linux/arm64 builds work. Done when both final stages use a fixed base and the workflow can build the release and daily images.

Written by the indexing model from the issue text.

Description

The final stage of the release Dockerfile (and dev.Dockerfile) uses a bare
FROM alpine, with no version tag or digest (master @ c03d36598):

.github/workflows/docker.yml builds this file for every release tag and for
the daily lightninglabs/lnd image. So each build runs on whatever
alpine:latest is that day. Two builds of the same lnd tag can ship different
Alpine releases, a new Alpine major can change the published image without any
lnd change, and the base layer of a given image can't be tied back to the repo.
The builder stage is already pinned by version (golang:1.27.3-alpine).

Proposal: pin the final stage, at minimum to an Alpine release
(alpine:3.x), ideally to that release's multi-arch index digest
(alpine:3.x@sha256:...). An index digest resolves per platform, so it works
for both linux/amd64 and linux/arm64, which was the concern raised on the
earlier attempt, #5753 (closed; it pinned only the builder images). The pin
would be bumped alongside the regular Go version bumps.

Background: #5787 (distroless images, closed not planned).

Dominant language
Go
Stars
8.2k
Forks
2.3k
Avg merge
1d 11h
Merged PRs (30d)
103

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lightningnetwork/lnd

All issues in lightningnetwork/lnd

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.