FROM rust:slim ARG UID="1000" ARG GID="1000" ARG VERSION ENV REFRACTR_DOCKER="true" LABEL org.opencontainers.image.authors="me@brysonsteck.xyz" LABEL version="${VERSION}" LABEL license="MPL-2.0" WORKDIR /usr/src/refractr COPY . . RUN apt update && apt install pkg-config libssl-dev -y RUN cargo install --path . RUN groupadd -g $GID refractr RUN useradd -u $UID -g $GID -mN refractr RUN mkdir /etc/refractr && chown refractr:refractr /etc/refractr USER refractr CMD ["refractr"]