microservices-patterns/ftgo-application

:composeUp fails mysql ports declared but not found

stephennewman-lab49 opened this issue · 2 comments

I have followed the instruction to Building and running the application in docker compose.

The ./gradlew :composeUp command on a macbook pro M1 fails with
"These ports of service mysql are declared as exposed but cannot be found in NetworkSettings: 3306"

There are a lot of moving pieces here: any help will be gratefully received.

Great book by the way.

When using docker-compose to simply create a mysql service, need to add platform: linux/amd64 on macbook pro M1 as in
`
services:

mysql:
image: mysql
platform: linux/amd64
`

Couldn't see anyway to add this to the dockerfile in the mysql directory of the book's code. Saw that can set the docker default platform to achieve the same
export DOCKER_DEFAULT_PLATFORM=linux/amd64

But didn't fix the problem

./mysql/Dockerfile

FROM mysql:5.7.13 --> FROM amd64/mysql