在Dockerfile中ARG值没有扩展

时间:2016-11-30 21:51:48

标签: docker arguments dockerfile

我有一个包含以下内容的Dockerfile

FROM java:v1

MAINTAINER Nitanka Gogoi <nitankagogoi@gmail.com>

ENV SPARK_URL "http://d3kbcqa49mib13.cloudfront.net/spark-2.0.2-bin-hadoop2.7.tgz"

RUN apt-get update && \

    apt-get install -y curl && \
    cd /tmp && \
    curl -o ${SPARK_URL}

执行docker build -t sparkbase:v2 .

我在日志结束时收到以下错误。

Preparing to unpack .../curl_7.35.0-1ubuntu2.10_amd64.deb ...
Unpacking curl (7.35.0-1ubuntu2.10) ...
Setting up libcurl3:amd64 (7.35.0-1ubuntu2.10) ...
Setting up curl (7.35.0-1ubuntu2.10) ...
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
The command '/bin/sh -c apt-get update &&     apt-get install -y curl &&    cd /tmp &&     curl -o ${SPARK_URL}' returned a non-zero code: 2

有人可以帮助我如何在不使用build-arg的情况下扩展SPARK_URL的价值

0 个答案:

没有答案