aldevar / zabbix-db-migration

This project aims to provide a Zabbix migration tool from MySQL to PostresQL mainly using the Zabbix API.
GNU General Public License v3.0
10 stars 2 forks source link

docker-compose errors out if file does not exist #5

Closed aldevar closed 4 years ago

aldevar commented 4 years ago

Running docker-compose up, the error is :

Creating docker_mysql-server_1 ... error Creating docker_postgres-server_1 ...

ERROR: for docker_mysql-server_1 Cannot start service mysql-server: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\"/var/lib/docker/volumes/percona/etc/ percona-server.cnf\\" to rootfs \\"/var/lib/docker/overlay2/e4d68e1b54a91b4126ec740846d30c7dd2f901de5d86ba02179f5fccf9ba24e2/merged\ \" at \\"/var/lib/docker/overlay2/e4d68e1b54a91b4126ec740846d30c7dd2f901de5d86ba02179f5fccf9ba24e2/merged/etc/percona-server.cnf\\" c aused \\"not a directory\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host

How to avoid this error?

aldevar commented 4 years ago

Commented out these lines as we don't need the files anyway - ./percona/etc/my.cnf.d:/etc/my.cnf.d:z - ./percona/etc/percona-server.cnf:/etc/percona-server.cnf:z

Then this error appears on mysql container : mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 13 - Permission denied)

aldevar commented 4 years ago

Solution : chown -R 999:999 percona And run container as 999:999 user. See PR