2022-05-09 21:23:51 +00:00
|
|
|
# latest rust will be used to build the binary
|
|
|
|
FROM rust:latest as builder
|
|
|
|
|
|
|
|
# the temporary directory where we build
|
|
|
|
WORKDIR /usr/src/microbin
|
|
|
|
|
|
|
|
# copy sources to /usr/src/microbin on the temporary container
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
# run release build
|
|
|
|
RUN cargo build --release
|
|
|
|
|
2022-08-28 08:27:38 +00:00
|
|
|
# https://hub.docker.com/r/bitnami/minideb
|
|
|
|
FROM bitnami/minideb:latest
|
2022-05-09 21:23:51 +00:00
|
|
|
|
|
|
|
# microbin will be in /usr/local/bin/microbin/
|
|
|
|
WORKDIR /usr/local/bin
|
|
|
|
|
|
|
|
# copy built exacutable
|
|
|
|
COPY --from=builder /usr/src/microbin/target/release/microbin /usr/local/bin/microbin
|
|
|
|
|
|
|
|
# run the binary
|
2022-06-27 00:37:25 +00:00
|
|
|
CMD ["microbin"]
|