]> Nishi Git Mirror - aya.git/commitdiff
Move tools to a tools layer
authorJames Mills <1290234+prologic@users.noreply.github.com>
Thu, 16 Mar 2023 09:22:56 +0000 (19:22 +1000)
committerJames Mills <1290234+prologic@users.noreply.github.com>
Thu, 16 Mar 2023 09:22:56 +0000 (19:22 +1000)
Dockerfile
Makefile

index f392c70e50071a9ed50d142ca59b6bd0b3c62c4a..ed51be7b4526d7665627be80135f00b2f743a150 100644 (file)
@@ -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
 
index 448b8b182b0fc4b66a31ab04047a4ef6cfce9172..098cc252a99b0d0825cf43e3f5001b99db86d369 100644 (file)
--- 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)