我是 docker 新手,我尝试创建一个自定义图像,我可以在其中简单地运行,pacman -Syu --noconfirm但出现以下错误:
error: failed to initialize alpm library
(could not find or read directory: /var/lib/pacman/)
The command '/bin/sh -c pacman -Syu --noconfirm' returned a non-zero code: 255
Run Code Online (Sandbox Code Playgroud)
我的 dockerfile 是:
#This is a sample Image
FROM archlinux
RUN pacman -Syu --noconfirm
CMD [“echo”,”Image created”]
Run Code Online (Sandbox Code Playgroud)