1062b035ce
This PR allows users to select MariaDB versions. The original problem is that Trove fails to create backup of MariaDB- -10.7 instances because Trove's backup script is from MariaDB-10.4[1], which is generally incompatible with MariaDB-10.7[2]. 1: https://opendev.org/openstack/trove/src/branch/master/backup/install.sh#L26 2: https://mariadb.com/kb/en/mariabackup-overview/#compatibility-of-mariabackup-releases-with-mariadb-server-releases Story: 2010566 Task: 47275 Change-Id: I03e6b58a7b1746fef8c08d92acd7b1ccac9a46eb
30 lines
1.2 KiB
Docker
30 lines
1.2 KiB
Docker
FROM ubuntu:20.04
|
|
LABEL maintainer="anlin.kong@gmail.com"
|
|
|
|
ARG DATASTORE="mysql"
|
|
ARG DATASTORE_VERSION="5.7"
|
|
ARG APTOPTS="-y -qq --no-install-recommends --allow-unauthenticated"
|
|
|
|
RUN export DEBIAN_FRONTEND="noninteractive" \
|
|
&& export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install $APTOPTS gnupg2 lsb-release apt-utils apt-transport-https ca-certificates software-properties-common curl \
|
|
&& apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall netbase \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY . /opt/trove/backup
|
|
WORKDIR /opt/trove/backup
|
|
RUN ./install.sh --datastore $DATASTORE --datastore-version $DATASTORE_VERSION
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install $APTOPTS build-essential python3-setuptools python3-all python3-all-dev python3-pip libffi-dev libssl-dev libxml2-dev libxslt1-dev libyaml-dev libpq-dev \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& pip3 --no-cache-dir install -U -r requirements.txt \
|
|
&& curl -sSL https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 -o /usr/local/bin/dumb-init \
|
|
&& chmod +x /usr/local/bin/dumb-init
|
|
|
|
ENTRYPOINT ["dumb-init", "--single-child", "--"]
|