2022-06-29 00:42:39 +00:00
|
|
|
FROM alpine as build
|
2022-06-28 10:11:47 +00:00
|
|
|
|
2022-06-29 00:37:38 +00:00
|
|
|
ENV RUSTFLAGS="-C target-feature=-crt-static"
|
2022-06-28 10:11:47 +00:00
|
|
|
WORKDIR /usr/src/saysthbot
|
|
|
|
COPY . .
|
2022-06-29 00:51:14 +00:00
|
|
|
RUN apk add --no-cache rustup openssl-dev && rustup-init -y --default-toolchain nightly && cargo build --release
|
2022-06-28 10:11:47 +00:00
|
|
|
|
2022-06-29 00:37:38 +00:00
|
|
|
FROM alpine
|
2022-06-28 10:11:47 +00:00
|
|
|
|
2022-06-29 00:37:38 +00:00
|
|
|
RUN apk add --no-cache ca-certificates openssl
|
2022-06-28 10:11:47 +00:00
|
|
|
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 ./
|