- Fix the warning "FromAsCasing: 'as' and 'FROM' keywords' casing do not match"
- Sort packages alphabetically and put them on separate lines for easier comparison
This commit is contained in:
parent
ae12945f7f
commit
b2654ca6c2
@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.20.0 as alpine-mimalloc
|
FROM alpine:3.20.0 AS alpine-mimalloc
|
||||||
|
|
||||||
RUN apk add --no-cache mimalloc
|
RUN apk add --no-cache mimalloc
|
||||||
|
|
||||||
@ -6,15 +6,26 @@ ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2
|
|||||||
ENV MIMALLOC_LARGE_OS_PAGES=1
|
ENV MIMALLOC_LARGE_OS_PAGES=1
|
||||||
|
|
||||||
|
|
||||||
FROM alpine-mimalloc as builder
|
FROM alpine-mimalloc AS builder
|
||||||
ARG DOCKER_TAG
|
ARG DOCKER_TAG
|
||||||
ARG BUILD_CONCURRENCY
|
ARG BUILD_CONCURRENCY
|
||||||
RUN mkdir -p /src && mkdir -p /opt
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN mkdir -p /src /opt && \
|
||||||
cmake make git clang libbz2 libxml2 \
|
apk add --no-cache \
|
||||||
boost-dev boost-program_options boost-filesystem boost-iostreams boost-thread \
|
boost-dev \
|
||||||
lua5.4-dev onetbb-dev expat-dev
|
boost-filesystem \
|
||||||
|
boost-iostreams \
|
||||||
|
boost-program_options \
|
||||||
|
boost-thread \
|
||||||
|
clang \
|
||||||
|
cmake \
|
||||||
|
expat-dev \
|
||||||
|
git \
|
||||||
|
libbz2 \
|
||||||
|
libxml2 \
|
||||||
|
lua5.4-dev \
|
||||||
|
make \
|
||||||
|
onetbb-dev
|
||||||
|
|
||||||
COPY . /src
|
COPY . /src
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
@ -41,14 +52,19 @@ RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
|
|||||||
|
|
||||||
# Multistage build to reduce image size - https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds
|
# Multistage build to reduce image size - https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds
|
||||||
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
|
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
|
||||||
FROM alpine-mimalloc as runstage
|
FROM alpine-mimalloc AS runstage
|
||||||
|
|
||||||
COPY --from=builder /usr/local /usr/local
|
COPY --from=builder /usr/local /usr/local
|
||||||
COPY --from=builder /opt /opt
|
COPY --from=builder /opt /opt
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
boost-program_options boost-date_time boost-iostreams boost-thread \
|
boost-date_time \
|
||||||
expat lua5.4 onetbb && \
|
boost-iostreams \
|
||||||
|
boost-program_options \
|
||||||
|
boost-thread \
|
||||||
|
expat \
|
||||||
|
lua5.4 \
|
||||||
|
onetbb && \
|
||||||
ldconfig /usr/local/lib
|
ldconfig /usr/local/lib
|
||||||
|
|
||||||
RUN /usr/local/bin/osrm-extract --help && \
|
RUN /usr/local/bin/osrm-extract --help && \
|
||||||
@ -60,3 +76,4 @@ RUN /usr/local/bin/osrm-extract --help && \
|
|||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user