I have a bash script that contains:
podman run --rm localhost/img1 prog1 somearg1
podman run --rm localhost/img2 prog2 otherarg1
It works just fine. The command-line tools prog1 and prog2
perform some calculations.
Now I would like to containerize the bash script and
run everything in a pod.
Do you have any tips on how to proceed?
One idea I had was to create a new container image based on
localhost/img1, but with the addition of a gRPC service or a Varlink
service for executing prog1. This service would make use of a Unix
domain socket. The same things would be done for localhost/img2.
Do you know of any tools that automate the writing of such a service
(i.e. a service that wraps a command-line tool)?
Socket activation and some exit-on-idle functionality would be cool
(but not so important).
(Socket activation might not be available in gRPC
https://github.com/grpc/grpc/issues/19133)
Thanks,
Erik