mirror of
https://github.com/yrutschle/sslh.git
synced 2026-10-22 18:12:10 +03:00
Enable --transparent mode for docker
This commit is contained in:
1 parent
bb76bc1d31
commit
5635dc5142
3 files changed
+147
-17
No files matched your search
+9
-13
@@ -1,26 +1,22 @@
|
||||
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
|
||||
|
||||
RUN apk add gcc libconfig-dev make musl-dev pcre2-dev perl
|
||||
RUN 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
|
||||
RUN apk --no-cache add libconfig pcre2 iptables ip6tables libcap
|
||||
|
||||
RUN adduser sslh --shell /bin/sh --disabled-password
|
||||
RUN setcap cap_net_bind_service,cap_net_raw+ep /usr/local/bin/sslh
|
||||
|
||||
COPY "./container-entrypoint.sh" "/init"
|
||||
ENTRYPOINT [ "/init" ]
|
||||
|
||||
USER nobody:nogroup
|
||||
# required for updating iptables
|
||||
USER root:root
|
||||
Reference in new issue
Block a user