gitlab-build-images/scripts/install-essentials
Stan Hu a7a13a87d6 Add Ruby 2.7 images for GitLab CE/EE images
Ruby 2.7.1 is only available on Debian Buster, so we have to upgrade
from Debian Stretch.

Fix install-essentials for Debian 10 (Buster):

1. MySQL client is no longer needed
2. Yank libgdbm3 and libgdbm-dev because it's not clear why it's needed
3. Pull legacy nodejs from Debian Buster builds since Node 12.x conflicted
2020-08-04 12:57:50 -07:00

47 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
set -xeuo pipefail
IFS=$'\n\t'
export DEBIAN_FRONTEND=noninteractive
apt-get update
EXIT_CODE=0
grep "Debian GNU/Linux 9" /etc/issue || EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]
then
apt-get install -y \
curl wget build-essential apt-utils locales \
libssl-dev libyaml-dev libreadline6-dev zlib1g-dev \
libncurses5-dev libffi-dev libgdbm3 libgdbm-dev \
ca-certificates libyaml-dev checkinstall libxml2-dev \
libxslt-dev libcurl4-openssl-dev libicu-dev \
logrotate python-docutils pkg-config cmake nodejs \
libkrb5-dev postgresql-client mysql-client unzip \
libre2-dev gettext rsync
else
apt-get install -y \
curl wget build-essential apt-utils locales \
libssl-dev libyaml-dev libreadline-dev zlib1g-dev \
libncurses5-dev libffi-dev ca-certificates libyaml-dev libxml2-dev \
libxslt1-dev libcurl4-openssl-dev libicu-dev \
logrotate python-docutils pkg-config cmake \
libkrb5-dev postgresql-client unzip \
libre2-dev gettext rsync
fi
# Set UTF-8
# http://stackoverflow.com/a/3182519/2137281
LOC=$'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8'
echo "$LOC" > /etc/environment
cat /etc/environment
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen
dpkg-reconfigure locales -f noninteractive -p critical
locale -a
apt-get autoremove -yq
apt-get clean -yqq
rm -rf /var/lib/apt/lists/*