forked from kashifshah-mirrors/zs
Move tools to a tools layer
This commit is contained in:
parent
8f7b887fc3
commit
02b31649bc
@ -35,6 +35,12 @@ ARG BUILD=""
|
|||||||
# Build cli binary
|
# Build cli binary
|
||||||
RUN make cli VERSION=$VERSION COMMIT=$COMMIT BUILD=$BUILD
|
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
|
# Runtime
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
@ -54,6 +60,8 @@ VOLUME /data
|
|||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
COPY --from=build /src/zs /usr/local/bin/zs
|
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
|
COPY .dockerfiles/entrypoint.sh /init
|
||||||
|
|
||||||
|
2
Makefile
2
Makefile
@ -28,8 +28,6 @@ preflight: ## Run preflight checks to ensure you have the right build tools
|
|||||||
@./preflight.sh
|
@./preflight.sh
|
||||||
|
|
||||||
deps: ## Install any required dependencies
|
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 : DEBUG=1
|
||||||
dev : build ## Build debug version of zs (cli)
|
dev : build ## Build debug version of zs (cli)
|
||||||
|
Loading…
Reference in New Issue
Block a user