karton/Dockerfile

33 lines
606 B
Docker
Raw Normal View History

2022-08-25 16:55:03 +00:00
FROM rust:latest as build
2022-08-25 16:55:03 +00:00
WORKDIR /app
COPY . .
2022-08-25 16:55:03 +00:00
RUN \
DEBIAN_FRONTEND=noninteractive \
apt-get update &&\
apt-get -y install ca-certificates tzdata &&\
cargo build --release
2022-08-28 08:27:38 +00:00
# https://hub.docker.com/r/bitnami/minideb
FROM bitnami/minideb:latest
2022-09-26 07:35:38 +00:00
# microbin will be in /app
2022-08-25 16:55:03 +00:00
WORKDIR /app
2022-09-26 07:35:38 +00:00
# copy time zone info
2022-08-25 16:55:03 +00:00
COPY --from=build \
/usr/share/zoneinfo \
/usr/share/zoneinfo
2022-09-26 07:35:38 +00:00
2022-08-25 16:55:03 +00:00
COPY --from=build \
/etc/ssl/certs/ca-certificates.crt \
/etc/ssl/certs/ca-certificates.crt
# copy built exacutable
2022-08-25 16:55:03 +00:00
COPY --from=build \
/app/target/release/microbin \
/usr/bin/microbin
2022-08-25 16:55:03 +00:00
ENTRYPOINT ["microbin"]