Issue with building reference application using docker

Hi,

I’ve been trying to set up the reference application from openmrs-distro-referenceapplication but have been running into issues and would greatly appreciate some help.

Details

  • Application Name: Reference Application
  • Version Number: 3.4.0-rc.1-30-gf9ccf132 (also tried with 3.5.0 – same result)
  • OS: macOS Sequoia v15.6.1
  • Docker Version: 28.3.3

Steps

git clone https://github.com/openmrs/openmrs-distro-referenceapplication.git
cd openmrs-distro-referenceapplication
docker compose build

Output

WARN[0000] /Users/mersenne/Documents/development/OpenMRS/openmrs-distro-referenceapplication/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
WARN[0000] /Users/mersenne/Documents/development/OpenMRS/openmrs-distro-referenceapplication/docker-compose.override.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Building 1.4s (17/18)                                                                                                                                                                                   
 => [internal] load local bake definitions                                                                                                                                                             0.0s
 => => reading from stdin 1.95kB                                                                                                                                                                       0.0s
 => [frontend internal] load build definition from Dockerfile                                                                                                                                          0.0s
 => => transferring dockerfile: 1.46kB                                                                                                                                                                 0.0s
 => [gateway internal] load build definition from Dockerfile                                                                                                                                           0.0s
 => => transferring dockerfile: 205B                                                                                                                                                                   0.0s
 => [backend internal] load build definition from Dockerfile                                                                                                                                           0.0s
 => => transferring dockerfile: 1.92kB                                                                                                                                                                 0.0s
 => [gateway] resolve image config for docker-image://docker.io/docker/dockerfile:1.3                                                                                                                  0.5s
 => [backend] resolve image config for docker-image://docker.io/docker/dockerfile:1                                                                                                                    0.5s
 => CACHED [frontend] docker-image://docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2                                                           0.0s
 => CACHED [backend] docker-image://docker.io/docker/dockerfile:1@sha256:dabfc0969b935b2080555ace70ee69a5261af8a8f1b4df97b9e7fbcf6722eddf                                                              0.0s
 => [frontend internal] load .dockerignore                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => [gateway internal] load .dockerignore                                                                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => CANCELED [backend internal] load metadata for docker.io/openmrs/openmrs-core:nightly-amazoncorretto-17                                                                                             0.4s
 => ERROR [backend internal] load metadata for docker.io/openmrs/openmrs-core:dev-amazoncorretto-17                                                                                                    0.4s
 => [gateway internal] load metadata for docker.io/library/nginx:1.25-alpine                                                                                                                           0.4s
 => [frontend internal] load metadata for docker.io/library/node:22-alpine                                                                                                                             0.4s
 => CACHED [gateway 1/3] FROM docker.io/library/nginx:1.25-alpine@sha256:516475cc129da42866742567714ddc681e5eed7b9ee0b9e9c015e464b4221a00                                                              0.0s
 => [gateway internal] load build context                                                                                                                                                              0.0s
 => => transferring context: 3.58kB                                                                                                                                                                    0.0s
 => CANCELED [gateway 2/3] COPY nginx.conf /etc/nginx/nginx.conf                                                                                                                                       0.0s
------
 > [backend internal] load metadata for docker.io/openmrs/openmrs-core:dev-amazoncorretto-17:
------
Dockerfile:4

--------------------

   2 |     

   3 |     ### Dev Stage

   4 | >>> FROM openmrs/openmrs-core:dev-amazoncorretto-17 AS dev

   5 |     WORKDIR /openmrs_distro

   6 |     

--------------------

target backend: failed to solve: docker.io/openmrs/openmrs-core:dev-amazoncorretto-17: not found



View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/ql5goqdzengp5i7rcuhc0eptu

Am I doing anything wrong? Let me know if there is more information I can provide.

@mersennec can you confirm your docker installation..

are you using docker desktop or simple docker deamon ?

Been having a similar issue ever since i installed docker desktop on linux

Hi @tendomart , it’s Docker Desktop.

Output of ‘docker version’:

Client:
 Version:           28.3.3
 API version:       1.51
 Go version:        go1.24.5
 Git commit:        980b856
 Built:             Fri Jul 25 11:33:03 2025
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.45.0 (203075)
 Engine:
  Version:          28.3.3
  API version:      1.51 (minimum version 1.24)
  Go version:       go1.24.5
  Git commit:       bea959c
  Built:            Fri Jul 25 11:35:32 2025
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

got the same issues with docker desktop.. I normally do my builds using docker deamon on commandline, but was doing some AI work, that’s why i installed docker desktop.. So try building and running without docker desktop

@tendomart just to clarify, do you mean that instead of my current approach (installing Docker Desktop and running ‘docker compose build‘ in the command line), I should:

  • uninstall Docker Desktop
  • install Docker Engine
  • run the Docker daemon
  • build using the daemon?

If so, do you have any advice for doing it on a Mac? Should I setup a Linux VM and do development in there?

Yes please try that .

check the correto image version

FROM openmrs/openmrs-core:nightly-amazoncorretto-17

@mersennec i have just made some commits to the distro. Can you update and build again?

2 Likes

@dkayiwa the build works now! Thanks.