mirror of https://github.com/spikecodes/libreddit
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
434 B
17 lines
434 B
FROM rust:latest as builder
|
|
|
|
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
|
|
|
|
CMD ["libreddit"]
|
|
|