Pass optional arguments when running a Docker image

前端 未结 1 1652
梦毁少年i
梦毁少年i 2021-01-27 17:04

I have a Docker file based on windowsservercore, which I am hosting an ASP.net Core web application.

Snippet from docker file

ENTRYPOINT [\"my.exe\"]
ENV         


        
相关标签:
1条回答
  • 2021-01-27 17:43

    You need to have either a CMD

    https://docs.docker.com/engine/reference/builder/#cmd

    Or an ENTRYPOINT

    https://docs.docker.com/engine/reference/builder/#entrypoint

    In your Dockerfile.

    You should read this discussion:

    What is the difference between CMD and ENTRYPOINT in a Dockerfile?

    And also that one:

    Passing Different Arguments When Running Docker Image Multiple Times

    0 讨论(0)
提交回复
热议问题