mirror of
https://github.com/TrustTunnel/TrustTunnel.git
synced 2026-03-25 02:08:30 +00:00
Squashed commit of the following: commit 16a0c416f13fc32db3ae79ba7f0886ba3987f5aa Author: Radmir Sadikov <r.sadikov@adguard.com> Date: Thu Mar 5 12:01:45 2026 +0400 move healthcheck from Dockerfile to docker-compose.yml commit54aeb8d824Author: Radmir Sadikov <r.sadikov@adguard.com> Date: Wed Mar 4 15:50:26 2026 +0400 add port parameter for healthcheck commit0e375b9628Author: Radmir Sadikov <r.sadikov@adguard.com> Date: Tue Mar 3 17:47:27 2026 +0400 feat vpn-libs-endpoint: improve docker support for trusttunnel
43 lines
1.4 KiB
Docker
43 lines
1.4 KiB
Docker
# syntax=docker/dockerfile:1
|
|
FROM python:3.13-slim-bullseye AS build
|
|
ARG ENDPOINT_DIR_NAME="TrustTunnel"
|
|
ARG RUST_DEFAULT_VERSION="1.85"
|
|
WORKDIR /home
|
|
# Install needed packets
|
|
RUN apt update && \
|
|
apt install -y build-essential cmake curl make git libclang-dev
|
|
# Install Rust and Cargo
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain $RUST_DEFAULT_VERSION -y
|
|
ENV PATH="/root/.cargo/bin:$PATH"
|
|
# Copy source files
|
|
WORKDIR $ENDPOINT_DIR_NAME
|
|
COPY deeplink/ ./deeplink
|
|
COPY endpoint/ ./endpoint
|
|
COPY lib/ ./lib
|
|
COPY macros/ ./macros
|
|
COPY tools/ ./tools
|
|
COPY Cargo.toml Cargo.lock rust-toolchain.toml Makefile ./
|
|
# Build
|
|
RUN make endpoint/build
|
|
RUN make endpoint/build-wizard
|
|
|
|
# Copy binaries
|
|
FROM debian:bookworm-slim AS trusttunnel-endpoint
|
|
ARG ENDPOINT_DIR_NAME="TrustTunnel"
|
|
ARG LOG_LEVEL="info"
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates iproute2 && rm -rf /var/lib/apt/lists/*
|
|
COPY --from=build /home/$ENDPOINT_DIR_NAME/target/release/setup_wizard /bin/
|
|
COPY --from=build /home/$ENDPOINT_DIR_NAME/target/release/trusttunnel_endpoint /bin/
|
|
COPY --chmod=755 /docker-entrypoint.sh /scripts/
|
|
WORKDIR /trusttunnel_endpoint
|
|
|
|
# Persist endpoint state/configuration under this directory:
|
|
# - vpn.toml
|
|
# - hosts.toml
|
|
# - credentials.toml
|
|
# - rules.toml
|
|
# - certs/
|
|
VOLUME /trusttunnel_endpoint/
|
|
ENTRYPOINT ["/scripts/docker-entrypoint.sh"]
|
|
|