How to name Dockerfiles

前端 未结 10 1037
谎友^
谎友^ 2020-12-22 22:17

I\'m unsure of how to name Dockerfiles. Many on GitHub use Dockerfile without a file extension. Do I give them a name and extension; if so what? Or do I just ca

10条回答
  •  不知归路
    2020-12-22 22:52

    Dockerfile (custom name and folder):

       docker/app.Dockerfile
       docker/nginx.Dockerfile
    

    Build:

       docker build  -f ./docker/app.Dockerfile .
       docker build  -f ./docker/nginx.Dockerfile .
    

提交回复
热议问题