@@ -2,94 +2,14 @@ FROM ubuntu:focal
2
2
LABEL maintainer="
[email protected] "
3
3
4
4
ARG DUMB_INIT_VERSION="1.2.2"
5
- ARG GIT_CORE_PPA_KEY="A1715D88E1DF1F24"
6
-
7
5
# TODO: remove git PPA and skopeo customizations for focal when focal hits EOL
8
6
ENV GIT_LFS_VERSION="3.2.0"
7
+
9
8
ENV LANG=en_US.UTF-8
10
9
ENV LANGUAGE=en_US.UTF-8
11
10
ENV LC_ALL=en_US.UTF-8
12
11
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
13
12
ENV DEBIAN_FRONTEND=noninteractive
14
- # hadolint ignore=SC2086,DL3015,DL3008,DL3013,SC2015
15
- RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen \
16
- && apt-get update \
17
- && apt-get install -y --no-install-recommends gnupg \
18
- && ( \
19
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${GIT_CORE_PPA_KEY} \
20
- || apt-key adv --keyserver pgp.mit.edu --recv-keys ${GIT_CORE_PPA_KEY} \
21
- || apt-key adv --keyserver keyserver.pgp.com --recv-keys ${GIT_CORE_PPA_KEY} \
22
- ) \
23
- && apt-get update \
24
- && apt-get install -y --no-install-recommends \
25
- gnupg \
26
- lsb-release \
27
- curl \
28
- tar \
29
- unzip \
30
- zip \
31
- apt-transport-https \
32
- ca-certificates \
33
- sudo \
34
- gpg-agent \
35
- software-properties-common \
36
- build-essential \
37
- zlib1g-dev \
38
- zstd \
39
- gettext \
40
- libcurl4-openssl-dev \
41
- inetutils-ping \
42
- jq \
43
- wget \
44
- dirmngr \
45
- openssh-client \
46
- locales \
47
- python3-pip \
48
- python3-setuptools \
49
- python3-venv \
50
- python3 \
51
- dumb-init \
52
- nodejs \
53
- rsync \
54
- libpq-dev \
55
- gosu \
56
- pkg-config \
57
- && DPKG_ARCH="$(dpkg --print-architecture)" \
58
- && LSB_RELEASE_CODENAME="$(lsb_release --codename | cut -f2)" \
59
- && sed -e 's/Defaults.*env_reset/Defaults env_keep = "HTTP_PROXY HTTPS_PROXY NO_PROXY FTP_PROXY http_proxy https_proxy no_proxy ftp_proxy"/' -i /etc/sudoers \
60
- && ( [[ "${LSB_RELEASE_CODENAME}" == "focal" ]] && (echo deb http://ppa.launchpad.net/git-core/ppa/ubuntu focal main>/etc/apt/sources.list.d/git-core.list ) || : ) \
61
- && apt-get update \
62
- && ( apt-get install -y --no-install-recommends git || apt-get install -t stable -y --no-install-recommends git ) \
63
- && ( [[ $(apt-cache search -n liblttng-ust0 | awk '{print $1}') == "liblttng-ust0" ]] && apt-get install -y --no-install-recommends liblttng-ust0 || : ) \
64
- && ( [[ $(apt-cache search -n liblttng-ust1 | awk '{print $1}') == "liblttng-ust1" ]] && apt-get install -y --no-install-recommends liblttng-ust1 || : ) \
65
- && ( ( curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && unzip awscliv2.zip -d /tmp/ && /tmp/aws/install && rm awscliv2.zip) || pip3 install --no-cache-dir awscli ) \
66
- && ( curl -s "https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-${DPKG_ARCH}-v${GIT_LFS_VERSION}.tar.gz" -L -o /tmp/lfs.tar.gz && tar -xzf /tmp/lfs.tar.gz -C /tmp && /tmp/git-lfs-${GIT_LFS_VERSION}/install.sh && rm -rf /tmp/lfs.tar.gz /tmp/git-lfs-${GIT_LFS_VERSION}) \
67
- && distro=$(lsb_release -is | awk '{print tolower($0)}') \
68
- && mkdir -p /etc/apt/keyrings \
69
- && ( curl -fsSL https://download.docker.com/linux/${distro}/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg ) \
70
- && version=$(lsb_release -cs | sed 's/trixie\|n\/a/bookworm/g') \
71
- && ( echo "deb [arch=${DPKG_ARCH} signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/${distro} ${version} stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null ) \
72
- && apt-get update \
73
- && apt-get install -y docker-ce docker-ce-cli docker-buildx-plugin containerd.io docker-compose-plugin --no-install-recommends --allow-unauthenticated \
74
- && echo -e '#!/bin/sh\ndocker compose --compatibility "$@"' > /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose \
75
- && ( [[ "${LSB_RELEASE_CODENAME}" == "focal" ]] && ( echo "available in 20.10 and higher" && echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" | tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list && curl -L "https://build.opensuse.org/projects/devel:kubic/signing_keys/download?kind=gpg" | apt-key add - ) || : ) \
76
- && apt-get update \
77
- && ( apt-get install -y --no-install-recommends podman buildah skopeo || : ) \
78
- && GH_CLI_VERSION=$(curl -sL -H "Accept: application/vnd.github+json" https://api.github.com/repos/cli/cli/releases/latest | jq -r '.tag_name' | sed 's/^v//g') \
79
- && GH_CLI_DOWNLOAD_URL=$(curl -sL -H "Accept: application/vnd.github+json" https://api.github.com/repos/cli/cli/releases/latest | jq ".assets[] | select(.name == \"gh_${GH_CLI_VERSION}_linux_${DPKG_ARCH}.deb\")" | jq -r '.browser_download_url') \
80
- && curl -sSLo /tmp/ghcli.deb ${GH_CLI_DOWNLOAD_URL} && apt-get -y install /tmp/ghcli.deb && rm /tmp/ghcli.deb \
81
- && YQ_VERSION=$(curl -sL -H "Accept: application/vnd.github+json" https://api.github.com/repos/mikefarah/yq/releases/latest | jq -r '.tag_name' | sed 's/^v//g') \
82
- && YQ_DOWNLOAD_URL=$(curl -sL -H "Accept: application/vnd.github+json" https://api.github.com/repos/mikefarah/yq/releases/latest | jq ".assets[] | select(.name == \"yq_linux_${DPKG_ARCH}.tar.gz\")" | jq -r '.browser_download_url') \
83
- && ( curl -s ${YQ_DOWNLOAD_URL} -L -o /tmp/yq.tar.gz && tar -xzf /tmp/yq.tar.gz -C /tmp && mv /tmp/yq_linux_${DPKG_ARCH} /usr/local/bin/yq) \
84
- && PWSH_VERSION=$(curl -sL -H "Accept: application/vnd.github+json" https://api.github.com/repos/PowerShell/PowerShell/releases/latest | jq -r '.tag_name' | sed 's/^v//g') \
85
- && PWSH_DOWNLOAD_URL=$(curl -sL -H "Accept: application/vnd.github+json" https://api.github.com/repos/PowerShell/PowerShell/releases/latest | jq -r ".assets[] | select(.name == \"powershell-${PWSH_VERSION}-linux-${DPKG_ARCH//amd64/x64}.tar.gz\") | .browser_download_url") \
86
- && ( curl -L -o /tmp/powershell.tar.gz $PWSH_DOWNLOAD_URL && mkdir -p /opt/powershell && tar zxf /tmp/powershell.tar.gz -C /opt/powershell && chmod +x /opt/powershell/pwsh && ln -s /opt/powershell/pwsh /usr/bin/pwsh ) \
87
- && rm -rf /var/lib/apt/lists/* \
88
- && rm -rf /tmp/* \
89
- && sed -i 's/ulimit -Hn/# ulimit -Hn/g' /etc/init.d/docker \
90
- && groupadd -g 121 runner \
91
- && useradd -mr -d /home/runner -u 1001 -g 121 runner \
92
- && usermod -aG sudo runner \
93
- && usermod -aG docker runner \
94
- && echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
95
- && ( [[ -f /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list ]] && rm /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list || : )
13
+
14
+ COPY --chmod=700 build/ /tmp/build/
15
+ RUN /tmp/build/install_base.sh
0 commit comments