mirror of
https://github.com/SinTan1729/chhoto-url
synced 2024-12-26 23:58:35 -06:00
chg: Nicer multi-arch builds and also add armv7
This commit is contained in:
parent
2baa481040
commit
82559d38fd
3 changed files with 17 additions and 12 deletions
|
@ -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:
|
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 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
|
cross build --release --locked --manifest-path=actix/Cargo.toml --target x86_64-unknown-linux-musl
|
||||||
|
|
||||||
docker: build
|
docker: build
|
||||||
mkdir -p .docker/amd64 .docker/arm64
|
docker buildx build --push --tag sintan1729/chhoto-url:dev --platform linux/amd64,linux/arm64,linux/arm/v7 .
|
||||||
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 .
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cargo clean --manifest-path=actix/Cargo.toml
|
cargo clean --manifest-path=actix/Cargo.toml
|
||||||
|
|
Loading…
Reference in a new issue