|
@@ -0,0 +1,25 @@
|
|
|
+FROM us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/controller_conda_builder:latest AS controller_conda_builder
|
|
|
+ADD . /ZeroTierOne
|
|
|
+WORKDIR /ZeroTierOne
|
|
|
+SHELL ["conda", "run", "--no-capture-output", "-n", "central_controller", "/bin/bash", "-c"]
|
|
|
+RUN cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DZT1_CENTRAL_CONTROLLER=1 && cmake --build build/ --target all -j4 --verbose
|
|
|
+
|
|
|
+FROM golang:bookworm AS go_base
|
|
|
+RUN go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
|
|
|
+
|
|
|
+FROM continuumio/miniconda3:25.3.1-1
|
|
|
+LABEL maintainer="ZeroTier Inc."
|
|
|
+ADD conda_env_run.yml /environment.yml
|
|
|
+RUN conda env create -f /environment.yml && \
|
|
|
+ conda clean -a -y
|
|
|
+SHELL ["conda", "run", "--no-capture-output", "-n", "central_controller", "/bin/bash", "-c"]
|
|
|
+COPY --from=go_base /go/bin/migrate /usr/local/bin/migrate
|
|
|
+COPY --from=controller_conda_builder /ZeroTierOne/build/zerotier-one /usr/local/bin/zerotier-one
|
|
|
+COPY ext/central-controller-docker/migrations /migrations
|
|
|
+RUN chmod a+x /usr/local/bin/zerotier-one
|
|
|
+# RUN echo "/opt/conda/envs/central_controller/lib" > /etc/ld.so.conf.d/conda-central-controller.conf && \
|
|
|
+# echo "/opt/conda/envs/central_controller/`uname -m`-conda-linux-gnu/lib" > /etc/ld.so.conf.d/conda-central-controller-x64.conf && \
|
|
|
+# ldconfig
|
|
|
+ADD ext/central-controller-docker/main-new.sh /main.sh
|
|
|
+RUN chmod a+x /main.sh
|
|
|
+ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "central_controller", "/bin/bash", "-c", "/main.sh"]
|