hello @Ben_Kiarie i think there is a platform mismatch between the requested platform for a Docker image and the host platform where you are attempting to run the Docker container.
You can consider building or pulling an image that is compatible with the host platform. We can build a multi-architecture image that supports both linux/amd64 and linux/arm64/v8 , or find an image that is already compatible with the host platform.
@tlepiz could you share which Docker image you are using to run Couch on Apple silicon? Those new steps for running CouchDB for CHT 4.x are going to pull the custom Medic image from public.ecr.aws/medic/cht-couchdb:4.4.0-alpha, but I would guess we are not building an image for ARM.
I am looking for a short-term fix to get Ben up and running, but in the long term, I think Cliff is correct that we should consider building for ARM (if only for development purposes…).
@cliff Thanks for the suggestion. I like the long term solution, perhaps adding a check to determine which image to pull depending on the host platform.
Unfortunately, from Medic’s ECR Public Gallery, I cannot tell which image supports ARM. I tried 4.3.0 but that also failed. The other possibility is to look for an image in Docker DSO where I can select my architecture.
However as @jkuester points out, I need the custom Medic image. I will wait for a suggestion from you Josh on how to resolve this issue. Thank you.
Not sure if @diana as any thoughts on this (from the Couch 3 perspective), but I would expect that you could use the CHT 3.x Couch instructions, but with the apache/couchdb:3 image (instead of apache/couchdb:2). Though, using Couch 2 would probably still work fine for you too. (I imagine @tlepiz, and others on Apple Silicon, might still be running Couch 2…)
I think the easiest way to unblock you to build the images yourself. There is an npm command local-images that will build images locally: https://github.com/medic/cht-core/blob/master/package.json#L29
This should also generate docker-compose files with the images in a folder called local-build in the root of your cht directory.
To get a specific version, you can checkout the tag for that version, build the application and generate the local images.