Skip to content

Commit fd169af

Browse files
committed
Add MySQL's key and repo and use it to install mysql-client, see edbizarro#117
1 parent 46f0ffa commit fd169af

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

php/scripts/packages.sh

+8-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup
1414
echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
1515
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf
1616
export DEBIAN_FRONTEND=noninteractive
17-
18-
dpkg-reconfigure -f noninteractive tzdata \
17+
# Debian doesn't include MySQL, so install its repo manually, see guide:
18+
# https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#repo-qg-apt-repo-manual-setup
19+
# Install MySQL's PGP key, allow for retry as MIT keyserver is often very slow
20+
apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 || apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5
21+
echo deb http://repo.mysql.com/apt/debian/ `lsb_release -sc` mysql-8.0 > /etc/apt/sources.list.d/mysql.list
22+
dpkg-reconfigure -f noninteractive tzdata \
1923
&& apt-get update \
2024
&& apt-get install -yq \
2125
apt-transport-https \
@@ -28,7 +32,7 @@ export DEBIAN_FRONTEND=noninteractive
2832
gnupg2 \
2933
jq \
3034
libc-client-dev \
31-
mariadb-client \
35+
mysql-client \
3236
mongo-tools \
3337
openssh-client \
3438
python \
@@ -38,4 +42,4 @@ export DEBIAN_FRONTEND=noninteractive
3842
unzip \
3943
zip \
4044
zlib1g-dev \
41-
&& rm -rf /var/lib/apt/lists/*
45+
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)