mirror of
https://github.com/maplibre/martin.git
synced 2024-12-24 07:22:52 +03:00
327787273f
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
23 lines
555 B
Docker
Executable File
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"]
|