whatsapp_proxy (latest)
Published 2026-01-02 22:59:16 +05:00 by RAEman
Installation
docker pull git.raeman.ru/raeman/whatsapp_proxy:latestsha256:3161e6f03276e8122fa0815f953cb512dba56c0bec38f758714c8bea97f6bf9eImage layers
| ADD alpine-minirootfs-3.23.2-x86_64.tar.gz / # buildkit |
| CMD ["/bin/sh"] |
| RUN /bin/sh -c set -eux; apk add --no-cache ca-certificates socat ; # buildkit |
| RUN /bin/sh -c set -eux; addgroup --gid 99 --system haproxy; adduser --disabled-password --home /var/lib/haproxy --ingroup haproxy --no-create-home --system --uid 99 haproxy ; mkdir /var/lib/haproxy; chown haproxy:haproxy /var/lib/haproxy # buildkit |
| ENV HAPROXY_VERSION=3.2.10 |
| ENV HAPROXY_URL=https://www.haproxy.org/download/3.2/src/haproxy-3.2.10.tar.gz |
| ENV HAPROXY_SHA256=df9412eee0faf78147cd3f1bbec9582ea678c33535b1afec081036c5bbb8015b |
| RUN /bin/sh -c set -eux; apk add --no-cache --virtual .build-deps gcc libc-dev linux-headers lua5.4-dev make openssl openssl-dev pcre2-dev readline-dev tar ; wget -O haproxy.tar.gz "$HAPROXY_URL"; echo "$HAPROXY_SHA256 *haproxy.tar.gz" | sha256sum -c; mkdir -p /usr/src/haproxy; tar -xzf haproxy.tar.gz -C /usr/src/haproxy --strip-components=1; rm haproxy.tar.gz; makeOpts=' TARGET=linux-musl USE_GETADDRINFO=1 USE_LUA=1 LUA_INC=/usr/include/lua5.4 LUA_LIB=/usr/lib/lua5.4 USE_OPENSSL=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_PROMEX=1 '; nproc="$(getconf _NPROCESSORS_ONLN)"; eval "make -C /usr/src/haproxy -j '$nproc' all $makeOpts"; eval "make -C /usr/src/haproxy install-bin $makeOpts"; mkdir -p /usr/local/etc/haproxy; cp -R /usr/src/haproxy/examples/errorfiles /usr/local/etc/haproxy/errors; rm -rf /usr/src/haproxy; runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )"; apk add --no-network --virtual .haproxy-rundeps $runDeps; apk del --no-network .build-deps; haproxy -v # buildkit |
| STOPSIGNAL SIGUSR1 |
| COPY docker-entrypoint.sh /usr/local/bin/ # buildkit |
| ENTRYPOINT ["docker-entrypoint.sh"] |
| USER haproxy |
| WORKDIR /var/lib/haproxy |
| CMD ["haproxy" "-f" "/usr/local/etc/haproxy/haproxy.cfg"] |
| USER root |
| RUN /bin/sh -c apk --no-cache add curl openssl jq bash # buildkit |
| ARG SSL_IP |
| ARG SSL_DNS |
| WORKDIR /certs |
| COPY src/generate-certs.sh /usr/local/bin/generate-certs.sh # buildkit |
| RUN |2 SSL_IP= SSL_DNS= /bin/sh -c chmod +x /usr/local/bin/generate-certs.sh && /usr/local/bin/generate-certs.sh && mkdir --parents /etc/haproxy/ssl/ && mv /certs/proxy.whatsapp.net.pem /etc/haproxy/ssl/proxy.whatsapp.net.pem && chown -R haproxy:haproxy /etc/haproxy/ # buildkit |
| WORKDIR / |
| COPY --chown=haproxy:haproxy src/set_public_ip_and_start.sh /usr/local/bin/set_public_ip_and_start.sh # buildkit |
| RUN |2 SSL_IP= SSL_DNS= /bin/sh -c chmod +x /usr/local/bin/set_public_ip_and_start.sh # buildkit |
| COPY --chown=haproxy:haproxy src/proxy_config.cfg /usr/local/etc/haproxy/haproxy.cfg # buildkit |
| RUN |2 SSL_IP= SSL_DNS= /bin/sh -c chown haproxy:haproxy /usr/local/etc/haproxy # buildkit |
| COPY src/healthcheck.sh /usr/local/bin/healthcheck.sh # buildkit |
| RUN |2 SSL_IP= SSL_DNS= /bin/sh -c chmod +x /usr/local/bin/healthcheck.sh # buildkit |
| HEALTHCHECK &{["CMD-SHELL" "bash /usr/local/bin/healthcheck.sh"] "10s" "0s" "5s" "0s" '\x00'} |
| RUN |2 SSL_IP= SSL_DNS= /bin/sh -c mkdir --parents /home/haproxy/certs && chown haproxy:haproxy /home/haproxy/certs # buildkit |
| RUN |2 SSL_IP= SSL_DNS= /bin/sh -c haproxy -c -V -f /usr/local/etc/haproxy/haproxy.cfg # buildkit |
| USER haproxy |
| EXPOSE &{[{{47 0} {47 0}}] 0xc000642a80} |
| EXPOSE &{[{{48 0} {48 0}}] 0xc000642a80} |
| EXPOSE &{[{{49 0} {49 0}}] 0xc000642a80} |
| EXPOSE &{[{{50 0} {50 0}}] 0xc000642a80} |
| EXPOSE &{[{{51 0} {51 0}}] 0xc000642a80} |
| EXPOSE &{[{{52 0} {52 0}}] 0xc000642a80} |
| EXPOSE &{[{{53 0} {53 0}}] 0xc000642a80} |
| EXPOSE &{[{{54 0} {54 0}}] 0xc000642a80} |
| EXPOSE &{[{{55 0} {55 0}}] 0xc000642a80} |
| CMD ["/bin/sh" "-c" "/usr/local/bin/set_public_ip_and_start.sh"] |