diff --git a/Dockerfile b/Dockerfile index 2b9c8b3..3053946 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ # Build the sequencer binary FROM golang:1.20.3-alpine3.17 as sequencer +LABEL stage=sequencer-builder RUN apk add --update make build-base curl git RUN go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest WORKDIR /app -COPY .git .git COPY .gopath~ .gopath~ COPY Makefile . COPY go.mod . @@ -17,6 +17,7 @@ COPY tools tools COPY x x COPY cmd cmd COPY testutil testutil +COPY .git .git RUN make build diff --git a/Makefile b/Makefile index 9eae69e..07946c4 100644 --- a/Makefile +++ b/Makefile @@ -76,6 +76,7 @@ docker-build: all | ; $(info $(M) building docker container) @ DOCKER_BUILDKIT=0 docker build -t "warpredstone/sequencer:latest" . # DOCKER_BUILDKIT=0 docker build -t "warpredstone/sequencer:$(VERSION)" . rm -rf vendor + docker images --filter label=stage=sequencer-builder -q | tail -n +2 | xargs docker image rm .PHONY: docker-push docker-push: all | ; $(info $(M) building docker container) @