How to specify the external port for an automatically started Docker container? #1952
Unanswered
Monte-Christo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The MongoDb driver
aspire.mongodb.driver
autostarts a Mongo container with a random external port. I would like to specify a fixed port mapping to make development simpler, butthrows a
System.InvalidOperationException: Sequence contains more than one element
atbuilder.Build().Run();
.Also, how can I suppress the creation of the container, for instance when I already have a Mongo cloud instance to connect to? I have succeeded in connecting to that instance, but the now superfluous container is still started every time the app runs.
Beta Was this translation helpful? Give feedback.
All reactions