-
Notifications
You must be signed in to change notification settings - Fork 522
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
No way to set --ip
flag on docker-run
tasks
#2259
Comments
What do you mean by saying Container IP? On which network? Please, read about Docker networking. You can find detailed explanation there. This is not 5 min reading but absolutely necessary. |
@PavelSosin-320 This is how I would do something like this on the command line: |
The |
--ip
flag on docker-run
tasks
Static IP exists in a single scenario: standalone container running on a standalone node. The real IP can be derived from docker node inspect. Docker endpoint can be provided in many ways: Standalone docker, Cloud Instance. Swarm, Docker stack deployed to Kubernetes. It will be very disappointing to get such a limitation - single scenario compatibility: Docker-provided-by-Docker-desktop-without-Kubernetes-installed-withuot-Swarm activated. |
P.S. static IP of the Docker container is impossible because Docker engine governs containers' lifetime and replication. It can't ask "Say me which IP to assign?" every time when it instantiates, restarts, attaches to a network, replicates containers. docker run has nothing common with run application. |
@bwateratmsft Taking into account that the default of docker network create is attachable = true today the static coupling between network and port in one parameter will be extremely inconvenient because it produces a huge number of combinations. It also eliminates using of -P (in capital). |
This is now fixed in Docker extension version 1.7.0. |
I want to use the docker-run task type to start a container, but would also like to set the ip address? How can I do this, I don't see anything in the reference.
Thanks.
The text was updated successfully, but these errors were encountered: