#
# stegtext container file
#
#
# build stage
#
FROM docker.io/rust AS build
COPY . /src
WORKDIR /src
# build static release binary
RUN ["rustup", "target", "add", "x86_64-unknown-linux-musl"]
RUN ["cargo", "build", "--release", "--target", "x86_64-unknown-linux-musl", "--bin", "stegtext"]
#
# run stage
#
FROM scratch
# ref: https://github.com/opencontainers/image-spec/blob/main/annotations.md
LABEL description="Text steganography tool" \
org.opencontainers.image.url="https://codeberg.org/pablotron/stegtext" \
org.opencontainers.image.source="https://codeberg.org/pablotron/stegtext" \
org.opencontainers.image.documentation="https://codeberg.org/pablotron/stegtext" \
org.opencontainers.image.licenses="MIT-0" \
org.opencontainers.image.title="stegtext" \
org.opencontainers.image.description="Text steganography tool"
COPY --from=build /src/target/x86_64-unknown-linux-musl/release/stegtext /stegtext
ENTRYPOINT ["/stegtext"]