我正在尝试从 SCRATCH 在 centos 7 上构建 docker 映像。我已经执行了以下步骤:
FROM scratch
RUN rpm -ivh https://address/app.rpm
RUN YUM install tools
...
...
CMD ["rpm","start"]
执行此操作后,我尝试使用命令“docker build -t testid -f ./dockerfile”构建此 dockerfile。
现在我看到以下错误:
Sending build context to Docker daemon 3.072kB
Step 1/16 : FROM scratch
--->
Step 2/16 : RUN rpm -ivh https://address/app.rpm
---> Running in d25a0a879d9e
OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown
请让我知道是否有人对此有建议。?
任何输入都会非常有帮助。
谢谢你。