Add util-linux to centos base packages
Currently /usr/sbin/nologin is missing, because util-linux is not installed in the image. Change-Id: I717b4f2215054ef9135a1ac252ed26820bdcb1aa
This commit is contained in:
parent
a16331de20
commit
1371e4fc5b
@ -17,15 +17,6 @@ COPY curlrc /root/.curlrc
|
|||||||
ENV LANG en_US.UTF-8
|
ENV LANG en_US.UTF-8
|
||||||
{% endblock %}
|
{% 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 }}"
|
LABEL kolla_version="{{ kolla_version }}"
|
||||||
|
|
||||||
{% import "macros.j2" as macros with context %}
|
{% import "macros.j2" as macros with context %}
|
||||||
@ -211,6 +202,7 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen
|
|||||||
'socat',
|
'socat',
|
||||||
'sudo',
|
'sudo',
|
||||||
'tar',
|
'tar',
|
||||||
|
'util-linux',
|
||||||
'util-linux-user',
|
'util-linux-user',
|
||||||
'which'
|
'which'
|
||||||
] %}
|
] %}
|
||||||
@ -345,6 +337,15 @@ RUN apt-get --error-on=any update \
|
|||||||
{# endif base_package_type deb #}
|
{# endif base_package_type deb #}
|
||||||
{% endif %}
|
{% 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' %}
|
{% if base_distro == 'centos' %}
|
||||||
RUN sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth \
|
RUN sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth \
|
||||||
&& sed -ri '/^[^#]/ s/systemd//g' /etc/nsswitch.conf
|
&& sed -ri '/^[^#]/ s/systemd//g' /etc/nsswitch.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user