|
@@ -1,27 +1,28 @@
|
|
-FROM buildpack-deps:bionic
|
|
|
|
|
|
+FROM buildpack-deps:jammy
|
|
|
|
+
|
|
|
|
+ARG MYSQL_VERSION=8.0
|
|
|
|
|
|
ADD create.sql create.sql
|
|
ADD create.sql create.sql
|
|
ADD my.cnf my.cnf
|
|
ADD my.cnf my.cnf
|
|
-ADD mysql.list mysql.list
|
|
|
|
-
|
|
|
|
-RUN cp mysql.list /etc/apt/sources.list.d/
|
|
|
|
-RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 467B942D3A79BD29
|
|
|
|
|
|
|
|
-RUN apt-get update > /dev/null
|
|
|
|
-RUN apt-get install -yqq locales > /dev/null
|
|
|
|
|
|
+ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
+RUN wget -qO - "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x859be8d7c586f538430b19c2467b942d3a79bd29" > \
|
|
|
|
+ /etc/apt/keyrings/mysql.asc
|
|
|
|
+RUN echo "deb [ signed-by=/etc/apt/keyrings/mysql.asc ] http://repo.mysql.com/apt/ubuntu jammy mysql-${MYSQL_VERSION}" > \
|
|
|
|
+ /etc/apt/sources.list.d/mysql.list
|
|
|
|
+RUN apt-get -yqq update && apt-get -yqq install apt-utils locales
|
|
|
|
|
|
RUN locale-gen en_US.UTF-8
|
|
RUN locale-gen en_US.UTF-8
|
|
-ENV LANG en_US.UTF-8
|
|
|
|
-ENV LANGUAGE en_US:en
|
|
|
|
-ENV LC_ALL en_US.UTF-8
|
|
|
|
|
|
+ENV LANG=en_US.UTF-8
|
|
|
|
+ENV LANGUAGE=en_US:en
|
|
|
|
+ENV LC_ALL=en_US.UTF-8
|
|
|
|
|
|
# https://bugs.mysql.com/bug.php?id=90695
|
|
# https://bugs.mysql.com/bug.php?id=90695
|
|
RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-server mysql-server/lowercase-table-names select Enabled\""]
|
|
RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-server mysql-server/lowercase-table-names select Enabled\""]
|
|
RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-community-server mysql-community-server/data-dir select 'Y'\""]
|
|
RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-community-server mysql-community-server/data-dir select 'Y'\""]
|
|
RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-community-server mysql-community-server/root-pass password secret\""]
|
|
RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-community-server mysql-community-server/root-pass password secret\""]
|
|
RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-community-server mysql-community-server/re-root-pass password secret\""]
|
|
RUN ["/bin/bash", "-c", "debconf-set-selections <<< \"mysql-community-server mysql-community-server/re-root-pass password secret\""]
|
|
-RUN echo "Installing mysql-server version: $(apt-cache policy mysql-server | grep -oP "(?<=Candidate: )(.*)$")"
|
|
|
|
-RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-server > /dev/null
|
|
|
|
|
|
+RUN apt-get -yqq install mysql-server
|
|
|
|
|
|
RUN mv /etc/mysql/my.cnf /etc/mysql/my.cnf.orig
|
|
RUN mv /etc/mysql/my.cnf /etc/mysql/my.cnf.orig
|
|
RUN cp my.cnf /etc/mysql/my.cnf
|
|
RUN cp my.cnf /etc/mysql/my.cnf
|