diff --git a/Docker/Containerfile b/Docker/Containerfile index e88a5bb..70f8a19 100644 --- a/Docker/Containerfile +++ b/Docker/Containerfile @@ -13,7 +13,8 @@ RUN apk add --no-cache \ # Create wireguard config directory (config is mounted at runtime) RUN mkdir -p /etc/wireguard -# Copy entrypoint +# Copy version file and entrypoint +COPY VERSION /etc/wireguard/VERSION COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/Docker/VERSION b/Docker/VERSION index b82608c..795460f 100644 --- a/Docker/VERSION +++ b/Docker/VERSION @@ -1 +1 @@ -v0.1.0 +v1.1.0 diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh index e707898..f8f12ae 100644 --- a/Docker/entrypoint.sh +++ b/Docker/entrypoint.sh @@ -1,6 +1,14 @@ #!/bin/bash set -e +VERSION_FILE="/etc/wireguard/VERSION" +if [ -f "$VERSION_FILE" ]; then + VERSION=$(cat "$VERSION_FILE") +else + VERSION="unknown" +fi +echo "[init] VPN Container Entrypoint ${VERSION}" + INTERFACE="wg0" MOUNT_CONFIG="/etc/wireguard/${INTERFACE}.conf" CONFIG_DIR="/run/wireguard"