Images need to have a base setup in order to run properly with Nx Agents. There are two ways to go about setting up your base image. It's recommended to extend our base image. If you cannot extend our image, manually configure your image with the required steps.
Do not override the USER
, WORKDIR
or ENTRYPOINT
from the base image.
//nx-agent-base-image.dockerfileFROM us-east1-docker.pkg.dev/nxcloudoperations/nx-cloud-enterprise-public/nx-agents-base-images:ubuntu22.04-node20.19-v2 as base
# Add any steps you need such as installing required softwareRUN sudo apt-get install....RUN sudo chmod ....
It's required to use Ubuntu as the base
// nx-agent-base-image.dockerfileFROM ubuntu:22.04 as base
# Create workflow userRUN groupadd -g 10001 workflowsRUN useradd -m -u 10000 -g 10001 workflowsRUN mkdir /home/workflows/workspaceRUN mkdir -p /home/workflows/.npm-global/lib /home/workflows/.npm-global/binRUN mkdir -p /home/workflows/.nvmRUN chown -R 10000:10001 /home/workflowsENV PATH=$PATH:/home/workflows/.npm-global/bin
# DockerCOPY --from=docker:24.0.2 /usr/local/bin /usr/local/binCOPY --from=docker:24.0.2 /usr/local/libexec /usr/local/libexec
USER workflows
WORKDIR /home/workflows/workspace
ENTRYPOINT [ "/home/workflows/executor-binary/nx-cloud-workflow-executor" ]
Checklist
Section titled “Checklist”- Image is publicly accessible to the Nx Cloud instance being used.
- If your image must remain behind a private registry, please contact your DPE to discuss potential solutions.
USER
,WORKDIR
andENTRYPOINT
are not overridden- If manually setting they are correctly configured as outlined in the Manual step above.
- Image is used in a custom launch template via its fully qualified path