violet_rails icon indicating copy to clipboard operation
violet_rails copied to clipboard

Docker Compose separator issue

Open Ayon95 opened this issue 2 years ago • 0 comments
trafficstars

Docker Compose v1 and v2 use different separators

When you install Docker Desktop, the latest version of docker-compose (v2) will be included in it. Docker Compose v2 uses dash (-) as the separator for image names, whereas v1 uses underscore (_). The image names in docker-compose.yml for Violet Rails are written according to the naming convention of docker-compose v1.

If your Docker Desktop is using docker-compose v2, it will not be able to find violet_rails_solutions_app image, since it will look for violet_rails-solutions_app.

Open Docker Desktop and go to Images to check which images Docker is using:

checking-docker-images

There are two solutions:

  • you can either change the image name in docker-compose.yml
  • or go to Settings > General and uncheck Use Docker Compose V2.

Changing image name in docker-compose.yml:

change-image-name-docker-compose-yml

Disabling docker-compose v2:

disable-docker-compose-v2

For more information, view this StackOverflow thread - https://stackoverflow.com/questions/69464001/docker-compose-container-name-use-dash-instead-of-underscore

Ayon95 avatar Apr 10 '23 20:04 Ayon95