use local binaries for local dockerfile

This commit is contained in:
Antoni Sawicki 2024-07-09 01:57:51 -07:00
parent b5747f52e7
commit 500ad0d19a
2 changed files with 9 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,7 +14,9 @@ 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 .