move apt pkgs to the toolset.json

This commit is contained in:
Aleksandr Chebotov
2020-09-08 14:40:56 +03:00
parent 54978f0e06
commit 2881a81b22
10 changed files with 263 additions and 206 deletions

View File

@@ -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"

View File

@@ -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}})')"