sonerezh icon indicating copy to clipboard operation
sonerezh copied to clipboard

docker: Error response from daemon: Cannot link to a non running container: /sonerezh-db AS /sonerezh-app/sonerezh-db

Open avma opened this issue 8 years ago • 2 comments

Hi,

Following the install section ( https://www.sonerezh.bzh/docs/en/installation.html#installation-with-docker), using docker on a raspberry pi. After running:

sudo docker run --name sonerezh-app --link sonerezh-db:sonerezh-db \
                                 --volume /mnt/media/music/mymusic:/music \
                                 --volume /mnt/sonerezh/thumbnails:/thumbnails \
                                 --detach --publish 8080:80 \
                                 sonerezh/sonerezh:latest 

I'm getting this error message: docker:

Error response from daemon:Cannot link to a non running container: /sonerezh-db AS /sonerezh-app/sonerezh-db.

It looks like I'm missing somthing but cant figure it out... Thank you for your help Avi

avma avatar Aug 21 '17 11:08 avma

Hi, not dev, but you need to run a mariaDB container too. See Sonerezh Docs

snow3461 avatar Sep 01 '17 14:09 snow3461

Indeed, you must to run a mariadb container before to run your sonerezh container.

I use the official image, this is my docker-compose.yml for mariadb:

  sonerezh-db:
    image: mariadb:10
    container_name: sonerezh-db
    restart: always
    volumes:
      - /my/path/to/db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=whatyouwant
      - MYSQL_DATABASE=sonerezh
      - MYSQL_USER=sonerezh
      - MYSQL_PASSWORD=whatyouwant

PixiBixi avatar Sep 01 '17 15:09 PixiBixi