@cfxlabsinc/nx-dockerWorkspace-internal Nx plugin for the projects that build a container image.
createNodesV2 watches **/project.json and contributes three targets to every containerized project:
image-build — docker buildx build … --loadimage-build-push — the same build with registry cache (--cache-from/--cache-to) and --pushdoppler-docker-serve — docker run of the resulting cfx-<project>:latest, with Doppler secrets and .env.local piped in as --env-filescacheref is deliberately absent from image-build-push's option defaults — CI supplies it (see container-build-push).
A project qualifies if either:
| Signal | Dockerfile used | Projects |
|---|---|---|
ships its own Dockerfile |
{projectRoot}/Dockerfile |
utila-cosigner |
tagged fargate |
docker/Dockerfile.node |
internal-dashboard, temporal-worker |
Both signals are needed. utila-cosigner has its own Dockerfile and no tag; the two Fargate services are tagged and share the root Dockerfile. Deriving the path this way also removes the per-project options.dockerfile override utila-cosigner used to carry.
Nothing else in the workspace builds an image: lambdas ship a bundled zip (build-lambda → zip, no ECR), and the Next.js dashboards deploy through SST/OpenNext or Vercel.
doppler-docker-servebank-dashboard and customer-dashboard used to opt into it, but neither has an image-build target, so docker run cfx-<name>:latest had no image to run — the same leftover admin-dashboard had already shed when it moved to SST + OpenNext.
utila-cosigner keeps its own doppler-docker-serve in project.json because it is genuinely different: it adds --init and passes AWS credentials via aws configure export-credentials.
Registered in workspace nx.json under plugins:
{
"plugin": "@cfxlabsinc/nx-docker",
"options": {}
}
The image-build, image-build-push and doppler-docker-serve entries in targetDefaults were removed — a targetDefault outranks an inferred target and would clobber the options set here. See @cfxlabsinc/nx-lambda.
Resolves through the workspace dependency in the root package.json:
"@cfxlabsinc/nx-docker": "workspace:*"