redsunlib/Dockerfile

18 lines
434 B
Docker
Raw Normal View History

FROM rust:latest as builder
2021-02-10 14:31:28 +13:00
2020-10-26 09:48:44 +13:00
WORKDIR /usr/src/libreddit
COPY . .
RUN cargo install --path .
FROM debian:buster-slim
RUN apt-get update && apt-get install -y libcurl4 && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/libreddit /usr/local/bin/libreddit
RUN useradd --system --user-group --home-dir /nonexistent --no-create-home --shell /usr/sbin/nologin libreddit
USER libreddit
EXPOSE 8080
2021-02-10 14:31:28 +13:00
CMD ["libreddit"]