gpt4 book ai didi

meteor - 在Docker中安装Meteor时出现文件权限错误

转载 作者:行者123 更新时间:2023-12-02 20:14:10 25 4
gpt4 key购买 nike

我是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 安装脚本似乎要求用户输入,因为您不提供它,所以构建步骤将失败。

这里:This may prompt for your password.
sudo: no tty present and no askpass program specified

关于meteor - 在Docker中安装Meteor时出现文件权限错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44653075/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com