|
1 | 1 | # syntax=docker/dockerfile:1.4
|
2 | 2 |
|
3 |
| -FROM public.ecr.aws/ubuntu/ubuntu:20.04@sha256:4a885c102bc7de9ff2ffc4b11b65f35e46827d608069cd959181718aa7d14731 |
4 |
| - |
| 3 | +FROM public.ecr.aws/buildkite/agent-base:ubuntu-20.04@sha256:6bcb19149500f017fa4fa75fc2a3c082d3f35df94784594737beaf62568e2613 |
5 | 4 | ARG TARGETOS
|
6 | 5 | ARG TARGETARCH
|
7 | 6 |
|
8 |
| -RUN <<BASH |
9 |
| -#!/usr/bin/env bash |
10 |
| - |
11 |
| -set -eufo pipefail |
12 |
| - |
13 |
| -export DEBIAN_FRONTEND=noninteractive |
14 |
| - |
15 |
| -# Install main packages |
16 |
| -apt-get update |
17 |
| -apt-get install -y --no-install-recommends \ |
18 |
| - apt-transport-https \ |
19 |
| - bash \ |
20 |
| - ca-certificates \ |
21 |
| - curl \ |
22 |
| - git \ |
23 |
| - gnupg-agent \ |
24 |
| - jq \ |
25 |
| - openssh-client \ |
26 |
| - perl \ |
27 |
| - python3 \ |
28 |
| - python3-pip \ |
29 |
| - rsync \ |
30 |
| - software-properties-common \ |
31 |
| - tini |
32 |
| - |
33 |
| -# Install Docker Engine |
34 |
| -install -m 0755 -d /etc/apt/keyrings |
35 |
| -curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc |
36 |
| -chmod a+r /etc/apt/keyrings/docker.asc |
37 |
| -echo \ |
38 |
| - "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ |
39 |
| - $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ |
40 |
| - tee /etc/apt/sources.list.d/docker.list > /dev/null |
41 |
| - |
42 |
| -# We just updated the main sources. This only updates the docker source |
43 |
| -apt-get update -o Dir::Etc::sourcelist="sources.list.d/docker.list" \ |
44 |
| - -o Dir::Etc::sourceparts="-" \ |
45 |
| - -o APT::Get::List-Cleanup="0" |
46 |
| -apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
47 |
| - |
48 |
| -rm -rf /var/lib/apt/lists/* |
49 |
| - |
50 |
| -ln -s /usr/bin/tini /usr/sbin/tini |
51 |
| - |
52 |
| -mkdir -p /buildkite/builds /buildkite/hooks /buildkite/plugins |
53 |
| -curl -Lfs -o /usr/local/bin/ssh-env-config.sh https://raw.githubusercontent.com/buildkite/docker-ssh-env-config/master/ssh-env-config.sh |
54 |
| -chmod +x /usr/local/bin/ssh-env-config.sh |
55 |
| -BASH |
56 |
| - |
57 | 7 | ENV BUILDKITE_AGENT_CONFIG=/buildkite/buildkite-agent.cfg \
|
58 | 8 | PATH="/usr/local/bin:${PATH}"
|
59 | 9 |
|
60 |
| -COPY ./docker-compose /usr/local/bin/docker-compose |
| 10 | +RUN mkdir -p /buildkite/builds /buildkite/hooks /buildkite/plugins \ |
| 11 | + && curl -Lfs -o /usr/local/bin/ssh-env-config.sh https://raw.githubusercontent.com/buildkite/docker-ssh-env-config/master/ssh-env-config.sh \ |
| 12 | + && chmod +x /usr/local/bin/ssh-env-config.sh |
| 13 | + |
61 | 14 | COPY ./buildkite-agent.cfg /buildkite/buildkite-agent.cfg
|
62 | 15 | COPY ./buildkite-agent-$TARGETOS-$TARGETARCH /usr/local/bin/buildkite-agent
|
63 | 16 | COPY ./entrypoint.sh /usr/local/bin/buildkite-agent-entrypoint
|
|
0 commit comments