dcache/Dockerfile

19 lines
627 B
Text
Raw Normal View History

2023-12-17 19:33:45 +05:30
# SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
FROM rust:latest as rust
WORKDIR /src
2023-12-30 14:18:15 +05:30
RUN apt update && apt-get install -y --no-install-recommends protobuf-compiler
2023-12-17 19:33:45 +05:30
COPY . .
RUN cargo build --release
FROM debian:bookworm as dcache
LABEL org.opencontainers.image.source https://git.batsense.net/mcaptcha/dcache
RUN useradd -ms /bin/bash -u 1001 dcache
WORKDIR /home/dcache
COPY --from=rust /src/target/release/main /usr/local/bin/dcache
#COPY --from=rust /src/config/default.toml /etc/dcache/config.toml
USER dcache
CMD [ "/usr/local/bin/dcache" ]