Title: trigger deploy fails on custom DEPLOY_BASE_IMAGES since 4.7.6: emSign distrust step assumes a root Debian base · Issue #5054 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: trigger deploy fails on custom DEPLOY_BASE_IMAGES since 4.7.6: emSign distrust step assumes a root Debian base · Issue #5054 · triggerdotdev/trigger.dev
X Title: trigger deploy fails on custom DEPLOY_BASE_IMAGES since 4.7.6: emSign distrust step assumes a root Debian base · Issue #5054 · triggerdotdev/trigger.dev
Description: Provide environment information Self-hosted Trigger.dev v4.7.7 (webapp, supervisor, Helm chart 4.7.7) CLI trigger.dev 4.7.7, runtime: "node-26" Webapp configured with custom base images (#5005): DEPLOY_BASE_IMAGES=node-26=cgr.dev/chaingu...
Open Graph Description: Provide environment information Self-hosted Trigger.dev v4.7.7 (webapp, supervisor, Helm chart 4.7.7) CLI trigger.dev 4.7.7, runtime: "node-26" Webapp configured with custom base images (#5005): DE...
X Description: Provide environment information Self-hosted Trigger.dev v4.7.7 (webapp, supervisor, Helm chart 4.7.7) CLI trigger.dev 4.7.7, runtime: "node-26" Webapp configured with custom base images (...
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/5054
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"trigger deploy fails on custom DEPLOY_BASE_IMAGES since 4.7.6: emSign distrust step assumes a root Debian base","articleBody":"### Provide environment information\n\n- Self-hosted Trigger.dev v4.7.7 (webapp, supervisor, Helm chart 4.7.7)\n- CLI `trigger.dev` 4.7.7, `runtime: \"node-26\"`\n- Webapp configured with custom base images (#5005):\n - `DEPLOY_BASE_IMAGES=node-26=cgr.dev/chainguard/node@sha256:…`\n - `DEPLOY_BUILD_BASE_IMAGES=node-26=cgr.dev/chainguard/node:latest-dev@sha256:…`\n- No `image.instructions` / `aptGet` extensions in `trigger.config.ts`\n\n### Describe the bug\n\nSince 4.7.6, every `trigger deploy` fails building the task image when the webapp supplies custom base images. 4.7.4 and 4.7.5 deploy the same project fine.\n\n```\n#14 [base 2/3] RUN mkdir -p /usr/local/share/ca-certificates/emsign-block && printf '%s\\n' …\n#14 0.229 mkdir: can't create directory '/usr/local/share/': Permission denied\nERROR: process \"/bin/sh -c mkdir -p /usr/local/share/ca-certificates/emsign-block && …\" did not complete successfully: exit code: 1\n```\n\n`generateContainerfile` inserts `distrustCompromisedRoots` into the `base` stage and into the `build` stage when a build base is set ([buildImage.ts#L748-L762](https://github.com/triggerdotdev/trigger.dev/blob/v4.7.7/packages/cli-v3/src/deploy/buildImage.ts#L748-L762), used at [L844](https://github.com/triggerdotdev/trigger.dev/blob/v4.7.7/packages/cli-v3/src/deploy/buildImage.ts#L844), [L868](https://github.com/triggerdotdev/trigger.dev/blob/v4.7.7/packages/cli-v3/src/deploy/buildImage.ts#L868) and [L971](https://github.com/triggerdotdev/trigger.dev/blob/v4.7.7/packages/cli-v3/src/deploy/buildImage.ts#L971)). The step runs before the template's `USER node` and assumes the `triggerdotdev/node` Debian base:\n\n| The step needs | A typical custom base (e.g. `cgr.dev/chainguard/node`) |\n|---|---|\n| to run as root | defaults to uid 65532 (`node`) |\n| `/usr/local/share/ca-certificates/` | no `/usr/local/share` |\n| `/etc/ca-certificates.conf` to `sed` | absent |\n| `update-ca-certificates` | absent (the image ships only the finished bundle) |\n\nThe step has no opt-out, so a self-hosted install that requires custom bases cannot deploy at all on 4.7.6 or 4.7.7. `main` has the same code.\n\n### Reproduction repo\n\nNone needed. The failing instruction reproduces on its own:\n\n```dockerfile\nFROM cgr.dev/chainguard/node:latest\nRUN mkdir -p /usr/local/share/ca-certificates/emsign-block\n```\n\n```\nmkdir: can't create directory '/usr/local/share/': Permission denied\n```\n\n### To reproduce\n\n1. Self-host v4.7.6+ with `DEPLOY_BASE_IMAGES` / `DEPLOY_BUILD_BASE_IMAGES` pointing at a non-root image without Debian's `ca-certificates` tooling, e.g. `cgr.dev/chainguard/node` and `:latest-dev`.\n2. Run `trigger deploy` with CLI 4.7.6 or 4.7.7.\n3. The image build fails at `[base 2/3]` (and `[build 2/…]`) as above.\n\n### Suggested fix\n\nSkip the step for stages built on a server-supplied base, and leave the base image's trust store to whoever supplies it. We run this as a local `yarn patch`:\n\n```diff\n+const distrustUnlessServerBase = (serverBase) => (serverBase ? \"\" : distrustCompromisedRoots);\n …\n-${distrustCompromisedRoots}`;\n+${distrustUnlessServerBase(options.image?.buildBase)}`;\n …\n-${distrustCompromisedRoots}\n+${distrustUnlessServerBase(options.image?.base)}\n```\n\nOther options, in case you'd rather keep the step on custom bases:\n\n- An explicit opt-out, e.g. a webapp env var or an `image` option.\n- Running the step as `USER root` and skipping it when `/etc/ca-certificates.conf` or `update-ca-certificates` is missing. This still leaves distroless or apk-based bases unprotected, so it seems weaker than documenting that a custom base owns its trust store.\n\nHappy to open a PR for whichever you prefer.\n\n### Additional information\n\n- Custom bases aren't necessarily exposed by skipping the step. On `cgr.dev/chainguard/node` (Node 26.12.1, `ca-certificates-bundle` 20260909-r3), neither `tls.rootCertificates` nor the system store contains emSign ECC Root CA - G3, ECC Root CA - C3 or Root CA - C1.\n- A runtime safeguard that works on any base is `tls.setDefaultCACertificates(getCACertificates('default').filter(…))`, dropping those three roots at worker start. We run that in our worker init alongside the patch.\n- Introduced by `dac3b033eb` and `1fb4c7608e` (shipped in 4.7.6), which postdate custom base images in #5005.\n","author":{"url":"https://github.com/vlakshmanan-silkline","@type":"Person","name":"vlakshmanan-silkline"},"datePublished":"2026-10-22T22:03:15Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/5054"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1495e8a2-4f6e-1ce5-ea40-8ee1d556fca5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B476:3166AC:5BB3E7C:7B13E0C:6AFAE23E |
| html-safe-nonce | ea3f3cb362389e43e70da2d52d3e7748294a779366407b5e35f1597dc2d512d9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDc2OjMxNjZBQzo1QkIzRTdDOjdCMTNFMEM6NkFGQUUyM0UiLCJ2aXNpdG9yX2lkIjoiNTc0MjI4NTkyNjk1NjcyMDcwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ce44e0993a539cfd4c3d43ea8db74daad8dba5f14cba96a089a3703816209b29 |
| hovercard-subject-tag | issue:5988164898 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/5054/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a693666be700aefae7a1b52ccad6189b7c0c6a8b917c4371015acb8fea1ecb58/triggerdotdev/trigger.dev/issues/5054 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a693666be700aefae7a1b52ccad6189b7c0c6a8b917c4371015acb8fea1ecb58/triggerdotdev/trigger.dev/issues/5054 |
| og:image:alt | Provide environment information Self-hosted Trigger.dev v4.7.7 (webapp, supervisor, Helm chart 4.7.7) CLI trigger.dev 4.7.7, runtime: "node-26" Webapp configured with custom base images (#5005): DE... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vlakshmanan-silkline |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d9bd51a568909a83d1abb9d6f74d68f0c87ca85fe3a56d3f5d70d8b89add9f2 |
| turbo-cache-control | no-preview |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a7ae932999cc6d511008dbf980ff9efad2a31f7 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width