Can we pass ENV variables through cmd line while building a docker image through dockerfile?

后端 未结 3 1528
梦谈多话
梦谈多话 2020-12-07 13:20

I am working on a task that involves building a docker image with centOs as its base using a Dockerfile . One of the steps inside the docke

3条回答
  •  没有蜡笔的小新
    2020-12-07 13:27

    I faced the same situation.

    According to Sin30's answer pretty solution is using shell,

    CMD ["sh", "-c", "cd /usr/local/etc/php && ln -sf php.ini-$APP_ENV php.ini"]
    

提交回复
热议问题