-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-ado-agent-amd64
47 lines (38 loc) · 1.55 KB
/
Dockerfile-ado-agent-amd64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM ubuntu:22.04
LABEL version="22.04" \
description="Image to create ADO agent for amd64 architecture" \
maintainer="[email protected]"
# core ubuntu packages
RUN apt update
RUN apt upgrade -y
RUN apt install -y curl git jq libicu70
# powershell
RUN apt-get update
RUN apt-get install -y wget apt-transport-https software-properties-common
RUN . /etc/os-release && wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update
RUN apt-get install -y powershell
# docker
RUN for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do apt-get remove $pkg; done
RUN apt-get update
RUN apt-get install -y ca-certificates curl gnupg
RUN install -m 0755 -d /etc/apt/keyrings
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
RUN chmod a+r /etc/apt/keyrings/docker.gpg
RUN echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt-get update
RUN apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# .net core
RUN apt-get update
RUN apt-get install -y dotnet-sdk-6.0
# startup
ENV TARGETARCH="linux-x64"
WORKDIR /azp/
COPY /azure-devops/agents/start.sh ./
RUN chmod +x ./start.sh
ENTRYPOINT ./start.sh