0

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 ASPNETCORE_URLS http://+:5000
EXPOSE 5000

When running the docker image with the below command, I'm trying to pass optional arguments that will be passed down to my exe endpoint.

docker rm myapp
docker run --net="host" --name myapp -p 5000:5000 myappservice

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

he is already using entrypoint so this just points to you need to read... sorry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.