From 2a557f2a61e24a3e311a60feff47eb7ddfdb3649 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 4 Sep 2023 15:46:25 +1200 Subject: [PATCH] Added ZeroTier --- Dockerfile | 6 +++++- init-container | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 init-container diff --git a/Dockerfile b/Dockerfile index 84dda51..32916f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,11 @@ FROM registry.dege.au/leenooks/php:8.1-fpm-alpine-pgsql-server -VOLUME [ "/var/cache/composer" ] +VOLUME [ "/var/cache/composer", "/var/lib/zerotier-one" ] +# Add Zerotier +RUN apk add zerotier-one -X http://dl-cdn.alpinelinux.org/alpine/v3.17/community --no-cache + +COPY init-container /sbin/ COPY . /var/www/html/ RUN mkdir -p ${COMPOSER_HOME} && \ diff --git a/init-container b/init-container new file mode 100755 index 0000000..d665974 --- /dev/null +++ b/init-container @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -n "${ZEROTIER_START}" -a -e /usr/sbin/zerotier-one ]; then + echo "* Starting ZeroTier" + /usr/sbin/zerotier-one -d +fi