add container builds
This commit is contained in:
2
rust/.dockerignore
Normal file
2
rust/.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!/target/x86_64-unknown-linux-musl/release/packager
|
||||
9
rust/Dockerfile
Normal file
9
rust/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM docker.io/library/alpine:3.18
|
||||
|
||||
RUN apk add --no-cache tini
|
||||
|
||||
COPY target/x86_64-unknown-linux-musl/release/packager /usr/local/bin/packager
|
||||
|
||||
ENTRYPOINT ["tini", "--"]
|
||||
|
||||
CMD ["/usr/local/bin/packager", "--bind", "0.0.0.0", "--port", "3000", "--database-url", "/var/lib/packager/db/db.sqlite"]
|
||||
12
rust/build-container.sh
Executable file
12
rust/build-container.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
cargo build --target x86_64-unknown-linux-musl --release
|
||||
|
||||
docker build -t packager:latest .
|
||||
docker tag packager:latest packager:$(git rev-parse HEAD)
|
||||
docker tag packager:latest registry.hkoerber.de/packager:$(git rev-parse HEAD)
|
||||
Reference in New Issue
Block a user