kolla-ansible/docker/mariadb/Dockerfile.j2
Swapnil Kulkarni (coolsvap) 7294ed9d90 Update Mariadb dockerfile for formatting
Change-Id: I6f5b28dc6520e3d31f413b0da708d9b14c9e9671
Partial-Bug:#1569417
2016-04-12 21:45:20 +05:30

44 lines
1.1 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
MariaDB-Galera-server \
MariaDB-client \
rsync \
galera \
socat \
hostname \
percona-xtrabackup \
pv \
tar \
expect \
&& yum clean all \
&& rm -rf /var/lib/mysql/*
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends \
mariadb-galera-server \
percona-xtrabackup \
socat \
expect \
&& apt-get clean \
&& rm -rf /var/lib/mysql/*
{% endif %}
COPY mariadb_sudoers /etc/sudoers.d/mariadb_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start
COPY security_reset.expect /usr/local/bin/kolla_security_reset
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& chmod 755 /usr/local/bin/kolla_security_reset \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/mariadb_sudoers \
&& usermod -a -G kolla mysql
{{ include_footer }}
USER mysql