From f85cb72e4ed3c357e7d81baf5478ebd73ee44f00 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Mon, 30 Jan 2023 11:47:15 +0100 Subject: [PATCH] NR-78042: install useradd and systemclt3 to amazonlinux (#3) --- molecule/default/dockerfiles/al2 | 8 +++++--- molecule/default/dockerfiles/al2022 | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/molecule/default/dockerfiles/al2 b/molecule/default/dockerfiles/al2 index 719ea82..5a420ad 100644 --- a/molecule/default/dockerfiles/al2 +++ b/molecule/default/dockerfiles/al2 @@ -3,9 +3,11 @@ FROM amazonlinux:2 # Run a system update so the system doesn't overwrite the fake systemctl later RUN yum -y update -RUN yum -y install python3-dnf sudo +RUN yum -y install python3-dnf sudo shadow-utils # Adding fake systemctl -RUN curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py -o /usr/local/bin/systemctl +RUN curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl3.py -o /usr/local/bin/systemctl -CMD ["/usr/local/bin/systemctl"] \ No newline at end of file +RUN chmod +x /usr/local/bin/systemctl + +CMD ["/usr/local/bin/systemctl"] diff --git a/molecule/default/dockerfiles/al2022 b/molecule/default/dockerfiles/al2022 index 72fbc0c..74469b7 100644 --- a/molecule/default/dockerfiles/al2022 +++ b/molecule/default/dockerfiles/al2022 @@ -3,9 +3,11 @@ FROM amazonlinux:2022 # Run a system update so the system doesn't overwrite the fake systemctl later RUN yum -y update -RUN yum -y install python3 sudo +RUN yum -y install python3 sudo shadow-utils # Adding fake systemctl -RUN curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py -o /usr/local/bin/systemctl +RUN curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl3.py -o /usr/local/bin/systemctl -CMD ["/usr/local/bin/systemctl"] \ No newline at end of file +RUN chmod +x /usr/local/bin/systemctl + +CMD ["/usr/local/bin/systemctl"]