mirror of
https://github.com/minoplhy/chhoto-url.git
synced 2024-12-22 19:57:57 +00:00
chg: Nicer multi-arch builds and also add armv7
This commit is contained in:
parent
2baa481040
commit
82559d38fd
@ -1,8 +0,0 @@
|
||||
FROM scratch
|
||||
ARG TARGETARCH
|
||||
|
||||
COPY .docker/$TARGETARCH/chhoto-url /chhoto-url
|
||||
COPY ./resources /resources
|
||||
|
||||
ENTRYPOINT ["/chhoto-url"]
|
||||
|
15
Dockerfile-for-push-script
Normal file
15
Dockerfile-for-push-script
Normal file
@ -0,0 +1,15 @@
|
||||
FROM scratch as builder-amd64
|
||||
COPY ./actix/target/x86_64-unknown-linux-musl/release/chhoto-url /chhoto-url
|
||||
|
||||
FROM scratch as builder-arm64
|
||||
COPY ./actix/target/aarch64-unknown-linux-musl/release/chhoto-url /chhoto-url
|
||||
|
||||
FROM scratch as builder-arm
|
||||
COPY ./actix/target/armv7-unknown-linux-musleabihf/release/chhoto-url /chhoto-url
|
||||
|
||||
ARG TARGETARCH
|
||||
FROM builder-$TARGETARCH
|
||||
COPY ./resources /resources
|
||||
|
||||
ENTRYPOINT ["/chhoto-url"]
|
||||
|
6
Makefile
6
Makefile
@ -5,13 +5,11 @@ setup:
|
||||
|
||||
build:
|
||||
cross build --release --locked --manifest-path=actix/Cargo.toml --target aarch64-unknown-linux-musl
|
||||
cross build --release --locked --manifest-path=actix/Cargo.toml --target armv7-unknown-linux-musleabihf
|
||||
cross build --release --locked --manifest-path=actix/Cargo.toml --target x86_64-unknown-linux-musl
|
||||
|
||||
docker: build
|
||||
mkdir -p .docker/amd64 .docker/arm64
|
||||
cp actix/target/aarch64-unknown-linux-musl/release/chhoto-url .docker/arm64/
|
||||
cp actix/target/x86_64-unknown-linux-musl/release/chhoto-url .docker/amd64/
|
||||
docker buildx build --push --tag sintan1729/chhoto-url:dev --platform linux/amd64,linux/arm64 .
|
||||
docker buildx build --push --tag sintan1729/chhoto-url:dev --platform linux/amd64,linux/arm64,linux/arm/v7 .
|
||||
|
||||
clean:
|
||||
cargo clean --manifest-path=actix/Cargo.toml
|
||||
|
Loading…
Reference in New Issue
Block a user