Skip to content

Commit 78a4149

Browse files
authored
Include original 18.04 steps
1 parent 963c7f7 commit 78a4149

File tree

1 file changed

+64
-30
lines changed

1 file changed

+64
-30
lines changed

docs/pipelines/agents/docker.md

Lines changed: 64 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -202,36 +202,70 @@ Next, create the Dockerfile.
202202
```
203203
204204
4. Save the following content to `~/dockeragent/Dockerfile`:
205-
206-
```docker
207-
FROM ubuntu:20.04
208-
209-
RUN DEBIAN_FRONTEND=noninteractive apt-get update
210-
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
211-
212-
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
213-
apt-transport-https \
214-
apt-utils \
215-
ca-certificates \
216-
curl \
217-
iputils-ping \
218-
jq \
219-
lsb-release \
220-
software-properties-common
221-
222-
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
223-
224-
# Can be 'linux-x64', 'linux-arm64', 'linux-arm', 'rhel.6-x64'.
225-
ENV TARGETARCH=linux-x64
226-
227-
WORKDIR /azp
228-
229-
COPY ./start.sh .
230-
RUN chmod +x start.sh
231-
232-
ENTRYPOINT [ "./start.sh" ]
233-
```
234-
205+
* For Ubuntu 20.04:
206+
```docker
207+
FROM ubuntu:20.04
208+
209+
RUN DEBIAN_FRONTEND=noninteractive apt-get update
210+
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
211+
212+
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
213+
apt-transport-https \
214+
apt-utils \
215+
ca-certificates \
216+
curl \
217+
iputils-ping \
218+
jq \
219+
lsb-release \
220+
software-properties-common
221+
222+
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
223+
224+
# Can be 'linux-x64', 'linux-arm64', 'linux-arm', 'rhel.6-x64'.
225+
ENV TARGETARCH=linux-x64
226+
227+
WORKDIR /azp
228+
229+
COPY ./start.sh .
230+
RUN chmod +x start.sh
231+
232+
ENTRYPOINT [ "./start.sh" ]
233+
```
234+
* For Ubuntu 18.04:
235+
```docker
236+
FROM ubuntu:18.04
237+
238+
# To make it easier for build and release pipelines to run apt-get,
239+
# configure apt to not require confirmation (assume the -y argument by default)
240+
ENV DEBIAN_FRONTEND=noninteractive
241+
RUN echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes
242+
243+
RUN apt-get update && apt-get install -y --no-install-recommends \
244+
ca-certificates \
245+
curl \
246+
jq \
247+
git \
248+
iputils-ping \
249+
libcurl4 \
250+
libicu60 \
251+
libunwind8 \
252+
netcat \
253+
libssl1.0 \
254+
&& rm -rf /var/lib/apt/lists/*
255+
256+
RUN curl -LsS https://aka.ms/InstallAzureCLIDeb | bash \
257+
&& rm -rf /var/lib/apt/lists/*
258+
259+
# Can be 'linux-x64', 'linux-arm64', 'linux-arm', 'rhel.6-x64'.
260+
ENV TARGETARCH=linux-x64
261+
262+
WORKDIR /azp
263+
264+
COPY ./start.sh .
265+
RUN chmod +x start.sh
266+
267+
ENTRYPOINT ["./start.sh"]
268+
```
235269
> [!NOTE]
236270
> Tasks might depend on executables that your container is expected to provide.
237271
> For instance, you must add the `zip` and `unzip` packages

0 commit comments

Comments
 (0)