redsunlib/Dockerfile

12 lines
363 B
Docker
Raw Normal View History

FROM rust:alpine as builder
2020-10-26 09:48:44 +13:00
WORKDIR /usr/src/libreddit
COPY . .
RUN apk add --no-cache g++
2020-10-26 09:48:44 +13:00
RUN cargo install --path .
FROM alpine:latest
RUN apk add --no-cache curl
COPY --from=builder /usr/local/cargo/bin/libreddit /usr/local/bin/libreddit
EXPOSE 8080
HEALTHCHECK --interval=5m --timeout=3s CMD curl -f http://localhost:8080/settings || exit 1
CMD ["libreddit"]