volume already exists but was not created by Docker Compose
Asked Answered
J

2

5

This is what i get after i use ddev start on new or any other projects. I clear all docker images, volumes, etc... and problem repeats again...

Does anybody has the same problem, does it have any connection with versions:

  • Docker version 20.10.11
  • Docker Compose version 2.2.0
  • ddev version v1.18.0
Starting lmp... 
Pushed mkcert rootca certs to ddev-global-cache/mkcert 
Running   Command=ip address show dev docker0
volume "lmp-mariadb" already exists but was not created by Docker Compose. Use `external: true` to use an existing volume 
Failed to start lmp: ComposeCmd failed to run 'COMPOSE_PROJECT_NAME=ddev-lmp docker-compose -f /home/loganmm/www/ddev/lmp/.ddev/.ddev-docker-compose-full.yaml up --build -d', action='[up --build -d]', err='exit status 1', stdout='Sending build context to Docker daemon     489B
Step 1/6 : ARG BASE_IMAGE
Step 2/6 : FROM $BASE_IMAGE
 ---> 87d5f9bd7e6e
Step 3/6 : ARG username
 ---> Using cache
 ---> f60cc0e22e2e
Step 4/6 : ARG uid
 ---> Using cache
 ---> 01e2924ff925
Step 5/6 : ARG gid
 ---> Using cache
 ---> f76f3c567045
Step 6/6 : RUN (groupadd --gid $gid "$username" || groupadd "$username" || true) && (useradd  -l -m -s "/bin/bash" --gid "$username" --comment '' --uid $uid "$username" || useradd  -l -m -s "/bin/bash" --gid "$username" --comment '' "$username" || useradd  -l -m -s "/bin/bash" --gid "$gid" --comment '' "$username")
 ---> Using cache
 ---> 74726db594e2
Successfully built 74726db594e2
Successfully tagged drud/ddev-dbserver-mariadb-10.3:v1.18.0-lmp-built
Sending build context to Docker daemon     448B
Step 1/6 : ARG BASE_IMAGE
Step 2/6 : FROM $BASE_IMAGE
 ---> 1e45807db7e2
Step 3/6 : ARG username
 ---> Using cache
 ---> 99d798f1aa8c
Step 4/6 : ARG uid
 ---> Using cache
 ---> 30f01bb39027
Step 5/6 : ARG gid
 ---> Using cache
 ---> db8269893144
Step 6/6 : RUN (groupadd --gid $gid "$username" || groupadd "$username" || true) && (useradd  -l -m -s "/bin/bash" --gid "$username" --comment '' --uid $uid "$username" || useradd  -l -m -s "/bin/bash" --gid "$username" --comment '' "$username" || useradd  -l -m -s "/bin/bash" --gid "$gid" --comment '' "$username")
 ---> Using cache
 ---> 059097a5008c
Successfully built 059097a5008c
Successfully tagged drud/ddev-webserver:v1.18.0-lmp-built
', stderr='volume "lmp-mariadb" already exists but was not created by Docker Compose. Use `external: true` to use an existing volume' 
Jolyn answered 30/11, 2021 at 3:1 Comment(0)
E
3

This is worked around in DDEV v1.18.2+ (and v1.19+), please upgrade. It was a bug in docker-compose 2.2.0+ - please see https://github.com/drud/ddev/issues/3404 for context.

Effeminate answered 30/11, 2021 at 3:27 Comment(3)
You're right, i downgrade to docker-compose 2.0.1 and it's working perfectly!!! Thanks buddy!Jolyn
for those using Docker Desktop for mac where 4.3.2 has this bug: version 4.2.0 ships with the older, working, docker-compose. download from: docs.docker.com/desktop/mac/release-notes/#docker-desktop-420Millur
But please... if you will just use ddev v1.18.2... there's no problem.Effeminate
F
4

If you use Docker Desktop - go to the preferences and under General uncheck Use Docker Compose v2, then click "Apply & Restart" - as found on https://github.com/drud/ddev/issues/3404#issuecomment-986990802

Florettaflorette answered 6/12, 2021 at 23:18 Comment(1)
Thanks buddy, but Iam using only Linux. Docker Compose version 2.0.1 is working perfect for now...Jolyn
E
3

This is worked around in DDEV v1.18.2+ (and v1.19+), please upgrade. It was a bug in docker-compose 2.2.0+ - please see https://github.com/drud/ddev/issues/3404 for context.

Effeminate answered 30/11, 2021 at 3:27 Comment(3)
You're right, i downgrade to docker-compose 2.0.1 and it's working perfectly!!! Thanks buddy!Jolyn
for those using Docker Desktop for mac where 4.3.2 has this bug: version 4.2.0 ships with the older, working, docker-compose. download from: docs.docker.com/desktop/mac/release-notes/#docker-desktop-420Millur
But please... if you will just use ddev v1.18.2... there's no problem.Effeminate

© 2022 - 2024 — McMap. All rights reserved.