microsoft / DockerTools

Tools For Docker, including Visual Studio Provisioning and Publishing
Other
175 stars 26 forks source link

auto generated docker-compose.vs.debug.g.yml adds wrong image if there is port in DOCKER_REGISTRY #335

Closed surenrao closed 2 years ago

surenrao commented 2 years ago

I have set DOCKER_REGISTRY to "private-repo.company.com:5000/containers/" in environment variable.

My docker-compose.yml have multiple services, and some base image have special steps i.e. apt-get install libgdiplus etc.

However, when I debug and inspect container file system, file /usr/lib/libgdiplus.so didnt exist.

Turns out auto generated docker-compose.vs.debug.g.yml uses "image: private-repo.company.com:dev" for all the services, and that image didn't have my libgdiplus step.

Once I removed the port from DOCKER_REGISTRY "private-repo.company.com/containers/" then it was using the correct image name .i.e image: private-repo.company.com/containers/service:dev image: private-repo.company.com/containers/webapp:dev

So looks like the image name is getting truncated because of colon maybe? I think it should've been image: private-repo.company.com:5000/containers/service:dev image: private-repo.company.com:5000/containers/webapp:dev

dbreshears commented 2 years ago

@surenrao. Thank you for letting us know. We will look into providing a fix for this in a future VS release.

NCarlsonMSFT commented 2 years ago

@surenrao we've added a fix for this issue and it should be available in 17.3 Preview 1

surenrao commented 2 years ago

Can this be fixed in VS2019 as well? thanks.

dbreshears commented 2 years ago

@surenrao, We don't have plans currently to service VS 2019 for this issue. We prioritize action on feedback for current and past releases that have the highest community impact. If you would like to open an issue for consideration you can do so through our primary Developer community channel.