Skip to content

Document Dockerfile build secret limitations#1158

Closed
radiantjade wants to merge 1 commit into
railwayapp:mainfrom
radiantjade:document-dockerfile-build-secret-limits
Closed

Document Dockerfile build secret limitations#1158
radiantjade wants to merge 1 commit into
railwayapp:mainfrom
radiantjade:document-dockerfile-build-secret-limits

Conversation

@radiantjade
Copy link
Copy Markdown
Contributor

Summary

  • document that Dockerfile builds do not bind Railway service variables as BuildKit type=secret mounts
  • warn that sealed variables can still be printed if a Docker RUN command expands them
  • keep the existing ARG guidance but make the secret-handling limitation explicit

Related Central Station question: https://station.railway.com/questions/does-railway-support-run-mount-type-se-aa6a8782

Verification

  • git diff --check
  • pnpm exec content-collections build

Dockerfile builds document ARG usage and cache mounts, but do not state that Railway service variables are not bound as Docker BuildKit secrets. Add a warning that RUN --mount=type=secret is not available for service variables in Dockerfile builds, and that sealed variables can still appear in logs if a Docker RUN command expands and prints them.

Constraint: Public Railway staff guidance says Dockerfile BuildKit secret mounts are not supported for this path

Rejected: Recommend RUN --mount=type=secret | unsupported for Dockerfile builds on Railway

Confidence: medium

Scope-risk: narrow

Directive: Revisit this warning if Railway adds Dockerfile BuildKit secret binding

Tested: git diff --check; pnpm exec content-collections build

Not-tested: Full Next.js site build
@brody192 brody192 closed this May 15, 2026
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.

2 participants