0
我有這個Dockerfile,對此,我呼應以下行:語法錯誤:在dockerfile運行語句多行bash命令
echo $"RUN cat file | while read pkg \
do\
sudo apt-get install -qy $pkg \
done" >> Dockerfile
現在,當搬運工執行這條線,我得到以下錯誤:
/bin/sh: -c: line 1: syntax error: unexpected end of file The command '/bin/sh -c cat autobuild/buildenv_packages | while read pkg do sudo apt-get install -qy done' returned a non-zero code: 1
我知道有一些小而語法錯失,但我無法弄清楚。請注意,apt-get install
語句中的$pkg
變量不在錯誤中。
任何援助將不勝感激!
謝謝!那樣做了。我不認爲我會想到這一點。非常感激 :) – pypep278