summaryrefslogtreecommitdiff
path: root/deployments
diff options
context:
space:
mode:
Diffstat (limited to 'deployments')
-rw-r--r--deployments/docker/Dockerfile17
1 files changed, 17 insertions, 0 deletions
diff --git a/deployments/docker/Dockerfile b/deployments/docker/Dockerfile
new file mode 100644
index 0000000..ba1c9a6
--- /dev/null
+++ b/deployments/docker/Dockerfile
@@ -0,0 +1,17 @@
+FROM rust:alpine AS builder
+
+COPY Cargo.toml Cargo.lock /app/
+COPY src /app/src
+WORKDIR /app
+RUN apk add musl-dev
+RUN cargo build --release
+
+FROM alpine
+RUN apk add --no-cache tini
+RUN adduser -DH block
+USER block
+COPY --from=builder /app/target/release/bashttp /bashttp
+COPY config /config
+
+ENV CONFIG_PATH=/config
+ENTRYPOINT [ "/sbin/tini", "--", "/bashttp" ]