Vscode-docker: Does not support the port in the image name

Created on 19 Jun 2018  路  11Comments  路  Source: microsoft/vscode-docker

if you write a from like this:

FROM repository.mycompany:5000/tomcat:8.0

then there will be an error "invalid reference format", with the 8.0 being underlined in red, although this is a valid statement.

bug fix released language-server

Most helpful comment

@lucianenache Sorry for the confusion. The issue has been fixed _upstream_ but the vscode-docker extension has not yet been updated to include this fix.

I will comment here when the fix has been adopted so please hang tight!

All 11 comments

Hi, @corey-aloia-sap. Thank you for your bug report.

It sounds very similar to #269 although your image is simply tomcat:8.0 and not something like apache/tomcat:8.0. It should still be fixed by rcjsuen/dockerfile-utils#39 though as I have a test for something very similar to what you have provided.

https://github.com/rcjsuen/dockerfile-utils/blob/4975fe383f809c16f944d6aec41aa87c6294a584/test/dockerValidator.test.ts#L2672-L2673

@rcjsuen yep, sorry about that! I could have looked through the open bugs a bit harder. Looks like the same issue.

Hi, @corey-aloia-sap. I wanted to let you know that I've confirmed that your issue has been covered by my fix for #269. I have added your sample Dockerfile to my test suite so it shouldn't regress in the future. Thanks again for the bug report! Have a nice day! :)

https://github.com/rcjsuen/dockerfile-utils/commit/c9d2ad52ea2a7f97c34307897e4f93b9b40f34d4

Hi, I didn't knew which issue to use between #269 and #280 so I have picked the later one. The same validation fails in case you use latest instead of the x.x.x version.

Example:
FROM my.private.repo.com:5000/some-image:latest

@lucianenache Thank you for your bug report. Your case is already covered by my fix in rcjsuen/dockerfile-utils#39. I have added your sample to my test suite nonetheless. Have a nice day!

https://github.com/rcjsuen/dockerfile-utils/commit/36b99aedb9ee535b9e78f47ff51e2368d2e2ce0b

Thanks, for some reason under vscode I still get a linter warning even with the latest version of the plugin.
image

[dockerfile-utils] invalid reference format

@lucianenache Sorry for the confusion. The issue has been fixed _upstream_ but the vscode-docker extension has not yet been updated to include this fix.

I will comment here when the fix has been adopted so please hang tight!

subscribing for comments - new version released :)

The fix has been adopted as you can see in #291. However, a new release of vscode-docker will still need to be cut first.

@corey-aloia-sap I'm closing since this has been fixed in our repo. However, as @rcjsuen pointed out, the new version has not yet been released.

@corey-aloia-sap Just wanted to let you know that we have published a new version of the Docker extension that should contain this fix. Happy coding!

Was this page helpful?
0 / 5 - 0 ratings