-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (22 loc) · 813 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM rust:alpine as build
# create a new empty shell project
RUN apk update && apk add build-base
# Add any additional dependencies your application may need
RUN apk add libgcc libressl-dev
RUN rustup target add x86_64-unknown-linux-musl
WORKDIR /koval-telegram-bot
# copy over your manifests
# COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
# copy your source tree
COPY ./src ./src
# this build step will cache your dependencies
RUN cargo build --target x86_64-unknown-linux-musl --release
# our final base
FROM alpine
# copy the build artifact from the build stage
COPY --from=build /koval-telegram-bot/target/x86_64-unknown-linux-musl/release/koval-telegram-bot ./koval
ENV TELOXIDE_TOKEN=your_token_here
ENV RUST_LOG=info
# set the startup command to run your binary
CMD ["./koval"]