Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try in docker container #590

ignatandrei opened this issue Nov 2, 2019 · 2 comments


Copy link

@ignatandrei ignatandrei commented Nov 2, 2019

Is your feature request related to a problem? Please describe.
I am trying to run dotnet try in a docker container that has .NET Core 3 .
Because of not letting me specify the domain, it cannot be seen outside the container

The docker file looks the following:
RUN dotnet tool install -g --add-source "" dotnet-try
ENV PATH="$PATH:/root/.dotnet/tools"
#ENV ASPNETCORE_URLS=http://+:5000
CMD dotnet try --verbose --port 5000

Save the file above as console.docker and run

docker build -f ./console.docker . -t drop
docker run --rm -it -p 5000:5000/tcp drop:latest

You will see that dotnet try is running on

that is not exposed in container to the host

Describe the solution you'd like
I want to can run such as the adress should be https://*:5000 , like here : aspnet/KestrelHttpServer#2174

Describe alternatives you've considered
I do not see any alternatives

Read More
Please help


This comment has been minimized.

Copy link

@jonsequitur jonsequitur commented Nov 7, 2019

We can help out here. The online Try .NET service also uses Docker.

Can you tell us more about what you want to use this for?


This comment has been minimized.

Copy link

@ignatandrei ignatandrei commented Nov 8, 2019

Hello Jon
I want , when I make a software product or a presentation , to have a command line application that I can show to the users and they can run,with just Docker as dependency ( not the whole .NET Core SDK )
I was thinking at those steps:
0. Create the markdown files to see the projects

  1. Deploy the .NET Core projects + markdown into a Docker with .NET Core SDK
  2. Add dotnet try
  3. RUN dotnet try in Docker to see the markdown
  4. RUN the docker image => container, see the dotnet try website .

As an example, please see

You can download the project and , if you go to the Interactive folder and run
dotnet try --port 5000

it works

However, if you want the docker files and run ( in the same folder)

docker build -f ./console.docker . -t drop
docker run --rm -it -p 5000:5000/tcp drop:latest

you have no answer from http://localhost

Please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.