Switch to directly using Ubuntu image.
This commit is contained in:
parent
f19cf5f647
commit
a387476d90
10
Dockerfile
10
Dockerfile
|
@ -12,13 +12,21 @@ RUN go install github.com/aptible/supercronic@v0.2.1
|
||||||
|
|
||||||
RUN go install github.com/centrifugal/centrifugo/v4@v4.1.2
|
RUN go install github.com/centrifugal/centrifugo/v4@v4.1.2
|
||||||
|
|
||||||
|
#
|
||||||
|
# MariaDB dependencies build step
|
||||||
|
#
|
||||||
|
FROM mariadb:10.9-jammy AS mariadb
|
||||||
|
|
||||||
#
|
#
|
||||||
# Final build image
|
# Final build image
|
||||||
#
|
#
|
||||||
FROM mariadb:10.9-jammy
|
FROM ubuntu:jammy
|
||||||
|
|
||||||
ENV TZ="UTC"
|
ENV TZ="UTC"
|
||||||
|
|
||||||
|
COPY --from=mariadb /usr/local/bin/healthcheck.sh /usr/local/bin/db_healthcheck.sh
|
||||||
|
COPY --from=mariadb /usr/local/bin/docker-entrypoint.sh /usr/local/bin/db_entrypoint.sh
|
||||||
|
|
||||||
# Add Dockerize
|
# Add Dockerize
|
||||||
COPY --from=go-dependencies /go/bin/dockerize /usr/local/bin
|
COPY --from=go-dependencies /go/bin/dockerize /usr/local/bin
|
||||||
COPY --from=go-dependencies /go/bin/supercronic /usr/local/bin/supercronic
|
COPY --from=go-dependencies /go/bin/supercronic /usr/local/bin/supercronic
|
||||||
|
|
|
@ -2,10 +2,28 @@
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# MariaDB setup is handled by the "parent" image.
|
apt-get install apt-transport-https curl
|
||||||
|
curl -o /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc 'https://mariadb.org/mariadb_release_signing_key.asc'
|
||||||
|
echo 'deb https://mirrors.gigenet.com/mariadb/repo/10.9/ubuntu jammy main' >> /etc/apt/sources.list
|
||||||
|
|
||||||
mv /usr/local/bin/healthcheck.sh /usr/local/bin/db_healthcheck.sh
|
apt-get update
|
||||||
mv /usr/local/bin/docker-entrypoint.sh /usr/local/bin/db_entrypoint.sh
|
|
||||||
|
{ \
|
||||||
|
echo "mariadb-server" mysql-server/root_password password 'unused'; \
|
||||||
|
echo "mariadb-server" mysql-server/root_password_again password 'unused'; \
|
||||||
|
} | debconf-set-selections
|
||||||
|
|
||||||
|
apt-get install -q -y --no-install-recommends mariadb-server mariadb-backup
|
||||||
|
|
||||||
|
# comment out a few problematic configuration values
|
||||||
|
find /etc/mysql/ -name '*.cnf' -print0 \
|
||||||
|
| xargs -0 grep -lZE '^(bind-address|log|user\s)' \
|
||||||
|
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/';
|
||||||
|
|
||||||
|
# don't reverse lookup hostnames, they are usually another container
|
||||||
|
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf;
|
||||||
|
|
||||||
|
mkdir /docker-entrypoint-initdb.d
|
||||||
|
|
||||||
cp /bd_build/mariadb/mariadb/db.sql /docker-entrypoint-initdb.d/00-azuracast.sql
|
cp /bd_build/mariadb/mariadb/db.sql /docker-entrypoint-initdb.d/00-azuracast.sql
|
||||||
cp /bd_build/mariadb/mariadb/db.cnf.tmpl /etc/mysql/db.cnf.tmpl
|
cp /bd_build/mariadb/mariadb/db.cnf.tmpl /etc/mysql/db.cnf.tmpl
|
||||||
|
|
Loading…
Reference in New Issue