kolla-ansible/docker/mariadb/Dockerfile.j2
Sam Yaple ea9d5cd067 Move USER operation after footer
The USER operation affects all docker commands after it. This causes a
problem with our {{ include_footer }} implementation since commands in
that footer may require elevated permissions to perform.

In the current implementation I can no longer remove my proxy settings
once the USER has been changed.

Change-Id: I9b2bab5a15f595f6d52a46c64ddf59ba5608b938
Partially-Implements: blueprint drop-root
2015-11-12 14:34:09 +00:00

43 lines
1.1 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum install -y \
MariaDB-Galera-server \
MariaDB-client \
rsync \
galera \
socat \
hostname \
percona-xtrabackup \
pv \
tar \
expect \
&& 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