What is the hyphen after the ENV variable DOCKER_REGISTRY for in a docker-compose file

Viewed 618

In my docker-compose files, my image tag is like so

image: ${DOCKER_REGISTRY-}webapi

However the ENV variable is just DOCKER_REGISTRY, so what's the hyphen for?

Also, now I'm wanting to push these images to ECR, when I set the DOCKER_REGISTRY to my ECR instance, there is no /, between the DOCKER_REGISTRY and webapi part, so I guess I need to change it to look like image: ${DOCKER_REGISTRY-}/webapi? But maybe only for my non-dev docker-compose files?

2 Answers

Don't add a /. it's not a path, it's the name of the image.

Related