mirror of
https://github.com/yrutschle/sslh.git
synced 2025-06-08 19:32:06 +03:00
docker: Improve caching layers
Docker is most efficient if you can 'order' the layers from least-changing to most changing to improve on cache hits. While here, change ADD to COPY as add is really intended to download external packages, as well as installing sslh into a proper location. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
This commit is contained in:
parent
7b7c9231b0
commit
20764074cb
@ -1,7 +1,8 @@
|
|||||||
FROM alpine:latest as build
|
FROM alpine:latest as build
|
||||||
|
|
||||||
ADD . /sslh
|
WORKDIR /sslh
|
||||||
|
|
||||||
|
COPY . /sslh
|
||||||
RUN \
|
RUN \
|
||||||
apk add \
|
apk add \
|
||||||
gcc \
|
gcc \
|
||||||
@ -10,14 +11,13 @@ RUN \
|
|||||||
musl-dev \
|
musl-dev \
|
||||||
pcre2-dev \
|
pcre2-dev \
|
||||||
perl && \
|
perl && \
|
||||||
cd /sslh && \
|
|
||||||
make sslh-select && \
|
make sslh-select && \
|
||||||
strip sslh-select
|
strip sslh-select
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
COPY --from=build /sslh/sslh-select /sslh
|
COPY --from=build "/sslh/sslh-select" "/usr/local/bin/sslh"
|
||||||
|
|
||||||
RUN apk --no-cache add libconfig pcre2
|
RUN apk --no-cache add libconfig pcre2
|
||||||
|
|
||||||
ENTRYPOINT [ "/sslh", "--foreground"]
|
ENTRYPOINT [ "/usr/local/bin/sslh", "--foreground" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user