dockerfile

This commit is contained in:
Freya Murphy 2023-07-03 01:23:30 -04:00
parent bdd87a4d54
commit 73f5593d6c
2 changed files with 21 additions and 0 deletions

4
.dockerignore Normal file
View file

@ -0,0 +1,4 @@
.git
deployments
examples
target

View file

@ -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" ]