๐ : Custom Image - Repository URL with Port Number
candidson opened this issue ยท 4 comments
Describe the bug
In the current implementation, the frontend automatically splits the custom image repository URL by ":". However this wouldn't allow the usage of port number in the URL; for example "my-custom-repository:5000/myterraform/myimage:latest" where "latest" is actually the tag, wouldn't work.
To Reproduce
Steps to reproduce the behavior:
- Go to 'Module edition', and select "Custom" for Terraform Image
- Add "my-custom-repository:5000/myterraform/myimage:latest" as custom image
Expected behavior
Repository: my-custom-repository:5000/myterraform/myimage
Tag: latest
Desktop (please complete the following information):
- OS: OSX
- Browser Edge
- Version 105.0.1343.42
Additional context
I guess the following lines in "terraform-image-input.vue" should be removed? Or any other ideas?
Hi @candidson
I think you can replace the line 115 with a regex matcher instead of a split.
Something like that:
[_,this.image.repository, this.image.tag] = /(\S*):(\S*)/.exec(value);
Hi @juwit
THanks a lot. I have worked on that and have it ready. I have also added some changes in the terraform-mustache file, to allow using custom-terraform images with non-root permissions: indeed the script in there was always installing "curl" - now "curl" is installed only if not existing. Please expect my PR in the next few days.
Regards