karton/Dockerfile

38 lines
720 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_NET_GIT_FETCH_WITH_CLI=true \
2022-08-25 16:55:03 +00:00
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
2022-11-09 15:46:51 +00:00
# copy built executable
2022-08-25 16:55:03 +00:00
COPY --from=build \
/app/target/release/microbin \
/usr/bin/microbin
2022-10-01 05:11:16 +00:00
# Expose webport used for the webserver to the docker runtime
EXPOSE 8080
2022-11-09 15:46:51 +00:00
ENTRYPOINT ["microbin"]