0

docker-compose.yml:

services:
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    links:
      - mysql:db
    ports:
      - '8090:80'
    volumes:
      - ./docker/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
    environment: 
      - UPLOAD_LIMIT=64M

So this config was working fine. What happened is I switched git branches resulting in the host file (config.user.inc.php) of the volume going amiss. According to this helpful thread docker creates missing host files as directory in the container, which is what happened. So after ensuring the file system on both sides is in the expected state again and restarting the container this is the error message I get:

Cannot create container for service phpmyadmin: not a directory

Note that at this point the file structure including docker-compose is exactly in the state like when it used to work. I tried docker volume prune like described here (note: the thread does not solve my problem) and docker-compose down -v --remove-orphans but the error persists. If I rename the host file and change the config accordingly it works perfectly: ./docker/phpmyadmin/_config.user.inc.php:/etc/phpmyadmin/config.user.inc.php

What's wrong here?

br4nnigan
  • 459
  • 4
  • 12

0 Answers0