返回非零值:错误9,同时在Docker容器

时间:2017-10-02 14:05:37

标签: linux docker makefile ubuntu-14.04 root

我正在尝试在ubuntu 14.04中构建docker容器,但我面临以下错误....

Step 1/6 : FROM extras
 ---> 2427883089fe
Step 2/6 : ARG UID
 ---> Running in be1df930d560
 ---> eeafcc0e6b56
Removing intermediate container be1df930d560
Step 3/6 : ARG UNAME
 ---> Running in cc76b60de074
 ---> ac3ce9ae6bce
Removing intermediate container cc76b60de074
Step 4/6 : RUN useradd -u ${UID} ${UNAME}     && mkdir /home/${UNAME}     && echo 'echo "___                                   "' >> /home/${UNAME}/.bashrc     && echo 'echo " |   _      _ |_      _   _ |_ |_     "' >> /home/${UNAME}/.bashrc     && echo 'echo " |  |  |_| _) |_ \)/ (_) |  |_ | ) \/ "' >> /home/${UNAME}/.bashrc     && echo 'echo "                                   /  "' >> /home/${UNAME}/.bashrc     && echo 'echo " __                                   "' >> /home/${UNAME}/.bashrc     && echo 'echo "(_      _ |_  _  _   _                "' >> /home/${UNAME}/.bashrc     && echo 'echo "__) \/ _) |_ (- ||| _)                "' >> /home/${UNAME}/.bashrc     && echo 'echo "    /                                 "' >> /home/${UNAME}/.bashrc     && echo 'echo "Hello, welcome to the sel4/CAmkES/L4v docker build environment"' >> /home/${UNAME}/.bashrc     && echo 'export PATH=/scripts/repo:$PATH' >> /home/${UNAME}/.bashrc     && echo 'cd /host' >> /home/${UNAME}/.bashrc     && ln -s /isabelle /home/${UNAME}/.isabelle     && mkdir -p /isabelle     && chown -R ${UNAME}:${UNAME} /isabelle     && chown -R ${UNAME}:${UNAME} /home/${UNAME}     && chmod -R ug+rw /home/${UNAME}


 ---> Running in 2104337eb219
**useradd: user 'root' already exists**
Removing intermediate container 2104337eb219


The command '/bin/sh -c useradd -u ${UID} ${UNAME}     && mkdir /home/${UNAME}     && echo 'echo "___                                   "' >> /home/${UNAME}/.bashrc     && echo 'echo " |   _      _ |_      _   _ |_ |_     "' >> /home/${UNAME}/.bashrc     && echo 'echo " |  |  |_| _) |_ \)/ (_) |  |_ | ) \/ "' >> /home/${UNAME}/.bashrc     && echo 'echo "                                   /  "' >> /home/${UNAME}/.bashrc     && echo 'echo " __                                   "' >> /home/${UNAME}/.bashrc     && echo 'echo "(_      _ |_  _  _   _                "' >> /home/${UNAME}/.bashrc     && echo 'echo "__) \/ _) |_ (- ||| _)                "' >> /home/${UNAME}/.bashrc     && echo 'echo "    /                                 "' >> /home/${UNAME}/.bashrc     && echo 'echo "Hello, welcome to the sel4/CAmkES/L4v docker build environment"' >> /home/${UNAME}/.bashrc     && echo 'export PATH=/scripts/repo:$PATH' >> /home/${UNAME}/.bashrc     && echo 'cd /host' >> /home/${UNAME}/.bashrc     && ln -s /isabelle /home/${UNAME}/.isabelle     && mkdir -p /isabelle     && chown -R ${UNAME}:${UNAME} /isabelle     && chown -R ${UNAME}:${UNAME} /home/${UNAME}     && chmod -R *****ug+rw /home/${UNAME}' returned a non-zero code: 9
make: *** [build_user] Error** 9***

我正在执行这些步骤

https://github.com/SEL4PROJ/seL4-CAmkES-L4v-dockerfiles

在做用户我遇到这种错误时,任何人都可以建议我如何解决这些错误...

1 个答案:

答案 0 :(得分:0)

如果你只想要一个Ubuntu 14.04的容器,试试

docker run ubuntu:14.04

此命令将执行此操作将在本地搜索ubuntu 14.04 imaget。如果不是founf将从docker hub下载

将下载并启动您的图像。 您在问题中添加的链接正在做很多花哨的工作。

如果这样可行,您可以进一步创建自己的dockerfile。