-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ubuntu
89 lines (82 loc) · 4.49 KB
/
Dockerfile.ubuntu
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
FROM twdps/circleci-remote-docker:ubuntu-2024.12
LABEL org.opencontainers.image.title="circleci-base-image" \
org.opencontainers.image.description="Ubuntu-based CircleCI executor image" \
org.opencontainers.image.documentation="https://github.com/ThoughtWorks-DPS/circleci-base-image" \
org.opencontainers.image.source="https://github.com/ThoughtWorks-DPS/circleci-base-image" \
org.opencontainers.image.url="https://github.com/ThoughtWorks-DPS/circleci-base-image" \
org.opencontainers.image.vendor="ThoughtWorks, Inc." \
org.opencontainers.image.authors="[email protected]" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.created="CREATED" \
org.opencontainers.image.version="VERSION"
ENV DOCKER_VERSION=5:27.3.1-1~ubuntu.24.04~noble
ENV CONTAINERD_VERSION=1.7.22-1
ENV DOCKER_BUILDX_VERSION=0.17.1-1~ubuntu.24.04~noble
ENV ONEPASSWORD_VERSION=2.30.3
ENV VAULT_VERSION=1.18.1
ENV BUILDEVENTS_VERSION=0.17.0
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH=/home/circleci/bin:/home/circleci/.local/bin:$PATH \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
SHELL ["/bin/bash", "-exo", "pipefail", "-c"]
# hadolint ignore=DL4001,DL3004,DL3047,DL3027,DL3008,SC1091
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90forceyes && \
echo 'DPkg::Options "--force-confnew";' >> /etc/apt/apt.conf.d/90forceyes && \
apt update && apt-get install --no-install-recommends -y \
sudo=1.9.15p5-3ubuntu5 \
locales=2.40-1ubuntu3 \
tzdata=2024a-4ubuntu1 \
libcurl4-openssl-dev=8.9.1-2ubuntu2.1 \
apt-transport-https=2.9.8 \
lsb-release=12.1-1 \
gettext-base=0.22.5-2 \
build-essential=12.10ubuntu1 \
gcc=4:14.1.0-2ubuntu1 \
g++=4:14.1.0-2ubuntu1 \
cmake=3.30.3-1 \
make=4.3-4.1build2 \
curl=8.9.1-2ubuntu2.1 \
wget=1.24.5-1ubuntu2 \
unzip=6.0-28ubuntu6 \
zip=3.0-14ubuntu0.1 \
bzip2=1.0.8-6 \
jq=1.7.1-3build1 \
git-lfs=3.5.0-1 \
gnupg=2.4.4-2ubuntu18 \
gnupg-agent=2.4.4-2ubuntu18 && \
sudo install -m 0755 -d /etc/apt/keyrings && \
sudo bash -c "curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc" && \
sudo chmod a+r /etc/apt/keyrings/docker.asc && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo noble) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \
sudo apt-get update && \
sudo apt-get install --no-install-recommends -y \
docker-ce=${DOCKER_VERSION} \
docker-ce-cli=${DOCKER_VERSION} \
containerd.io=${CONTAINERD_VERSION} \
docker-buildx-plugin=${DOCKER_BUILDX_VERSION} && \
curl -L https://cache.agilebits.com/dist/1P/op2/pkg/v${ONEPASSWORD_VERSION}/op_linux_amd64_v${ONEPASSWORD_VERSION}.zip -o op.zip && \
unzip -o op.zip && sudo mv op /usr/local/bin/op && \
rm op.zip && rm op.sig && \
curl -SLO "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" > "vault_${VAULT_VERSION}_linux_amd64.zip" && \
sudo unzip "vault_${VAULT_VERSION}_linux_amd64.zip" -d /usr/local/bin && \
sudo rm "vault_${VAULT_VERSION}_linux_amd64.zip" && \
curl -L -o buildevents https://github.com/honeycombio/buildevents/releases/download/v${BUILDEVENTS_VERSION}/buildevents-linux-amd64 && \
chmod +x buildevents && \
sudo mv buildevents /usr/local/bin/buildevents && \
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen && \
useradd --uid=3434 --user-group --create-home circleci && \
usermod --shell /bin/bash circleci && \
echo 'circleci ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
sudo -u circleci mkdir -p /home/circleci/project && \
sudo -u circleci mkdir -p /home/circleci/bin && \
sudo -u circleci mkdir -p /home/circleci/.local/bin && \
sudo -u circleci mkdir /home/circleci/.gnupg && \
sudo -u circleci bash -c "echo 'allow-loopback-pinentry' > /home/circleci/.gnupg/gpg-agent.conf" && \
sudo -u circleci bash -c "echo 'pinentry-mode loopback' > /home/circleci/.gnupg/gpg.conf" && \
chmod 700 /home/circleci/.gnupg && chmod 600 /home/circleci/.gnupg/* && \
sudo apt-get clean && \
rm -rf /var/lib/apt/lists/*
USER circleci
WORKDIR /home/circleci/project