Skip to content

Docker image not working on Synology NAS

I just tried installing the Docker image on my Synology NAS but failed to do so. The stuff I encountered.

  • mounting /etc/timezone will not work, fixed by mounting /etc/TZ
  • mounting /dev/shm/shinobiDockerTemp will not work, fixed by mounting it as ./shinobiDockerTemp and adding this dir in the folder where the gitlab repository was cloned

Now the Docker image start but with the following error (log is in reversed order):

2019-03-02 08:47:40	stderr	error: 'Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)'
2019-03-02 08:47:40	stderr	mysqladmin: connect to server at 'localhost' failed
2019-03-02 08:47:40	stdout	Wait for MySQL server ...
2019-03-02 08:47:35	stdout	190302 09:47:35 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2019-03-02 08:47:35	stdout	190302 09:47:35 mysqld_safe Logging to '/var/lib/mysql/48bbb95d55d5.err'.
2019-03-02 08:47:35	stdout	Starting MariaDB ...
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	https://mariadb.org/get-involved/
2019-03-02 08:47:35	stdout	Consider joining MariaDB's strong and vibrant community:
2019-03-02 08:47:35	stdout	http://dev.mysql.com
2019-03-02 08:47:35	stdout	You can find additional information about the MySQL part at:
2019-03-02 08:47:35	stdout	The latest information about MariaDB is available at http://mariadb.org/.
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	Please report any problems at http://mariadb.org/jira
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	cd '/usr/mysql-test' ; perl mysql-test-run.pl
2019-03-02 08:47:35	stdout	You can test the MariaDB daemon with mysql-test-run.pl
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	cd '/usr' ; /usr/bin/mysqld_safe --datadir='./data'
2019-03-02 08:47:35	stdout	You can start the MariaDB daemon with:
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	MySQL manual for more instructions.
2019-03-02 08:47:35	stdout	See the MariaDB Knowledgebase at http://mariadb.com/kb or the
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	strongly recommended for production servers.
2019-03-02 08:47:35	stdout	databases and anonymous user created by default.  This is
2019-03-02 08:47:35	stdout	which will also give you the option of removing the test
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	'/usr/bin/mysql_secure_installation'
2019-03-02 08:47:35	stdout	Alternatively you can run:
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	'/usr/bin/mysqladmin' -u root -h 48bbb95d55d5 password 'new-password'
2019-03-02 08:47:35	stdout	'/usr/bin/mysqladmin' -u root password 'new-password'
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	To do so, start the server, then issue the following commands:
2019-03-02 08:47:35	stdout	PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	support-files/mysql.server to the right place for your system
2019-03-02 08:47:35	stdout	To start mysqld at boot time you have to copy
2019-03-02 08:47:35	stdout	
2019-03-02 08:47:35	stdout	OK
2019-03-02 08:47:24	stderr	2019-03-02  9:47:24 140118934125288 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
2019-03-02 08:47:21	stdout	Installing MariaDB/MySQL system tables in './data' ...
2019-03-02 08:47:21	stdout	Installing MariaDB ...
2019-03-02 08:47:21	stdout	MariaDB Directory ...
2019-03-02 08:47:21	stdout	Hash admin password ...
2019-03-02 08:47:21	stdout	Create default config file /opt/shinobi/plugins/motion/conf.json ...
2019-03-02 08:47:21	stdout	Create default config file /opt/shinobi/super.json ...
2019-03-02 08:47:21	stdout	Create default config file /opt/shinobi/conf.json ...
2019-03-02 08:47:21	stdout	Copy custom configuration files ...

Some pointers on how to fix this would be great.