dumbserve/Dockerfile

15 lines
472 B
Docker
Raw Permalink Normal View History

2022-08-13 22:50:47 +05:30
FROM rust:latest as rust
WORKDIR /src
COPY . .
RUN cargo --version
RUN cargo build --release
FROM debian:bookworm as dumbserve
LABEL org.opencontainers.image.source https://git.batsense.net/realaravinth/dumbserve
2022-08-13 22:50:47 +05:30
RUN useradd -ms /bin/bash -u 1001 dumbserve
WORKDIR /home/dumbserve
COPY --from=rust /src/target/release/dumbserve /usr/local/bin/
2022-08-14 17:01:13 +05:30
RUN mkdir /var/lib/dumbserve && chown dumbserve:dumbserve /var/lib/dumbserve
2022-08-13 22:50:47 +05:30
USER dumbserve
CMD [ "/usr/local/bin/dumbserve" ]