Add missing and IMPORTANT script for Docker build
This commit is contained in:
parent
ba2110bd92
commit
8e8fa3e66d
14
README.md
14
README.md
@ -4,16 +4,22 @@ This repository contains the source to build an archive for both
|
||||
[Vaultwarden](https://github.com/dani-garcia/vaultwarden) and
|
||||
[Web Vault builds for Vaultwarden](https://github.com/dani-garcia/bw_web_builds).
|
||||
|
||||
## Usage
|
||||
## Usage Docker
|
||||
|
||||
If you have [Docker](https://www.docker.com/) installed locally, just run the following:
|
||||
|
||||
```bash
|
||||
user@hostname$ ./build-in-container.sh
|
||||
```
|
||||
|
||||
By default this will build the last version on Debian Bullseye and put the
|
||||
archive to `target/` directory.
|
||||
|
||||
## Build on current host
|
||||
|
||||
```bash
|
||||
user@hostname$ ./build.sh
|
||||
```
|
||||
By default this will build the last version on Debian Bullseye and put the
|
||||
archive to target/ directory.
|
||||
|
||||
## References
|
||||
|
||||
* [ayosec/polybar-debian](https://github.com/ayosec/polybar-debian)
|
||||
|
34
build-in-container.sh
Executable file
34
build-in-container.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
TARGET="$(dirname "$0" | xargs realpath)"
|
||||
VERSION="3.4.2"
|
||||
IMAGE="debian:bullseye"
|
||||
|
||||
while getopts "v:i:h" opt
|
||||
do
|
||||
case "$opt" in
|
||||
v)
|
||||
VERSION="$OPTARG"
|
||||
;;
|
||||
i)
|
||||
IMAGE="$OPTARG"
|
||||
;;
|
||||
h)
|
||||
echo "Usage: $0 [-i image] [-v version]"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
docker run --rm \
|
||||
--name vault-build-$$ \
|
||||
-v "$TARGET:/target" \
|
||||
-w /target \
|
||||
--user root \
|
||||
"$IMAGE" \
|
||||
sh build.sh
|
Loading…
x
Reference in New Issue
Block a user