docker build with --build-arg with multiple arguments

后端 未结 4 1582
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 01:27

According to the documentation, it\'s possible to define multiple args for the flag --build-arg, but I can\'t find out how. I tried the following:

d         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-30 01:43

    Use --build-arg with each argument.

    If you are passing two argument then add --build-arg with each argument like:

    docker build \
    -t essearch/ess-elasticsearch:1.7.6 \
    --build-arg number_of_shards=5 \
    --build-arg number_of_replicas=2 \
    --no-cache .
    

提交回复
热议问题