From 57f23463aa7652d8791c52048a8a360a6c8ee37e Mon Sep 17 00:00:00 2001 From: Tetsuharu Ohzeki Date: Wed, 8 Jul 2020 08:59:47 +0900 Subject: [PATCH] Use Docker's multi-stage builds --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9cadaa9..de546b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,9 @@ FROM golang:1.14-buster ADD . /gh-action-detect-unmergeable/ WORKDIR /gh-action-detect-unmergeable/ RUN ["make", "build", "-j"] -ENTRYPOINT ["/gh-action-detect-unmergeable/ghaction_unmergeable_detection"] \ No newline at end of file + +FROM debian:buster-20200607-slim +WORKDIR /root/ +COPY --from=builder /gh-action-detect-unmergeable/ghaction_unmergeable_detection . +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/* +ENTRYPOINT ["/root/ghaction_unmergeable_detection"]