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',你會在正確的文件夾中沒有? –