mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 15:26:40 +00:00
optimizes the NetBird client startup process by avoiding unnecessary login commands when the peer is already authenticated. The changes increase the default login timeout and expand the log message patterns used to detect successful authentication. - Increased default login timeout from 1 to 5 seconds for more reliable authentication detection - Enhanced log pattern matching to detect both registration and ready states - Added extended regex support for more flexible pattern matching
28 lines
925 B
Docker
28 lines
925 B
Docker
# build & run locally with:
|
|
# cd "$(git rev-parse --show-toplevel)"
|
|
# CGO_ENABLED=0 go build -o netbird ./client
|
|
# sudo podman build -t localhost/netbird:latest -f client/Dockerfile --ignorefile .dockerignore-client .
|
|
# sudo podman run --rm -it --cap-add={BPF,NET_ADMIN,NET_RAW} localhost/netbird:latest
|
|
|
|
FROM alpine:3.22.0
|
|
# iproute2: busybox doesn't display ip rules properly
|
|
RUN apk add --no-cache \
|
|
bash \
|
|
ca-certificates \
|
|
ip6tables \
|
|
iproute2 \
|
|
iptables
|
|
|
|
ENV \
|
|
NETBIRD_BIN="/usr/local/bin/netbird" \
|
|
NB_LOG_FILE="console,/var/log/netbird/client.log" \
|
|
NB_DAEMON_ADDR="unix:///var/run/netbird.sock" \
|
|
NB_ENTRYPOINT_SERVICE_TIMEOUT="5" \
|
|
NB_ENTRYPOINT_LOGIN_TIMEOUT="5"
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/netbird-entrypoint.sh" ]
|
|
|
|
ARG NETBIRD_BINARY=netbird
|
|
COPY client/netbird-entrypoint.sh /usr/local/bin/netbird-entrypoint.sh
|
|
COPY "${NETBIRD_BINARY}" /usr/local/bin/netbird
|