mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
move apt pkgs to the toolset.json
This commit is contained in:
@@ -11,8 +11,10 @@ systemctl disable apt-daily-upgrade.service
|
||||
# Configure apt to always assume Y
|
||||
echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes
|
||||
|
||||
# Use apt-fast for parallel downloads
|
||||
# Install aria2 and jq
|
||||
apt-get install aria2
|
||||
apt-get install jq
|
||||
# Use apt-fast for parallel downloads
|
||||
add-apt-repository -y ppa:apt-fast/stable
|
||||
apt-get update
|
||||
apt-get -y install apt-fast
|
||||
apt-get install apt-fast
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: containercache.sh
|
||||
## Desc: Prepulls Docker images used in build tasks and templates
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
# Check prereqs
|
||||
echo "Checking prereqs for image pulls"
|
||||
if ! command -v docker; then
|
||||
echo "Docker is not installed, cant pull images"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Information output
|
||||
systemctl status docker --no-pager
|
||||
|
||||
# Pull images
|
||||
images=(
|
||||
docker.io/jekyll/builder
|
||||
mcr.microsoft.com/azure-pipelines/node8-typescript
|
||||
)
|
||||
|
||||
for image in "${images[@]}"; do
|
||||
docker pull "$image"
|
||||
done
|
||||
|
||||
## Add container information to the metadata file
|
||||
DocumentInstalledItem "Cached container images"
|
||||
|
||||
while read -r line; do
|
||||
DocumentInstalledItemIndent "$line"
|
||||
done <<< "$(docker images --digests --format '{{.Repository}}:{{.Tag}} (Digest: {{.Digest}})')"
|
||||
@@ -4,90 +4,13 @@
|
||||
## Desc: Installs basic command line utilities and dev packages
|
||||
################################################################################
|
||||
|
||||
set -e
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
set -e
|
||||
|
||||
common_packages="dnsutils
|
||||
iproute2
|
||||
iputils-ping
|
||||
libunwind8
|
||||
locales
|
||||
openssh-client
|
||||
tzdata
|
||||
upx
|
||||
zstd
|
||||
libxkbfile-dev
|
||||
pkg-config
|
||||
libsecret-1-dev
|
||||
libxss1
|
||||
libgconf-2-4
|
||||
dbus
|
||||
xvfb
|
||||
libgbm-dev
|
||||
libgtk-3-0
|
||||
tk
|
||||
fakeroot
|
||||
dpkg
|
||||
rpm
|
||||
xz-utils
|
||||
xorriso
|
||||
zsync
|
||||
gnupg2
|
||||
lib32z1
|
||||
texinfo
|
||||
libsqlite3-dev
|
||||
libc++-dev
|
||||
libc++abi-dev"
|
||||
|
||||
cmd_packages="curl
|
||||
file
|
||||
ftp
|
||||
jq
|
||||
netcat
|
||||
ssh
|
||||
parallel
|
||||
rsync
|
||||
shellcheck
|
||||
sudo
|
||||
telnet
|
||||
time
|
||||
unzip
|
||||
zip
|
||||
wget
|
||||
m4
|
||||
bison
|
||||
flex
|
||||
patchelf
|
||||
bzip2
|
||||
sqlite3
|
||||
brotli
|
||||
yamllint"
|
||||
|
||||
if isUbuntu20 ; then
|
||||
echo "Install python2"
|
||||
apt-get install -y --no-install-recommends python-is-python2
|
||||
fi
|
||||
|
||||
echo "Install libcurl"
|
||||
if isUbuntu16 || isUbuntu18; then
|
||||
libcurelVer="libcurl3"
|
||||
fi
|
||||
|
||||
if isUbuntu20 ; then
|
||||
libcurelVer="libcurl4"
|
||||
fi
|
||||
|
||||
apt-get install -y --no-install-recommends $libcurelVer
|
||||
|
||||
# install additional packages only for Ubuntu16.04
|
||||
if isUbuntu16; then
|
||||
common_packages="$common_packages
|
||||
libicu55"
|
||||
fi
|
||||
|
||||
toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json"
|
||||
common_packages=$(jq -r ".apt.common_packages[]" $toolsetJson)
|
||||
cmd_packages=$(jq -r ".apt.cmd_packages[]" $toolsetJson)
|
||||
for package in $common_packages $cmd_packages; do
|
||||
echo "Install $package"
|
||||
apt-get install -y --no-install-recommends $package
|
||||
@@ -108,5 +31,3 @@ DocumentInstalledItem "Basic packages:"
|
||||
for package in $common_packages $cmd_packages; do
|
||||
DocumentInstalledItemIndent $package
|
||||
done
|
||||
|
||||
DocumentInstalledItemIndent "$libcurelVer"
|
||||
|
||||
@@ -49,19 +49,28 @@ else
|
||||
set +e
|
||||
fi
|
||||
|
||||
docker pull node:10
|
||||
docker pull node:12
|
||||
docker pull buildpack-deps:stretch
|
||||
docker pull buildpack-deps:buster
|
||||
docker pull node:10-alpine
|
||||
docker pull node:12-alpine
|
||||
docker pull debian:8
|
||||
docker pull debian:9
|
||||
docker pull alpine:3.7
|
||||
docker pull alpine:3.8
|
||||
docker pull alpine:3.9
|
||||
docker pull alpine:3.10
|
||||
docker pull ubuntu:14.04
|
||||
# Pull images
|
||||
images=(
|
||||
node:10
|
||||
node:12
|
||||
buildpack-deps:stretch
|
||||
buildpack-deps:buster
|
||||
node:10-alpine
|
||||
node:12-alpine
|
||||
debian:8
|
||||
debian:9
|
||||
alpine:3.7
|
||||
alpine:3.8
|
||||
alpine:3.9
|
||||
alpine:3.10
|
||||
ubuntu:14.04
|
||||
docker.io/jekyll/builder
|
||||
mcr.microsoft.com/azure-pipelines/node8-typescript
|
||||
)
|
||||
|
||||
for image in "${images[@]}"; do
|
||||
docker pull "$image"
|
||||
done
|
||||
|
||||
## Add version information to the metadata file
|
||||
echo "Documenting Docker version"
|
||||
@@ -71,3 +80,10 @@ DocumentInstalledItem "Docker-Moby ($docker_version)"
|
||||
echo "Documenting Docker-buildx version"
|
||||
DOCKER_BUILDX_VERSION=$(docker buildx version | cut -d ' ' -f2)
|
||||
DocumentInstalledItem "Docker-Buildx ($DOCKER_BUILDX_VERSION)"
|
||||
|
||||
## Add container information to the metadata file
|
||||
DocumentInstalledItem "Cached container images"
|
||||
|
||||
while read -r line; do
|
||||
DocumentInstalledItemIndent "$line"
|
||||
done <<< "$(docker images --digests --format '{{.Repository}}:{{.Tag}} (Digest: {{.Digest}})')"
|
||||
Reference in New Issue
Block a user