diff --git a/docs/pipelines/agents/docker.md b/docs/pipelines/agents/docker.md index 59c67b4ee22..a3ce0938ba7 100644 --- a/docs/pipelines/agents/docker.md +++ b/docs/pipelines/agents/docker.md @@ -241,6 +241,35 @@ Next, create the Dockerfile. ENTRYPOINT [ "./start.sh" ] ``` + * For Ubuntu 24.04: + ```dockerfile + FROM ubuntu:24.04 + ENV TARGETARCH="linux-x64" + # Also can be "linux-arm", "linux-arm64". + + RUN apt update && \ + apt upgrade -y && \ + apt install -y curl git jq libicu74 + + # Install Azure CLI + RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash + + WORKDIR /azp/ + + COPY ./start.sh ./ + RUN chmod +x ./start.sh + + # Create agent user and set up home directory + RUN useradd -m -d /home/agent agent + RUN chown -R agent:agent /azp /home/agent + + USER agent + # Another option is to run the agent as root. + # ENV AGENT_ALLOW_RUNASROOT="true" + + ENTRYPOINT [ "./start.sh" ] + ``` + * For Ubuntu 22.04: ```dockerfile FROM ubuntu:22.04