dockerfile
This commit is contained in:
parent
bdd87a4d54
commit
73f5593d6c
2 changed files with 21 additions and 0 deletions
4
.dockerignore
Normal file
4
.dockerignore
Normal file
|
@ -0,0 +1,4 @@
|
|||
.git
|
||||
deployments
|
||||
examples
|
||||
target
|
17
deployments/docker/Dockerfile
Normal file
17
deployments/docker/Dockerfile
Normal 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" ]
|
Loading…
Reference in a new issue