karton/Dockerfile

38 lines
734 B
Docker
Raw Permalink Normal View History

2023-03-05 16:02:18 +00:00
FROM docker.io/rust:latest as build
2023-03-05 14:21:12 +00:00
WORKDIR /app
COPY . .
RUN \
DEBIAN_FRONTEND=noninteractive \
apt-get update &&\
apt-get -y install ca-certificates tzdata &&\
CARGO_NET_GIT_FETCH_WITH_CLI=true \
cargo build --release
# https://hub.docker.com/r/bitnami/minideb
2023-03-05 16:02:18 +00:00
FROM docker.io/bitnami/minideb:latest
2023-03-05 14:21:12 +00:00
# microbin will be in /app
WORKDIR /app
# copy time zone info
COPY --from=build \
/usr/share/zoneinfo \
/usr/share/zoneinfo
COPY --from=build \
/etc/ssl/certs/ca-certificates.crt \
/etc/ssl/certs/ca-certificates.crt
# copy built executable
COPY --from=build \
2023-03-05 16:02:18 +00:00
/app/target/release/karton \
/usr/bin/karton
2023-03-05 14:21:12 +00:00
# Expose webport used for the webserver to the docker runtime
EXPOSE 8080
ENTRYPOINT ["karton"]