mirror of
https://github.com/netbirdio/netbird.git
synced 2026-03-31 06:24:18 -04:00
* implement reverse proxy --------- Co-authored-by: Alisdair MacLeod <git@alisdairmacleod.co.uk> Co-authored-by: mlsmaycon <mlsmaycon@gmail.com> Co-authored-by: Eduard Gert <kontakt@eduardgert.de> Co-authored-by: Viktor Liu <viktor@netbird.io> Co-authored-by: Diego Noguês <diego.sure@gmail.com> Co-authored-by: Diego Noguês <49420+diegocn@users.noreply.github.com> Co-authored-by: Bethuel Mmbaga <bethuelmbaga12@gmail.com> Co-authored-by: Zoltan Papp <zoltan.pmail@gmail.com> Co-authored-by: Ashley Mensah <ashleyamo982@gmail.com>
38 lines
1.1 KiB
Docker
38 lines
1.1 KiB
Docker
FROM golang:1.25-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY client ./client
|
|
COPY dns ./dns
|
|
COPY encryption ./encryption
|
|
COPY flow ./flow
|
|
COPY formatter ./formatter
|
|
COPY monotime ./monotime
|
|
COPY proxy ./proxy
|
|
COPY route ./route
|
|
COPY shared ./shared
|
|
COPY sharedsock ./sharedsock
|
|
COPY upload-server ./upload-server
|
|
COPY util ./util
|
|
COPY version ./version
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o netbird-proxy ./proxy/cmd/proxy
|
|
|
|
RUN echo "netbird:x:1000:1000:netbird:/var/lib/netbird:/sbin/nologin" > /tmp/passwd && \
|
|
echo "netbird:x:1000:netbird" > /tmp/group && \
|
|
mkdir -p /tmp/var/lib/netbird && \
|
|
mkdir -p /tmp/certs
|
|
|
|
FROM gcr.io/distroless/base:debug
|
|
COPY --from=builder /app/netbird-proxy /usr/bin/netbird-proxy
|
|
COPY --from=builder /tmp/passwd /etc/passwd
|
|
COPY --from=builder /tmp/group /etc/group
|
|
COPY --from=builder /tmp/var/lib/netbird /var/lib/netbird
|
|
COPY --from=builder --chown=1000:1000 --chmod=755 /tmp/certs /certs
|
|
USER netbird:netbird
|
|
ENV HOME=/var/lib/netbird
|
|
ENV NB_PROXY_ADDRESS=":8443"
|
|
EXPOSE 8443
|
|
ENTRYPOINT ["/usr/bin/netbird-proxy"]
|