1
我通过以下示例并阅读文档了解Dockerfile。一个Dockerfile有以下起始行:Dockerfile位置和路径
FROM ubuntu:14.04
RUN mkdir /home/meteorapp
WORKDIR /home/meteorapp
ADD . ./meteorapp
# Do basic updates
RUN apt-get update -q && apt-get clean
# Get curl in order to download what we need
RUN apt-get install curl -y \
# Install Meteor
&& (curl https://install.meteor.com/ | sh) \
# Build the Meteor app
&& cd /home/meteorapp/meteorapp/app \
&& meteor build ../build --directory \
# and more lines ...
线条&& cd /home/meteorapp/meteorapp/app \
失败,错误:
/bin/sh: 1: cd: can't cd to /home/meteorapp/meteorapp/app
是什么原因造成的根目录错误和如何解决它?
以及如何解决它?将Dockerfile移出hp文件夹,并将它和hp文件夹放在单独的文件夹中?或更改应用程序为HP? –
我想你可以'cd/home/meteorapp/meteorapp',你会在正确的文件夹中没有? –