sslh/Dockerfile
Olliver Schinagl 20764074cb
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>
2023-06-05 22:05:24 +02:00

24 lines
380 B
Docker

FROM alpine:latest as build
WORKDIR /sslh
COPY . /sslh
RUN \
apk add \
gcc \
libconfig-dev \
make \
musl-dev \
pcre2-dev \
perl && \
make sslh-select && \
strip sslh-select
FROM alpine:latest
COPY --from=build "/sslh/sslh-select" "/usr/local/bin/sslh"
RUN apk --no-cache add libconfig pcre2
ENTRYPOINT [ "/usr/local/bin/sslh", "--foreground" ]