在docker容器中安装工具时出错

时间:2016-06-25 09:36:49

标签: docker install containers

我在我的VirtualBox中安装了ubuntu-14.04.4-server-amd64.iso,然后我用某种方式来获取它的rootfs。之后我可以让rootfs创建我的docker image.Dockerfile如下:

FROM scratch
COPY rootfs /
RUN chmod u+s /usr/bin/sudo && chmod u+s /bin/mount && chmod u+s /bin/umount

我启动我的docker容器,然后我安装了一些工具,比如minicom,wget ...,但是错误,以下是错误消息:

root@20ca319c51e6:~$ apt-get install minicom 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
minicom is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libpam-systemd:amd64 (204-5ubuntu20.19) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: unknown initscript, /etc/init.d/systemd-logind not found.
runlevel:/var/run/utmp: No such file or directory
dpkg: error processing package libpam-systemd:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
 libpam-systemd:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

我也试着" apt-get update; apt-get upgrade"但是也得到相同的错误信息, 我该怎么办。需要你的帮助!谢谢大家:))

0 个答案:

没有答案