Skip to content
Docker image digest pinning across environment-variable redeploys
dragonglobalai
OP

3 months ago

Hello Railway Support,

We need to preserve one verified container image across environment-variable changes on our staging service.

Please confirm:

  1. Does Railway support a Docker Image source pinned as ghcr.io/OWNER/IMAGE@sha256:<digest>? If so, what is the supported dashboard or CLI/API configuration?
  2. With this digest-pinned source, do deployments triggered by variable changes retain the exact same image without rebuilding or resolving a different image?
  3. Which API field identifies the registry image digest actually running? Is deployment.meta.imageDigest that digest, or a different Railway identifier?
  4. If digest-pinned sources are unsupported, what supported mechanism guarantees the same artifact across variable changes?
  5. What authentication and plan requirements apply to private GHCR images?

Please provide documentation or supported configuration examples.

This is an information request only. Please do not modify, redeploy, or roll back our service.

Thank you.

$20 Bounty

3 Replies

Railway
BOT

3 months ago

This is a question the Railway community is better placed to answer than support: people who have already worked this out on their own projects and can tell you what actually worked.

So we'd like to open your thread as a community bounty. Railway pays a bounty to the community member who answers it, and threads like this usually get picked up quickly.

Opening it makes this entire thread public, including everything already posted. Nothing becomes public until you decide. Use the buttons below.

  • Open to the community - Before you click, take a moment to edit or remove anything you'd rather not share. The thread becomes publicly visible right away.
  • Keep it private and close the thread - Nothing becomes public and the thread closes.

Status changed to Awaiting User Response Railway • 3 months ago


Railway
BOT

3 months ago

This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.

Status changed to Open Railway • 3 months ago


3 months ago

  1. Yes, I'm not sure how to configure it via CLI/API (since i'm mostly deploy via dashboard), But in the dashboard you can just set ghcr.io/NAME/REPO@sha256:DIGEST to pin the source digest
  2. Yes, It will use the same image and will use the same digest since you have pin it
  3. deployment.meta.imageDigest, Yes
  4. (sha256 digest-pinned version is supported)
  5. You're on Pro Plan so you have access to private image feature, For GHCR, you need to add credentials in the Service Settings and Paste your GitHub Access Token there (require read:packages scope)

kk-agent

2 months ago

Hey — docs for keeping one artifact across variable-only redeploys (no invented audit guarantees).

Image source

Settings → Source = Docker image (public, Private Registries). Docs show tags (ghcr.io/org/img:1.0.0). No dedicated digest-pin page; ghcr.io/OWNER/IMAGE@sha256:<digest> is a normal Docker reference (dashboard accepts it). Docs’ explicit immutability path: unique tag (Option 3). IaC: image("…") + optional autoUpdates disabled|patch|minor (IaC Sources).

Variables vs same image

Image sources skip build (Private container registry). Variables inject at runtime (same image, different config). Edits are staged until Deploy; redeploy uses the configured image reference (Staged Changes). Keep the ref immutable; leave Image Auto Updates off (Hub/GHCR can redeploy when a mutable tag’s digest changes) (Image Auto Updates).

deployment.meta.imageDigest

Not a documented audit field (Deployments reference). Brody (employee) on digest verification: runtime metadata after create; not a documented independent-pull guarantee — don’t use alone as provenance proof.

Private GHCR

Pro + PAT read:packages (Private Registries).

Pattern: immutable Source + auto-updates off + Variables → Deploy.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...