martin/Dockerfile
Yuri Astrakhan 327787273f
Use cargo sparse index in docker (#614)
Make docker builds much faster with the latest sparse cargo registry
setting

Note that we can revert this PR after the rust 1.70 is out, as i heard
it will become the default
2023-03-25 18:20:39 +00:00

23 lines
555 B
Docker
Executable File

FROM rust:alpine as builder
RUN apk update
RUN apk add --no-cache openssl-dev musl-dev perl build-base
WORKDIR /usr/src/martin
ADD . .
RUN CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse cargo build --release --features=vendored-openssl
FROM alpine:latest
LABEL org.opencontainers.image.description="Blazing fast and lightweight tile server with PostGIS, MBTiles, and PMTiles support"
RUN apk add --no-cache libc6-compat
COPY --from=builder \
/usr/src/martin/target/release/martin \
/usr/local/bin/
EXPOSE 3000
ENTRYPOINT ["/usr/local/bin/martin"]