You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't seem to be an issue with vscode. This line in the docker run file makes the in-variance assumption that the host and listener ports are always the same.
I have a fix for this. I haven't exhaustively tested this. I just want to understand all the other use cases of the -p flag:
The default format (no overrides from config file) tends to be 300/tcp. Does this assumption hold well?
It looks like the host port like 3000/tcp would be invalid. Is truncating this in all cases a reasonable course of action?
Will have a PR out soon.
It'd be great if you could review it and lmk if it fixes the edge cases you have in mind.
Hey @PrashanthCorp apologies for my delay in getting back to you, I've not been logged in on github for a little while.
Thank you for submitted the PR, great work!
With no manual changes to the config file that should be the default format. I've tried to find reference material as to what docker expects to see but I can't find it I'm afraid. I presume if you manually edit that to omit it, docker will not accept the file. Docker build does however automatically add /tcp if no protocol is specified, that behavior is what leads me to believe omission is not allowed in that generated output.
Not 100% with what you mean there sorry. Could you explain?
Regarding 2, I mean something like this: docker run --rm -d -p 20000/udp:20000/udp <container id>
which leads to an error :
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Invalid hostPort: 20000/udp.
For example in my config if I have:
The launched container is given the following flags:
$ docker run --rm -d -p 20000:20000 <redacted image>
It should be:
$ docker run --rm -d -p 20000:20000/udp <redacted image>
I think it's just a bug with vscode parsing the config and not knowing to correctly add /udp when it's a udp service.
If I'm doing something wrong myself please do let me know.
The text was updated successfully, but these errors were encountered: