解决方案

  • dockerfile
1
2
FROM amazonlinux:2022
RUN yum install -y /usr/bin/systemctl
  • 构建image
1
docker build -t amzn2:systemctl .

  • 安装成功