How to define a variable in a Dockerfile?

后端 未结 6 1209
情歌与酒
情歌与酒 2020-12-07 16:02

In my Dockerfile, I would like to define variables that I can use later in the Dockerfile.

I am aware of the

6条回答
  •  生来不讨喜
    2020-12-07 16:42

    If the variable is re-used within the same RUN instruction, one could simply set a shell variable. I really like how they approached this with the official Ruby Dockerfile.

提交回复
热议问题