Cloud Agents not working with Dockerfile-based environment.json

Hey, thanks for the detailed report. The issue is that your Dockerfile doesn’t include git - Cloud Agents run git clone inside your custom container, so git needs to be available in the image.

Add git (and sudo is also recommended) to your apt-get install line:

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
  ca-certificates curl xz-utils git sudo \
  && apt-get clean && rm -rf /var/lib/apt/lists/*

The error message you’re seeing (“unexpected error”) is definitely not helpful here - we’re aware this needs to be improved.

This requirement isn’t currently documented, which is on us. A working Dockerfile reference with git included can be found in this thread.

Let me know if it works after the change.