Skip to content

Commit 89da51e

Browse files
authored
Merge pull request #14318 from bdovaz/add-ubuntu-24-04-Dockerfile
add Ubuntu 24.04 Dockerfile example
2 parents 3df2548 + 02c74a2 commit 89da51e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/pipelines/agents/docker.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,35 @@ Next, create the Dockerfile.
241241
ENTRYPOINT [ "./start.sh" ]
242242
```
243243

244+
* For Ubuntu 24.04:
245+
```dockerfile
246+
FROM ubuntu:24.04
247+
ENV TARGETARCH="linux-x64"
248+
# Also can be "linux-arm", "linux-arm64".
249+
250+
RUN apt update && \
251+
apt upgrade -y && \
252+
apt install -y curl git jq libicu74
253+
254+
# Install Azure CLI
255+
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
256+
257+
WORKDIR /azp/
258+
259+
COPY ./start.sh ./
260+
RUN chmod +x ./start.sh
261+
262+
# Create agent user and set up home directory
263+
RUN useradd -m -d /home/agent agent
264+
RUN chown -R agent:agent /azp /home/agent
265+
266+
USER agent
267+
# Another option is to run the agent as root.
268+
# ENV AGENT_ALLOW_RUNASROOT="true"
269+
270+
ENTRYPOINT [ "./start.sh" ]
271+
```
272+
244273
* For Ubuntu 22.04:
245274
```dockerfile
246275
FROM ubuntu:22.04

0 commit comments

Comments
 (0)