s3rius / FastAPI-template

Feature rich robust FastAPI template.
MIT License
2.02k stars 173 forks source link

Docker Conflict. The container name "/buildx_buildkit_default" #194

Open Spirit412 opened 1 year ago

Spirit412 commented 1 year ago

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

s3rius commented 1 year ago

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.

Spirit412 commented 1 year ago

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

s3rius commented 1 year ago

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