From 8ff27e931f3717044c60f60ac5e198bb0b4301b1 Mon Sep 17 00:00:00 2001 From: clement Date: Sat, 22 Jul 2023 06:46:00 +0800 Subject: [PATCH] Change ordering for better layer caching --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f546335..cb236af4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,19 @@ FROM alpine:latest as build WORKDIR /sslh -COPY . /sslh RUN apk add gcc libconfig-dev make musl-dev pcre2-dev perl + +COPY . /sslh 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 iptables ip6tables libcap RUN adduser sslh --shell /bin/sh --disabled-password + +COPY --from=build "/sslh/sslh-select" "/usr/local/bin/sslh" RUN setcap cap_net_bind_service,cap_net_raw+ep /usr/local/bin/sslh COPY "./container-entrypoint.sh" "/init"