14 lines
472 B
Docker
14 lines
472 B
Docker
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
|
|
RUN useradd -ms /bin/bash -u 1001 dumbserve
|
|
WORKDIR /home/dumbserve
|
|
COPY --from=rust /src/target/release/dumbserve /usr/local/bin/
|
|
RUN mkdir /var/lib/dumbserve && chown dumbserve:dumbserve /var/lib/dumbserve
|
|
USER dumbserve
|
|
CMD [ "/usr/local/bin/dumbserve" ]
|