# Builds an image containing the binary and little else.

# Builder image
FROM docker.io/library/rust:slim
COPY . /twitch-rss
RUN cd /twitch-rss \
  && cargo --version \
  && cargo build --all-targets --release

# Release image: copy executable from builder
FROM docker.io/library/debian:bullseye-slim
COPY --from=0 /twitch-rss/target/release/twitch-rss /twitch-rss
RUN chmod +x /twitch-rss && /twitch-rss --version
