Docker Community Forums

Share and learn in the Docker community.

Docker-entrypoint-initdb.d is not working


(Skarpushin) #1

I just installed fresh OS Mint 18.3 and added Docker to it.

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 \
      --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
apt update

apt install linux-image-generic linux-image-extra-virtual
reboot

sudo apt install docker-engine
sudo apt install docker-compose

Also I pulled this git repo: https://github.com/skarpushin/summerb/tree/master/src/summerb/summerb_tests_db

And ran docker-compose up in this folder.
But my database initialization scripts didn’t work. (ERROR)

I also tried it on Linux Mint 18.2 and also tried to install Docker using different approach described here: docs.docker DOT com/compose/install/ – and had very same result.

For some reason it works only on my old 18.2 machine that I configured a quite ago.

Expected output:

mariadb_1  | 180428 17:20:21 [Warning] 'proxies_priv' entry '@% root@bb430dbcf809' ignored in --skip-name-resolve mode.
mariadb_1  | 
mariadb_1  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/s01_user-service.sql
mariadb_1  | 
mariadb_1  | 
mariadb_1  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/s02_property-service.sql
mariadb_1  | 
mariadb_1  | 
mariadb_1  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/s03_article-service.sql
mariadb_1  | 
mariadb_1  | 
mariadb_1  | 180428 17:20:22 [Note] mysqld: Normal shutdown

Actual output:

mariadb_1  | 180428 18:01:59 [Warning] 'proxies_priv' entry '@% root@71df66b47bf2' ignored in --skip-name-resolve mode.
mariadb_1  | 
mariadb_1  | 180428 18:01:59 [Note] mysqld: Normal shutdown

My gut tells me there is something wrong happening when I do apt-get, probably some broken package or something.

I also filed issue here https://github.com/docker-library/mariadb/issues/160 and it appears I’m not the only one experiencing that kind of issue.