I have been working on a project with a number of docker containers that are either run on a local machine, or on a remote machine.
The process is fairly simple, I either need to "build" a docker image, "run" a container, from an image, and/ or push an image to a local docker repository.
The process is like this
dockers/
name-of-image/DockerFile
/... other files
docker2/Dockerfile
docker3/Dockerfile
...
docker-n/Dockerfile
A YAML file describes which dockers "for this stage", I want to "build", run and push Sometimes a run is a remote image (eg: registry:2 - the docker registry), and sometimes I just want to build and run.
This was encapsulated in a shell script, but will all shell scripts that get 'big', they quickly turn to problematic.
Here I am exploring how to do the above, using Ammonite, a Scala REPL / Scala Shell runner.