Tried firing SDK up on my Apple M1 this morning but was not suucessful. I experienced the following error:
Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:4.1.1:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to execute mojo: Execution null of goal org.openmrs.maven.plugins:openmrs-sdk-docker-maven-plugin:4.1.1:create-mysql failed: Status 404: No such image: mysql:5.6
Checking around seems like there is no official MySQL 5.6 Image for M1. There are some workaround where you need to define the platform by running this command
I am not sure how to add this to our SDK. @ibacher @ssmusoke @jwnasambu
@kmurumba am sorry I have never used docker before and I will be glad to learn from other members.
The SDK only exposes a very limited number of properties, but based on our actual needs, so this will need to be an enhancement and code change to the SDK.
Internally the SDK uses the docker-java library to create and manage Docker images. The MySQL image is setup in this Maven plugin which is invoked by the SDK here.
Probably the thing to do is to modify the
create-mysql mojo so that it has a property that stores the
platform and have this default to “linux/x86_64” on M1 Macs only (the problem being that other ARM-based OSes probably don’t have Rosetta 2 or an equivalent so running x86_64 code on generic ARM machines is likely a bad idea).