use local binaries for local docker

This commit is contained in:
Antoni Sawicki 2024-07-09 02:07:50 -07:00
parent 0d998af68c
commit 51c4c35651
2 changed files with 12 additions and 1 deletions

6
Dockerfile.local Normal file
View File

@ -0,0 +1,6 @@
FROM chromedp/headless-shell
ARG TARGETARCH
ADD wrp-${TARGETARCH}-linux /wrp
ENTRYPOINT ["/wrp"]
ENV PATH="/headless-shell:${PATH}"
LABEL maintainer="as@tenoware.com"

View File

@ -14,10 +14,15 @@ cross:
GOOS=linux GOARCH=arm64 go build -a -o wrp-arm64-linux
docker-local:
docker buildx build --platform linux/amd64,linux/arm64 -t tenox7/wrp:latest --load .
GOOS=linux GOARCH=amd64 go build -a -o wrp-amd64-linux
GOOS=linux GOARCH=arm64 go build -a -o wrp-arm64-linux
docker buildx build --platform linux/amd64,linux/arm64 -t tenox7/wrp:latest -f Dockerfile.local --load .
docker-push:
docker buildx build --platform linux/amd64,linux/arm64 -t tenox7/wrp:latest --push .
docker-clean:
docker buildx prune -a -f
clean:
rm -rf wrp-* wrp