aboutsummaryrefslogtreecommitdiff
path: root/docker/base
diff options
context:
space:
mode:
Diffstat (limited to 'docker/base')
-rw-r--r--docker/base/Dockerfile.j219
1 files changed, 10 insertions, 9 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index db52c02d1..98e1c0ed7 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -17,15 +17,6 @@ COPY curlrc /root/.curlrc
ENV LANG en_US.UTF-8
{% endblock %}
-{# NOTE(SamYaple): Avoid uid/gid conflicts by creating each user/group up front. #}
-{# Specifics required such as homedir or shell are configured within the service specific image #}
-{%- for name, user in users | dictsort() %}
-{% if loop.first -%}RUN {% else %} && {% endif -%}
- groupadd --gid {{ user.gid }} {{ user.group }} \
- && useradd -l -M --shell /usr/sbin/nologin --uid {{ user.uid }} --gid {{ user.gid }} {{ name }}
- {%- if not loop.last %} \{% endif -%}
-{%- endfor %}
-
LABEL kolla_version="{{ kolla_version }}"
{% import "macros.j2" as macros with context %}
@@ -211,6 +202,7 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen
'socat',
'sudo',
'tar',
+ 'util-linux',
'util-linux-user',
'which'
] %}
@@ -345,6 +337,15 @@ RUN apt-get --error-on=any update \
{# endif base_package_type deb #}
{% endif %}
+{# NOTE(SamYaple): Avoid uid/gid conflicts by creating each user/group up front. #}
+{# Specifics required such as homedir or shell are configured within the service specific image #}
+{%- for name, user in users | dictsort() %}
+{% if loop.first -%}RUN {% else %} && {% endif -%}
+ groupadd --gid {{ user.gid }} {{ user.group }} \
+ && useradd -l -M --shell /usr/sbin/nologin --uid {{ user.uid }} --gid {{ user.gid }} {{ name }}
+ {%- if not loop.last %} \{% endif -%}
+{%- endfor %}
+
{% if base_distro == 'centos' %}
RUN sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth \
&& sed -ri '/^[^#]/ s/systemd//g' /etc/nsswitch.conf