This is the coffee shop example project.
It comprises two applications, coffee-shop and barista, built using Java EE and Eclipse MicroProfile.
To build the coffee-shop application, run the following:
cd coffee-shop/ mvn clean package docker build -t coffee-shop:1 .
Then, to build the barista application, run the following:
cd ../barista/ mvn clean package docker build -t barista:1 .
To ensure that the Docker containers can resolve each other by container name, we create a Docker network for them:
docker network create --subnet=192.168.42.0/24 dkrnet
In order to run the applications in container, execute the following script:
./docker-run-local.sh
Alternatively, you can run the containers individually, in multiple terminal sessions:
docker run --rm \ --network=dkrnet \ --name=barista \ barista:1 docker run --rm \ -p 9080:9080 \ -p 9443:9443 \ --network=dkrnet \ --name=coffee-shop \ coffee-shop:1