Dockerfile 816 B

1234567891011121314151617181920
  1. # Dockerfile for ZeroTier Central Controllers
  2. FROM registry.zerotier.com/zerotier/ctlbuild:2025-05-13-01 AS builder
  3. ADD . /ZeroTierOne
  4. RUN export PATH=$PATH:~/.cargo/bin && cd ZeroTierOne && make clean && make central-controller -j8
  5. FROM golang:bookworm AS go_base
  6. RUN go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
  7. FROM registry.zerotier.com/zerotier/ctlrun:2025-05-13-01
  8. COPY --from=builder /ZeroTierOne/zerotier-one /usr/local/bin/zerotier-one
  9. COPY --from=go_base /go/bin/migrate /usr/local/bin/migrate
  10. COPY ext/central-controller-docker/migrations /migrations
  11. RUN chmod a+x /usr/local/bin/zerotier-one
  12. RUN echo "/usr/local/lib64" > /etc/ld.so.conf.d/usr-local-lib64.conf && ldconfig
  13. ADD ext/central-controller-docker/main.sh /
  14. RUN chmod a+x /main.sh
  15. ENTRYPOINT /main.sh