mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-05-25 22:53:44 +02:00
20 lines
799 B
Docker
20 lines
799 B
Docker
# Dockerfile for ZeroTier Central Controllers
|
|
FROM registry.zerotier.com/zerotier/ctlbuild:2025-05-13-01 AS builder
|
|
ADD . /ZeroTierOne
|
|
RUN export PATH=$PATH:~/.cargo/bin && cd ZeroTierOne && make clean && make central-controller -j8
|
|
|
|
FROM golang:bookworm AS go_base
|
|
RUN go install github.com/golang-migrate/migrate/v4/cmd/migrate@latest
|
|
|
|
FROM registry.zerotier.com/zerotier/ctlrun:2025-05-13-01
|
|
COPY --from=builder /ZeroTierOne/zerotier-one /usr/local/bin/zerotier-one
|
|
COPY --from=go_base /go/bin/migrate /usr/local/bin/migrate
|
|
COPY ext/central-controller-docker/migrations /migrations
|
|
|
|
RUN chmod a+x /usr/local/bin/zerotier-one
|
|
RUN echo "/usr/local/lib64" > /etc/ld.so.conf.d/usr-local-lib64.conf && ldconfig
|
|
|
|
ADD ext/central-controller-docker/main.sh /
|
|
RUN chmod a+x /main.sh
|
|
|
|
ENTRYPOINT /main.sh
|