diff options
| author | Mark Goddard <mark@stackhpc.com> | 2020-01-29 17:04:43 +0000 |
|---|---|---|
| committer | Mark Goddard <mark@stackhpc.com> | 2020-02-26 11:58:52 +0000 |
| commit | 2bb38f156bbdd86aaa535af36af6eec69c4c443c (patch) | |
| tree | 3c052d756e37e5766c3653c21cda0626241cc222 | |
| parent | f367d2303f3fe22cdd9ce55b20dd77918676ab36 (diff) | |
| download | kolla-2bb38f156bbdd86aaa535af36af6eec69c4c443c.tar.gz kolla-2bb38f156bbdd86aaa535af36af6eec69c4c443c.zip | |
CentOS 8: Allow SSH access to keystone_ssh and nova_ssh
The centos:8 image contains a /run/nologin file, which prevents SSH
access to it. Remove this file in the keystone_ssh and nova_ssh images
to allow login via SSH.
Change-Id: I59dc2c4207af6812501b6c6acdb34e51a3e848c4
Partially-Implements: blueprint centos-rhel-8
(cherry picked from commit 892ae92d971fd7a2c8d39e416512bb69f7fd833f)
| -rw-r--r-- | docker/keystone/keystone-ssh/Dockerfile.j2 | 7 | ||||
| -rw-r--r-- | docker/nova/nova-ssh/Dockerfile.j2 | 10 |
2 files changed, 16 insertions, 1 deletions
diff --git a/docker/keystone/keystone-ssh/Dockerfile.j2 b/docker/keystone/keystone-ssh/Dockerfile.j2 index 233dedf7c..442f2df9d 100644 --- a/docker/keystone/keystone-ssh/Dockerfile.j2 +++ b/docker/keystone/keystone-ssh/Dockerfile.j2 @@ -12,6 +12,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openssh-server', 'rsync' ] %} + +{% if distro_package_manager == 'dnf' %} +# NOTE(mgoddard): The centos:8 image contains a /run/nologin file, which +# prevents SSH access to it. +RUN rm -f /run/nologin +{% endif %} + {% elif base_package_type == 'deb' %} {% set keystone_ssh_packages = [ 'openssh-server', diff --git a/docker/nova/nova-ssh/Dockerfile.j2 b/docker/nova/nova-ssh/Dockerfile.j2 index a032cb6e7..3d0ebd04d 100644 --- a/docker/nova/nova-ssh/Dockerfile.j2 +++ b/docker/nova/nova-ssh/Dockerfile.j2 @@ -11,7 +11,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'openssh-server' ] %} -{% if base_package_type == 'deb' %} +{% if base_package_type == 'rpm' %} + +{% if distro_package_manager == 'dnf' %} +# NOTE(mgoddard): The centos:8 image contains a /run/nologin file, which +# prevents SSH access to it. +RUN rm -f /run/nologin +{% endif %} + +{% elif base_package_type == 'deb' %} RUN mkdir -p /var/run/sshd \ && chmod 0755 /var/run/sshd |
