mirror of
https://github.com/SinTan1729/chhoto-url
synced 2024-12-26 07:38:36 -06:00
docs: Updated build instructions
This commit is contained in:
parent
ce76f04f35
commit
629e66a57c
3 changed files with 10 additions and 4 deletions
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
||||||
USERNAME := ${USERNAME}
|
USERNAME := ${DOCKER_USERNAME}
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
cargo install cross
|
cargo install cross
|
||||||
|
|
10
README.md
10
README.md
|
@ -75,10 +75,16 @@ place, resulting in possibly unwanted behavior.
|
||||||
|
|
||||||
## Building and running with docker
|
## Building and running with docker
|
||||||
### `docker run` method
|
### `docker run` method
|
||||||
0. (Only if you really want to) Build the image
|
0. (Only if you really want to) Build the image for the default `x86_64-unknown-linux-musl` target:
|
||||||
```
|
```
|
||||||
docker build . -t chhoto-url:latest
|
docker build . -t chhoto-url
|
||||||
```
|
```
|
||||||
|
For building on `arm64` or `arm/v7`, use the following:
|
||||||
|
```
|
||||||
|
docker build . -t chhoto-url --build-arg target=<desired-target>
|
||||||
|
```
|
||||||
|
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
|
1. Run the image
|
||||||
```
|
```
|
||||||
docker run -p 4567:4567
|
docker run -p 4567:4567
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
if [ "$1" == "dev" ]; then
|
if [ "$1" == "dev" ]; then
|
||||||
docker buildx build --push --tag sintan1729/$name:dev --platform linux/amd64
|
docker buildx build --push --tag sintan1729/$name:dev .
|
||||||
|
|
||||||
elif [ "$1" == "release" ]; then
|
elif [ "$1" == "release" ]; then
|
||||||
v_patch=$(cat actix/Cargo.toml | sed -rn 's/^version = "(.+)"$/\1/p')
|
v_patch=$(cat actix/Cargo.toml | sed -rn 's/^version = "(.+)"$/\1/p')
|
||||||
|
|
Loading…
Reference in a new issue