Skip to content

Commit 48308c7

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Add util-linux to centos base packages" into stable/yoga
2 parents daedc1d + efde94c commit 48308c7

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docker/base/Dockerfile.j2

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,6 @@ COPY curlrc /root/.curlrc
1717
ENV LANG en_US.UTF-8
1818
{% endblock %}
1919

20-
{# NOTE(SamYaple): Avoid uid/gid conflicts by creating each user/group up front. #}
21-
{# Specifics required such as homedir or shell are configured within the service specific image #}
22-
{%- for name, user in users | dictsort() %}
23-
{% if loop.first -%}RUN {% else %} && {% endif -%}
24-
groupadd --gid {{ user.gid }} {{ user.group }} \
25-
&& useradd -l -M --shell /usr/sbin/nologin --uid {{ user.uid }} --gid {{ user.gid }} {{ name }}
26-
{%- if not loop.last %} \{% endif -%}
27-
{%- endfor %}
28-
2920
LABEL kolla_version="{{ kolla_version }}"
3021

3122
{% import "macros.j2" as macros with context %}
@@ -223,6 +214,7 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen
223214
'socat',
224215
'sudo',
225216
'tar',
217+
'util-linux',
226218
'util-linux-user',
227219
'which'
228220
] %}
@@ -358,6 +350,15 @@ RUN apt-get update \
358350
{# endif base_package_type deb #}
359351
{% endif %}
360352

353+
{# NOTE(SamYaple): Avoid uid/gid conflicts by creating each user/group up front. #}
354+
{# Specifics required such as homedir or shell are configured within the service specific image #}
355+
{%- for name, user in users | dictsort() %}
356+
{% if loop.first -%}RUN {% else %} && {% endif -%}
357+
groupadd --gid {{ user.gid }} {{ user.group }} \
358+
&& useradd -l -M --shell /usr/sbin/nologin --uid {{ user.uid }} --gid {{ user.gid }} {{ name }}
359+
{%- if not loop.last %} \{% endif -%}
360+
{%- endfor %}
361+
361362
{% if base_distro == 'centos' %}
362363
RUN sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth \
363364
&& sed -ri '/^[^#]/ s/systemd//g' /etc/nsswitch.conf

0 commit comments

Comments
 (0)