Files

22 lines
958 B
Docker
Raw Permalink Normal View History

2019-08-26 12:19:50 -07:00
# Dockerfile for ZeroTier Central Controllers
2025-07-14 10:17:52 -07:00
FROM registry.zerotier.com/zerotier/ctlbuild:2025-07-14 AS builder
2020-03-03 23:52:53 -08:00
ADD . /ZeroTierOne
RUN export PATH=$PATH:~/.cargo/bin && cd ZeroTierOne && make clean && make central-controller -j8
2019-08-26 12:19:50 -07:00
FROM golang:1.24.1-bookworm AS go_base
RUN GONOSUMDB=* GOFLAGS='-p=1' go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
2025-05-13 13:11:27 -07:00
2025-07-14 10:17:52 -07:00
FROM registry.zerotier.com/zerotier/ctlrun:2025-07-14 AS run_base
COPY --from=builder /ZeroTierOne/zerotier-one /usr/local/bin/zerotier-one
COPY --from=builder /ZeroTierOne/ext/opentelemetry-cpp-1.21.0/localinstall/lib/*.so /usr/local/lib64/
2025-05-13 13:11:27 -07:00
COPY --from=go_base /go/bin/migrate /usr/local/bin/migrate
COPY ext/central-controller-docker/migrations /migrations
2019-08-26 12:19:50 -07:00
RUN chmod a+x /usr/local/bin/zerotier-one
2021-06-04 08:31:34 -07:00
RUN echo "/usr/local/lib64" > /etc/ld.so.conf.d/usr-local-lib64.conf && ldconfig
2019-08-26 12:19:50 -07:00
ADD ext/central-controller-docker/main.sh /
2019-08-26 12:19:50 -07:00
RUN chmod a+x /main.sh
ENTRYPOINT /main.sh