aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin.juszkiewicz+kolla@linaro.org>2023-03-20 16:39:42 +0100
committerMarcin Juszkiewicz <marcin.juszkiewicz+kolla@linaro.org>2023-06-28 18:19:31 +0200
commit3de04436fa0e497a08d5d4312e25bf4b1049cac2 (patch)
tree6432cc677bb714042ca73f9f24c1db7c64ba105b /docker
parent70f74eb64101431e23d56c6a7df96d7aab37ce2f (diff)
downloadkolla-3de04436fa0e497a08d5d4312e25bf4b1049cac2.tar.gz
kolla-3de04436fa0e497a08d5d4312e25bf4b1049cac2.zip
base: install adduser on Debian/Ubuntu
Debian:bookworm container does not have 'adduser' installed so we need to do it before we touch /etc/adduser.conf file. In Bookworm configuration file for adduser changed. Change-Id: Ic06f3c0e42fb7854e5b198c9b868f10cd507cd24
Diffstat (limited to 'docker')
-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