kolla-ansible/docker/memcached/Dockerfile.j2
Britt Houser 66c15ce55e drop root on memcached
This patch add the USER directive to the memcached container.
It also removes the -u from the command line to launch
memcached, since it will already be run as that use.

Change-Id: I87d782a424df99fe1b5694debafa3c0c4a9aba27
Partially-Implements: blueprint drop-root
2015-11-14 11:38:30 -05:00

23 lines
549 B
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set user = 'memcached' %}
RUN yum -y install memcached \
&& yum clean all \
&& usermod -a -G kolla {{ user }}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set user = 'memcache' %}
RUN apt-get install -y --no-install-recommends memcached \
&& apt-get clean \
&& usermod -a -G kolla {{ user }}
{% endif %}
{{ include_footer }}
USER {{ user }}