aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-06-29 14:11:16 +0000
committerGerrit Code Review <review@openstack.org>2023-06-29 14:11:16 +0000
commit079e2f6a500f202751459f0af50ee94ec84c786c (patch)
tree171aaac48f968c110341775795ed10a56532ad09
parent0fca84015ac9e7010a844fedce9d4f3e1b612b7e (diff)
parent3de04436fa0e497a08d5d4312e25bf4b1049cac2 (diff)
downloadkolla-079e2f6a500f202751459f0af50ee94ec84c786c.tar.gz
kolla-079e2f6a500f202751459f0af50ee94ec84c786c.zip
Merge "base: install adduser on Debian/Ubuntu"
-rw-r--r--docker/base/Dockerfile.j221
1 files changed, 11 insertions, 10 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index 3eb12733e..1300fb45f 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -203,16 +203,6 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen
{# endif for base_package_type rpm #}
{% elif base_package_type == 'deb' %}
-# Customize PS1 bash shell
-# - enlarge 'system users' range so 'haproxy' package will not complain
-# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939470
-# - enlarge 'system groups' range so 'hacluster' user added in
-# https://review.opendev.org/c/openstack/kolla/+/802671
-# can be in 'haclient' group with same high uid
-RUN cat /tmp/kolla_bashrc >> /etc/bash.bashrc \
- && sed -i -e s/LAST_SYSTEM_UID=999/LAST_SYSTEM_UID=59999/g \
- -e s/LAST_SYSTEM_GID=999/LAST_SYSTEM_GID=59999/g /etc/adduser.conf
-
# This will prevent questions from being asked during the install
ENV DEBIAN_FRONTEND noninteractive
@@ -223,6 +213,7 @@ COPY dpkg_reducing_disk_footprint /etc/dpkg/dpkg.cfg.d/dpkg_reducing_disk_footpr
# curl and ca-certificates to fetch remote keys via http
# gnupg to fetch keys directly from keyserver
{% set base_ubuntu_package_pre_packages = [
+ 'adduser',
'ca-certificates',
'curl',
'gnupg'
@@ -236,6 +227,16 @@ COPY dpkg_reducing_disk_footprint /etc/dpkg/dpkg.cfg.d/dpkg_reducing_disk_footpr
{{ macros.install_packages(base_ubuntu_package_pre_packages | customizable("base_ubuntu_package_pre_packages")) }}
{% endblock %}
+# Customize PS1 bash shell
+# - enlarge 'system users' range so 'haproxy' package will not complain
+# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939470
+# - enlarge 'system groups' range so 'hacluster' user added in
+# https://review.opendev.org/c/openstack/kolla/+/802671
+# can be in 'haclient' group with same high uid
+RUN cat /tmp/kolla_bashrc >> /etc/bash.bashrc \
+ && sed -i -e s/#*LAST_SYSTEM_UID=999/LAST_SYSTEM_UID=59999/g \
+ -e s/#*LAST_SYSTEM_GID=999/LAST_SYSTEM_GID=59999/g /etc/adduser.conf
+
{% block base_ubuntu_package_sources_list %}
{% if base_distro == 'debian' or ( base_distro == 'ubuntu' and base_arch == 'x86_64' ) %}
COPY sources.list.{{ base_distro }} /etc/apt/sources.list