mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-12 15:17:14 +03:00
A container is best served with the least amount of privileges. This also ensures we don't have to drop anything later. This does require running the container with elevated capabilities. Note, that if for whatever reason, 'root' access within the container is needed, this can easily be accomplished by running the container with `docker run --user root:root sslh` for example. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
27 lines
412 B
Docker
27 lines
412 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
|
|
|
|
COPY "./container-entrypoint.sh" "/init"
|
|
ENTRYPOINT [ "/init" ]
|
|
|
|
USER nobody:nogroup
|