在Docker中安装Meteor时,文件权限错误
我是Docker(2周)的新手,但是我正在为Meteor安装编写一个Dockerfile取得很好的进展。
现在我看到文件权限错误的最后一行。 老实说,我认为更广泛的问题是我不完全了解Linux文件系统和权限; 所以我会很感激任何指针。
这是错误的:
Meteor 1.5 has been installed in your home directory (~/.meteor). Writing a launcher script to /usr/local/bin/meteor for your convenience. This may prompt for your password. sudo: no tty present and no askpass program specified Couldn't write the launcher script. Please either: (1) Run the following as root: cp "/home/.meteor/packages/meteor-tool/1.5.0/mt- os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor (2) Add "$HOME/.meteor" to your path, or (3) Rerun this command to try again.
这是我运行的命令:
docker build --build-arg user_pass=user -t timebandit/meteor-1-5 --rm .
这是我认为是问题的Dockerfile部分:
FROM ubuntu:xenial # update the system RUN apt-get update && apt-get -y install curl \ sudo \ apt-utils \ locales \ nano # Set the locale RUN sudo sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ locale-gen ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 # set the root password # RUN echo "root:root" | chpasswd # create a user RUN useradd -ms /bin/bash user RUN adduser user sudo RUN echo 'user:user' | chpasswd ENV HOME=/home WORKDIR $HOME # WORKDIR $HOME/user # allow writes to the home directory USER root RUN chmod 777 /home # install meteor # RUN echo $user_pass | curl https://install.meteor.com/ | sh RUN curl https://install.meteor.com/ | sh #docker build --build-arg user_pass=user -t timebandit/meteor-1-5 --rm . ARG user_pass USER user
任何指针,你可以给我提高我对这个问题的根源的理解将不胜感激。
它看起来像meteor安装脚本要求用户input,因为你不给它,构build步骤只是失败。
这里:
This may prompt for your password. sudo: no tty present and no askpass program specified
- Docker:在主机上的一个priveleged容器中运行一个任意的命令
- 在Mac上清除原生Docker中的日志
- Docker-compose:如何知道容器内的jar何时运行完毕,然后启动其他容器
- 对于由docker-machinepipe理的boot2docker虚拟机,复制或scp文件到/ var / lib / boot2docker
- GLXGears不能在Docker中工作
- 使用docker-py执行shell命令
- 什么是覆盖networking,DNSparsing如何工作?
- 在Ubuntu中的运行级别脚本中将环境variables传递给docker容器
- 尝试在kubernetes上的生命周期标签下使用命令时出现错误