Skip to content

Commit

Permalink
NR-78042: install useradd and systemclt3 to amazonlinux (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll authored Jan 30, 2023
1 parent 9dcde97 commit f85cb72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions molecule/default/dockerfiles/al2
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
RUN chmod +x /usr/local/bin/systemctl

CMD ["/usr/local/bin/systemctl"]
8 changes: 5 additions & 3 deletions molecule/default/dockerfiles/al2022
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
RUN chmod +x /usr/local/bin/systemctl

CMD ["/usr/local/bin/systemctl"]

0 comments on commit f85cb72

Please # to comment.