How to name Dockerfiles

前端 未结 10 981
谎友^
谎友^ 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:35

    I have created two Dockerfiles in same directory,

    # vi one.Dockerfile
    # vi two.Dockerfile
    

    to build both Dockerfiles use,

    # docker build . -f one.Dockerfile
    # docker build . -f two.Dockerfile
    

    Note: you should be in present working directory..

提交回复
热议问题