mirror of
https://github.com/wagoodman/dive
synced 2024-05-30 18:52:14 +02:00
use goreleaser paths for input binary in dockerfiles/makefile
This commit is contained in:
parent
3229efafa5
commit
0364bf8702
|
@ -2,6 +2,7 @@
|
||||||
/.data
|
/.data
|
||||||
/.cover
|
/.cover
|
||||||
/dist
|
/dist
|
||||||
|
!/dist/dive_linux_amd64
|
||||||
/ui
|
/ui
|
||||||
/utils
|
/utils
|
||||||
/image
|
/image
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
FROM alpine:3.10
|
FROM alpine:3.10
|
||||||
COPY dive /
|
COPY dist/dive_linux_amd64/dive /
|
||||||
ENTRYPOINT ["/dive"]
|
ENTRYPOINT ["/dive"]
|
||||||
|
|
|
@ -5,6 +5,6 @@ RUN apk --update add curl \
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=build /tmp/docker /
|
COPY --from=build /tmp/docker /
|
||||||
COPY dive /
|
COPY dist/dive_linux_amd64/dive /
|
||||||
ENV PATH /
|
ENV PATH /
|
||||||
ENTRYPOINT ["/dive"]
|
ENTRYPOINT ["/dive"]
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY dive /
|
COPY dist/dive_linux_amd64/dive /
|
||||||
ENTRYPOINT ["/dive"]
|
ENTRYPOINT ["/dive"]
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -1,18 +1,20 @@
|
||||||
BIN = dive
|
BIN = dive
|
||||||
|
BUILD_DIR = ./dist/dive_linux_amd64/
|
||||||
|
BUILD_PATH = $(BUILD_DIR)/$(BIN)
|
||||||
|
|
||||||
all: clean build
|
all: clean build
|
||||||
|
|
||||||
run: build
|
run: build
|
||||||
./build/$(BIN) build -t dive-example:latest -f .data/Dockerfile.example .
|
$(BUILD_PATH) build -t dive-example:latest -f .data/Dockerfile.example .
|
||||||
|
|
||||||
run-ci: build
|
run-ci: build
|
||||||
CI=true ./build/$(BIN) dive-example:latest --ci-config .data/.dive-ci
|
CI=true $(BUILD_PATH) dive-example:latest --ci-config .data/.dive-ci
|
||||||
|
|
||||||
run-large: build
|
run-large: build
|
||||||
./build/$(BIN) amir20/clashleaders:latest
|
$(BUILD_PATH) amir20/clashleaders:latest
|
||||||
|
|
||||||
build:
|
build:
|
||||||
CGO_ENABLED=0 go build -o build/$(BIN)
|
CGO_ENABLED=0 go build -o $(BUILD_PATH)
|
||||||
|
|
||||||
release: test-coverage validate
|
release: test-coverage validate
|
||||||
./.scripts/tag.sh
|
./.scripts/tag.sh
|
||||||
|
@ -46,7 +48,7 @@ setup:
|
||||||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b /go/bin v1.18.0
|
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b /go/bin v1.18.0
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build
|
rm -rf dist
|
||||||
go clean
|
go clean
|
||||||
|
|
||||||
.PHONY: build install test lint clean release validate generate-test-data test-coverage ci
|
.PHONY: build install test lint clean release validate generate-test-data test-coverage ci
|
||||||
|
|
Loading…
Reference in a new issue