pixelfed/docker/shared/root/docker/install/base.sh

62 lines
1.1 KiB
Bash
Raw Normal View History

2024-01-04 13:07:01 +00:00
#!/bin/bash
set -ex -o errexit -o nounset -o pipefail
# Ensure we keep apt cache around in a Docker environment
rm -f /etc/apt/apt.conf.d/docker-clean
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
2024-01-04 13:07:01 +00:00
# Don't install recommended packages by default
echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf
2024-01-04 13:07:01 +00:00
# Don't install suggested packages by default
echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf
2024-01-04 13:07:01 +00:00
2024-01-15 18:53:54 +00:00
declare -a packages=()
2024-01-04 13:07:01 +00:00
# Standard packages
2024-01-15 18:53:54 +00:00
packages+=(
2024-01-04 13:07:01 +00:00
apt-utils
ca-certificates
2024-01-04 20:55:04 +00:00
curl
2024-01-04 13:07:01 +00:00
git
gnupg1
gosu
locales
locales-all
2024-01-05 23:16:26 +00:00
moreutils
2024-01-04 13:07:01 +00:00
nano
procps
2024-01-04 20:55:04 +00:00
software-properties-common
2024-01-04 13:07:01 +00:00
unzip
2024-01-04 20:55:04 +00:00
wget
2024-01-04 13:07:01 +00:00
zip
)
# Image Optimization
2024-01-15 18:53:54 +00:00
packages+=(
2024-01-04 13:07:01 +00:00
gifsicle
jpegoptim
optipng
pngquant
)
# Video Processing
2024-01-15 18:53:54 +00:00
packages+=(
2024-01-04 13:07:01 +00:00
ffmpeg
)
# Database
2024-01-15 18:53:54 +00:00
packages+=(
2024-01-05 23:16:26 +00:00
mariadb-client
postgresql-client
2024-01-04 13:07:01 +00:00
)
2024-01-15 18:53:54 +00:00
readarray -d ' ' -t -O "${#packages[@]}" packages < <(echo -n "${APT_PACKAGES_EXTRA:-}")
2024-01-04 13:07:01 +00:00
2024-01-15 18:53:54 +00:00
apt-get update
2024-01-04 13:07:01 +00:00
apt-get upgrade -y
2024-01-15 18:53:54 +00:00
apt-get install -y "${packages[@]}"
2024-01-04 13:07:01 +00:00
locale-gen
update-locale