From 02b31649bc9309a425ff3f249ea14f0f38b018f2 Mon Sep 17 00:00:00 2001 From: James Mills <1290234+prologic@users.noreply.github.com> Date: Thu, 16 Mar 2023 19:22:56 +1000 Subject: [PATCH] Move tools to a tools layer --- Dockerfile | 8 ++++++++ Makefile | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f392c70..ed51be7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,12 @@ ARG BUILD="" # Build cli binary RUN make cli VERSION=$VERSION COMMIT=$COMMIT BUILD=$BUILD +# Tools +FROM golang:alpine AS tools + +RUN go install github.com/tdewolff/minify/v2/cmd/minify@latest +RUN go install go.mills.io/static/cmd/static@latest + # Runtime FROM alpine:latest @@ -54,6 +60,8 @@ VOLUME /data WORKDIR /data COPY --from=build /src/zs /usr/local/bin/zs +COPY --from=tools /go/bin/minify /usr/local/bin/minify +COPY --from=tools /go/bin/static /usr/local/bin/static COPY .dockerfiles/entrypoint.sh /init diff --git a/Makefile b/Makefile index 448b8b1..098cc25 100644 --- a/Makefile +++ b/Makefile @@ -28,8 +28,6 @@ preflight: ## Run preflight checks to ensure you have the right build tools @./preflight.sh deps: ## Install any required dependencies - @$(GOCMD) install github.com/tdewolff/minify/v2/cmd/minify@latest - @$(GOCMD) install go.mills.io/static/cmd/static@latest dev : DEBUG=1 dev : build ## Build debug version of zs (cli) -- 2.43.0