FastAPI-template icon indicating copy to clipboard operation
FastAPI-template copied to clipboard

Docker Conflict. The container name "/buildx_buildkit_default"

Open Spirit412 opened this issue 2 years ago • 3 comments

If I run the command

docker-compose -f deploy/docker-compose.yml -f deploy/docker-compose.dev.yml --project-directory . up --build

I get an error: "Error response from daemon: Conflict. The container name "/buildx_buildkit_default" is already in use by container "d71b945b434c38734cf71fc8f64b5dc97317552bde26f586f1a24910c979ab79". You have to remove (or rename) that container to be able to reuse that name."

If running a command without a dash

docker compose -f deploy/docker-compose.yml -f deploy/docker-compose.dev.yml --project-directory . up --build

Docker starts without errors

Spirit412 avatar Nov 06 '23 10:11 Spirit412

So, there's a thing with docker. Docker-compose was external program before, and not that long ago it was merged into docker itself and can be invoked as a subcommand.

My assumption here is that you have outdated docker-compose binary and up to date docker.

s3rius avatar Nov 06 '23 13:11 s3rius

So, there's a thing with docker. Docker-compose was external program before, and not that long ago it was merged into docker itself and can be invoked as a subcommand.

My assumption here is that you have outdated docker-compose binary and up to date docker.

In the README file, the sample code for docker uses the old "docker-compose" syntax

Spirit412 avatar Nov 07 '23 21:11 Spirit412

I guess now it's time to change it. Because mostly people are using docker compose instead of old-style docker-compose.

s3rius avatar Nov 09 '23 10:11 s3rius