dcache/Dockerfile

18 lines
548 B
Docker
Raw Permalink 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
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" ]