hangitbot/Dockerfile

18 lines
522 B
Docker
Raw Normal View History

2023-12-24 10:59:55 +00:00
FROM alpine as build
ENV RUSTFLAGS="-C target-feature=-crt-static"
WORKDIR /usr/src/saysthbot
COPY . .
2024-01-08 05:03:12 +00:00
RUN apk add --no-cache rustup openssl-dev build-base && \
rustup-init -y --default-toolchain nightly && \
source ${HOME}/.cargo/env && cargo build --release
2023-12-24 10:59:55 +00:00
FROM alpine
RUN apk add --no-cache ca-certificates openssl libgcc
ENV TGBOT_TOKEN="" DATABASE_URI="" WRAPPER=""
CMD ["-c", "${WRAPPER} ./hangitbot ${OPTIONS}"]
ENTRYPOINT [ "/bin/sh" ]
COPY --from=build /usr/src/saysthbot/target/release/hangitbot ./