cli
cli copied to clipboard
omg run/subscribe shouldn't try to rebuild the docker image if run multiple times
While docker build is cached, there's still no need to go through the entire process of building the image for multiple invocations of omg run.
tl;dr: omg run will always result in the following:
> omg run hmac -a method=sha1 -a "data=hello world" -a "secret=my secret"
ℹ Building Docker image
Sending build context to Docker daemon 238.8MB
Step 1/9 : FROM dlang2/ldc-ubuntu:1.14.0 as builder
---> 5961d5b8c51d
Step 2/9 : WORKDIR /src
---> Using cache
---> cfd36685387e
Step 3/9 : COPY dub.sdl dub.selections.json /src/
---> Using cache
---> e7453d3921f8
Step 4/9 : RUN dub build -b release || true
---> Using cache
---> 71d48349e922
Step 5/9 : COPY source /src/source
---> Using cache
---> 59400c680683
Step 6/9 : RUN dub build -b release
---> Using cache
---> c01fff604316
Step 7/9 : FROM busybox
---> 59788edf1f3e
Step 8/9 : COPY --from=builder /src/hashes /hashes
---> Using cache
---> e3b74bc10ecf
Step 9/9 : ENTRYPOINT [ "/hashes" ]
---> Using cache
---> b4b0ee47f358
Successfully built b4b0ee47f358
Successfully tagged omg/wilzbach/hashes:latest
✔ Built Docker image with name: omg/wilzbach/hashes
✔ Started Docker container: c858d5b1f039
✔ Health check passed
✔ Ran action: `hmac` with output: {
"method": "sha1",
"digest": "9F60EE4B05E590A7F3FAC552BFB9D98FA46F78D9"
}
✔ Stopped Docker container: c858d5b1f039
On consecutive runs, instead of building the docker image again, it could directly start the docker container.