mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-09-07 07:12:52 +02:00
trying to build in a docker container
This commit is contained in:
parent
40f6508717
commit
70d24fc7eb
5 changed files with 41 additions and 4 deletions
|
@ -18,4 +18,3 @@ dependencies:
|
|||
- conda-forge::libhiredis=1.3.0
|
||||
- conda-forge::nlohmann_json=3.12.0
|
||||
- conda-forge::jemalloc=5.3.0
|
||||
- conda-forge::postgresql=17.6
|
14
conda_env_run.yml
Normal file
14
conda_env_run.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
name: central_controller
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- conda-forge::pkg-config
|
||||
- conda-forge::libpqxx=7.10.1
|
||||
- conda-forge::libopentelemetry-cpp=1.21.0
|
||||
- conda-forge::google-cloud-cpp=2.38.0
|
||||
- conda-forge::libgoogle-cloud=2.38.0
|
||||
- conda-forge::inja=3.3.0
|
||||
- conda-forge::libhiredis=1.3.0
|
||||
- conda-forge::nlohmann_json=3.12.0
|
||||
- conda-forge::jemalloc=5.3.0
|
||||
- conda-forge::postgresql=17.6
|
|
@ -22,4 +22,4 @@ RUN echo "/opt/conda/envs/central_controller/lib" > /etc/ld.so.conf.d/conda-cent
|
|||
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", "/main.sh"]
|
||||
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "central_controller", "/bin/bash", "-c", "/main.sh"]
|
||||
|
|
|
@ -2,10 +2,9 @@ FROM continuumio/miniconda3:25.3.1-1
|
|||
|
||||
LABEL maintainer="ZeroTier Inc."
|
||||
|
||||
ADD environment.yml /environment.yml
|
||||
ADD conda_env_build.yml /environment.yml
|
||||
RUN conda env create -f /environment.yml && \
|
||||
conda clean -a -y
|
||||
|
||||
ADD . /ZeroTierOne
|
||||
SHELL ["conda", "run", "--no-capture-output", "-n", "central_controller", "/bin/bash", "-c"]
|
||||
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "central_controller", "/bin/bash"]
|
25
ext/central-controller-docker/Dockerfile.new
Normal file
25
ext/central-controller-docker/Dockerfile.new
Normal file
|
@ -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"]
|
Loading…
Add table
Reference in a new issue