mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 15:20:11 +00:00
[Ubuntu] Pin Docker 24.0.7 to avoid bugs (#9205)
* [Ubuntu] Pin Docker 24.0.7 to avoid bugs * Fix character escaping for jq * Fix order of install
This commit is contained in:
@@ -11,18 +11,31 @@ source $HELPER_SCRIPTS/install.sh
|
|||||||
REPO_URL="https://download.docker.com/linux/ubuntu"
|
REPO_URL="https://download.docker.com/linux/ubuntu"
|
||||||
GPG_KEY="/usr/share/keyrings/docker.gpg"
|
GPG_KEY="/usr/share/keyrings/docker.gpg"
|
||||||
REPO_PATH="/etc/apt/sources.list.d/docker.list"
|
REPO_PATH="/etc/apt/sources.list.d/docker.list"
|
||||||
|
os_codename=$(lsb_release -cs)
|
||||||
|
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o $GPG_KEY
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o $GPG_KEY
|
||||||
echo "deb [arch=amd64 signed-by=$GPG_KEY] $REPO_URL $(lsb_release -cs) stable" > $REPO_PATH
|
echo "deb [arch=amd64 signed-by=$GPG_KEY] $REPO_URL ${os_codename} stable" > $REPO_PATH
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin
|
|
||||||
|
for pkg in containerd.io docker-ce-cli docker-ce docker-buildx-plugin; do
|
||||||
|
version=$(get_toolset_value ".docker.components.\"$pkg\"")
|
||||||
|
if [[ $version == "latest" ]]; then
|
||||||
|
components_to_install+="${pkg} "
|
||||||
|
else
|
||||||
|
version_string=$(apt-cache madison "${pkg}" | awk '{ print $3 }' | grep "${version}" | grep "${os_codename}" | head -1)
|
||||||
|
components_to_install+="${pkg}=${version_string} "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
apt-get install -y --no-install-recommends $components_to_install
|
||||||
|
|
||||||
# Download docker compose v2 from releases
|
# Download docker compose v2 from releases
|
||||||
# Temporaty pinned to v2.23.3 due https://github.com/actions/runner-images/issues/9172
|
# Temporaty pinned to v2.23.3 due https://github.com/actions/runner-images/issues/9172
|
||||||
URL=$(resolve_github_release_asset_url "docker/compose" "endswith(\"compose-linux-x86_64\")" "2.23.3")
|
compose_version=$(get_toolset_value ".docker.components.compose")
|
||||||
|
URL=$(resolve_github_release_asset_url "docker/compose" "endswith(\"compose-linux-x86_64\")" "${compose_version}")
|
||||||
compose_binary_path=$(download_with_retry "${URL}" "/tmp/docker-compose-v2")
|
compose_binary_path=$(download_with_retry "${URL}" "/tmp/docker-compose-v2")
|
||||||
|
|
||||||
# Supply chain security - Docker Compose v2
|
# Supply chain security - Docker Compose v2
|
||||||
compose_hash_url=$(resolve_github_release_asset_url "docker/compose" "endswith(\"checksums.txt\")" "2.23.3")
|
compose_hash_url=$(resolve_github_release_asset_url "docker/compose" "endswith(\"checksums.txt\")" "${compose_version}")
|
||||||
compose_external_hash=$(get_checksum_from_url "${compose_hash_url}" "compose-linux-x86_64" "SHA256")
|
compose_external_hash=$(get_checksum_from_url "${compose_hash_url}" "compose-linux-x86_64" "SHA256")
|
||||||
use_checksum_comparison "${compose_binary_path}" "${compose_external_hash}"
|
use_checksum_comparison "${compose_binary_path}" "${compose_external_hash}"
|
||||||
|
|
||||||
|
|||||||
@@ -236,7 +236,14 @@
|
|||||||
"node:18-alpine",
|
"node:18-alpine",
|
||||||
"node:20-alpine",
|
"node:20-alpine",
|
||||||
"ubuntu:20.04"
|
"ubuntu:20.04"
|
||||||
]
|
],
|
||||||
|
"components": {
|
||||||
|
"docker-ce": "24.0.7",
|
||||||
|
"docker-ce-cli": "24.0.7",
|
||||||
|
"containerd.io": "latest",
|
||||||
|
"docker-buildx-plugin": "latest",
|
||||||
|
"compose": "2.23.3"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"pipx": [
|
"pipx": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -227,7 +227,14 @@
|
|||||||
"node:20-alpine",
|
"node:20-alpine",
|
||||||
"ubuntu:20.04",
|
"ubuntu:20.04",
|
||||||
"ubuntu:22.04"
|
"ubuntu:22.04"
|
||||||
]
|
],
|
||||||
|
"components": {
|
||||||
|
"docker-ce": "24.0.7",
|
||||||
|
"docker-ce-cli": "24.0.7",
|
||||||
|
"containerd.io": "latest",
|
||||||
|
"docker-buildx-plugin": "latest",
|
||||||
|
"compose": "2.23.3"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"pipx": [
|
"pipx": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user