karton/Dockerfile

36 lines
681 B
Text
Raw Normal View History

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