I have this docker-composer.yml file that starts 4 services: a web portal, a mysql db an elastisearch and kibana service.
If I use as db image mysql:latest, I see all 4 services starting. But if I use as image mysql:5.7 the db is not starting.
I can't figure out why. I tried to start the db image alone and it works. It is together with the rest that doesn't seem to work.
version: '3'
services:
portal:
image: glassofwhiskey/liferay-portal:7.0-ce-ga5-dev
networks:
- lfrnet
ports:
- "8000:8000"
- "8080:8080"
- "11311:11311"
db:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: secret
networks:
- lfrnet
ports:
- "3306:3306"
volumes:
- db-data:/var/lib/mysql
elasticsearch:
image: glassofwhiskey/elasticsearch:2.4
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
networks:
- lfrnet
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
kibana:
image: kibana:4.6
networks:
- lfrnet
ports:
- "5601:5601"
networks:
lfrnet:
volumes:
db-data:
elasticsearch-data:
I'm working on a Ubuntu machine with latest docker version. But I found the same behaviour trying the docker composer file on https://labs.play-with-docker.com/
I start with
docker-compose up --force-recreate -d
And I check the db is not running with
docker stats
No idea how to troubleshoot this.