Dockerfile 构建失败,未找到源命令
Dockerfile build fails with source-command not found
我正在尝试使用 Dockerfile
:
从源代码构建 v8
FROM ubuntu:20.04
ARG V8_REPO=https://chromium.googlesource.com/chromium/tools/depot_tools.git
ARG ADD_DEPOTTOOLS2PATH='export PATH=/depot_tools:$PATH'
RUN \
apt-get update -y && \
apt-get install git -y && \
apt-get install vim -y && \
apt-get install wget -y && \
apt-get install python3 -y && \
git clone ${V8_REPO} && \
echo ${ADD_DEPOTTOOLS2PATH} >> ~/.bashrc && \
source ~/.bashrc
出于某种原因,它在 source
-ing .bashrc
:
中失败
$ docker build --tag host --file .\Dockerfile.txt .
...
#5 47.17 /bin/sh: 1: source: not found
------
executor failed running [... && source ~/.bashrc]: exit code: 127
被RUN is /bin/sh使用的shell。 /bin/sh
不提供 source
命令。
尝试 .
-command 而不是 source
.
我正在尝试使用 Dockerfile
:
FROM ubuntu:20.04
ARG V8_REPO=https://chromium.googlesource.com/chromium/tools/depot_tools.git
ARG ADD_DEPOTTOOLS2PATH='export PATH=/depot_tools:$PATH'
RUN \
apt-get update -y && \
apt-get install git -y && \
apt-get install vim -y && \
apt-get install wget -y && \
apt-get install python3 -y && \
git clone ${V8_REPO} && \
echo ${ADD_DEPOTTOOLS2PATH} >> ~/.bashrc && \
source ~/.bashrc
出于某种原因,它在 source
-ing .bashrc
:
$ docker build --tag host --file .\Dockerfile.txt .
...
#5 47.17 /bin/sh: 1: source: not found
------
executor failed running [... && source ~/.bashrc]: exit code: 127
被RUN is /bin/sh使用的shell。 /bin/sh
不提供 source
命令。
尝试 .
-command 而不是 source
.