revolut-engineering / jooq-plugin

Plugin for generating jOOQ classes using dockerized databases
Apache License 2.0
72 stars 29 forks source link

MySQL 5.7 on Apple Silicon throws "no matching manifest for linux/arm64/v8 in the manifest list entries" #32

Open javier-elizaga opened 11 months ago

javier-elizaga commented 11 months ago

Hi,

As described here the issue is resolved adding a new parameter platform: linux/x86_64.

The changes are adding "platform" variable to the Image class and propagate the value to Docker class to use it in:

private fun startContainer() {
        val dbPort = ExposedPort.tcp(portBinding.first)
        docker.createContainerCmd(imageName)
                .withPlatform(platform)
                .withName(containerName)
                .withEnv(env.map { "${it.key}=${it.value}" })
                .withExposedPorts(dbPort)
                .withHostConfig(newHostConfig().withPortBindings(Ports(dbPort, bindPort(portBinding.second))))
                .exec()
        docker.startContainerCmd(containerName).exec()
}

Thanks