Compare commits

...

3 Commits

Author SHA1 Message Date
Sayantan Santra 20956feb90
Merge dfefff2703 into d6dcd2f18d 2024-03-25 03:35:38 -05:00
Sayantan Santra dfefff2703
docs: Added a note about building 2024-03-25 01:40:10 -05:00
Sayantan Santra 6d3d220cff
build: Fix the docker_push_script 2024-03-25 01:26:13 -05:00
2 changed files with 4 additions and 2 deletions

View File

@ -83,6 +83,7 @@ For building on `arm64` or `arm/v7`, use the following:
```
docker build . -t chhoto-url --build-arg target=<desired-target>
```
Make sure that the desired target is a `musl` one, since the docker image is built from `scratch`.
For cross-compilation, take a look at the `Makefile`. It builds and pushes for `linux/amd64`, `linux/aarch64`
and `linux/arm/v7` architectures. For any other architectures, open a discussion, and I'll try to help you out.
1. Run the image

View File

@ -7,9 +7,10 @@ elif [ "$1" == "release" ]; then
v_patch=$(cat actix/Cargo.toml | sed -rn 's/^version = "(.+)"$/\1/p')
v_minor=$(echo $v_patch | sed -rn 's/^(.+\..+)\..+$/\1/p')
v_major=$(echo $v_minor | sed -rn 's/^(.+)\..+$/\1/p')
make build
name="chhoto-url"
docker buildx build --push --tag sintan1729/$name:$v_major --tag sintan1729/$v_minor: \
--tag sintan1729/$name:$v_patch --tag sintan1729/$name:latest --platform linux/amd64,linux/arm64
--tag sintan1729/$name:$v_patch --tag sintan1729/$name:latest --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.multiarch .
fi