mirror of
https://codeberg.org/gigirassy/the-pit
synced 2026-08-30 23:27:39 +00:00
Add Dockerfile
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
FROM rust:alpine AS build
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
ENV RUSTFLAGS="-C target-feature=+crt-static"
|
||||
|
||||
RUN apk add --no-cache build-base musl-dev pkgconf git
|
||||
|
||||
RUN case "$TARGETARCH" in \
|
||||
amd64) cargo_target=x86_64-unknown-linux-musl ;; \
|
||||
arm64) cargo_target=aarch64-unknown-linux-musl ;; \
|
||||
*) exit 1 ;; \
|
||||
esac && \
|
||||
rustup target add "$cargo_target" && \
|
||||
cargo install \
|
||||
--git https://codeberg.org/gigirassy/the-pit \
|
||||
--root /out \
|
||||
--target "$cargo_target"
|
||||
|
||||
FROM kgrv/mini:tn
|
||||
|
||||
COPY --from=build --chown=mini:mini /out/bin/the-pit /the-pit
|
||||
|
||||
ENV TARPIT_BIND=0.0.0.0:22
|
||||
|
||||
ENTRYPOINT ["tini", "--", "/the-pit"]
|
||||
Reference in New Issue
Block a user