saysthbot-reborn/Dockerfile

16 lines
517 B
Docker
Raw Normal View History

2022-06-29 00:42:39 +00:00
FROM alpine as build
2022-06-29 00:37:38 +00:00
ENV RUSTFLAGS="-C target-feature=-crt-static"
WORKDIR /usr/src/saysthbot
COPY . .
2022-06-29 00:54:33 +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
2022-06-29 00:37:38 +00:00
FROM alpine
2022-06-29 00:37:38 +00:00
RUN apk add --no-cache ca-certificates openssl
ENV TGBOT_TOKEN="" DATABASE_URI="" WRAPPER=""
CMD ["-c", "${WRAPPER} ./saysthbot-reborn ${OPTIONS}"]
ENTRYPOINT [ "/bin/sh" ]
COPY --from=build /usr/src/saysthbot/target/release/saysthbot-reborn ./