我正在尝试使用consol/centos-xfce-vnc
来运行自动化脚本。因此我想安装nodejs
。令我惊讶的是,当尝试使用ubuntu时,它确实有效,但不适用于ubuntu-xfce-vnc
。
工作Dockerfile
# Pull base image.
FROM ubuntu:14.04
# Install Node.js
RUN apt-get update && apt-get install -y \
curl
CMD /bin/bash
RUN curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash -
RUN apt-get install --yes nodejs
RUN apt-get install --yes build-essential
RUN which node; node -v; which npm; npm -v;
不工作Dockerfile
# Pull base image.
FROM consol/ubuntu-xfce-vnc:1.1.0
# Install Node.js
RUN apt-get update && apt-get install -y \
curl
CMD /bin/bash
RUN curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash -
RUN apt-get install --yes nodejs
RUN apt-get install --yes build-essential
RUN which node; node -v; which npm; npm -v;
我收到以下错误
Step 2/7 : RUN apt-get update && apt-get install -y curl
---> Running in 63ced11fe09e
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
我是码头工的新手,不知道我在这里缺少什么。