diff --git a/generate/templates/Dockerfile.ps1 b/generate/templates/Dockerfile.ps1 index 5f9e0a8..8561a25 100644 --- a/generate/templates/Dockerfile.ps1 +++ b/generate/templates/Dockerfile.ps1 @@ -2,8 +2,9 @@ FROM $( $VARIANT['_metadata']['distro'] ):$( $VARIANT['_metadata']['distro_version'] ) RUN set -eux; \ - apk add --no-cache $( $VARIANT['_metadata']['package'] )$( if ([version]$VARIANT['_metadata']['distro_version'] -le [version]'3.6') { '>=' } else { '~=' } )$( $VARIANT['_metadata']['package_version'] ) iptables \ - openvpn --version + apk add --no-cache $( $VARIANT['_metadata']['package'] )$( if ([version]$VARIANT['_metadata']['distro_version'] -le [version]'3.6') { '>=' } else { '~=' } )$( $VARIANT['_metadata']['package_version'] ) iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 $( $VARIANT['_metadata']['package_version'] ) COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.3.18-alpine-3.3/Dockerfile b/variants/2.3.18-alpine-3.3/Dockerfile index 5ac2f5a..4a7b5fc 100644 --- a/variants/2.3.18-alpine-3.3/Dockerfile +++ b/variants/2.3.18-alpine-3.3/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.3 RUN set -eux; \ - apk add --no-cache openvpn>=2.3.18 iptables \ - openvpn --version + apk add --no-cache openvpn>=2.3.18 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.3.18 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.3.18-alpine-3.4/Dockerfile b/variants/2.3.18-alpine-3.4/Dockerfile index 53c60b0..fa74c37 100644 --- a/variants/2.3.18-alpine-3.4/Dockerfile +++ b/variants/2.3.18-alpine-3.4/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.4 RUN set -eux; \ - apk add --no-cache openvpn>=2.3.18 iptables \ - openvpn --version + apk add --no-cache openvpn>=2.3.18 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.3.18 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.3.18-alpine-3.5/Dockerfile b/variants/2.3.18-alpine-3.5/Dockerfile index 4490abb..ba762e3 100644 --- a/variants/2.3.18-alpine-3.5/Dockerfile +++ b/variants/2.3.18-alpine-3.5/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.5 RUN set -eux; \ - apk add --no-cache openvpn>=2.3.18 iptables \ - openvpn --version + apk add --no-cache openvpn>=2.3.18 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.3.18 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.4.11-alpine-3.10/Dockerfile b/variants/2.4.11-alpine-3.10/Dockerfile index da51498..7b88ec0 100644 --- a/variants/2.4.11-alpine-3.10/Dockerfile +++ b/variants/2.4.11-alpine-3.10/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.10 RUN set -eux; \ - apk add --no-cache openvpn~=2.4.11 iptables \ - openvpn --version + apk add --no-cache openvpn~=2.4.11 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.4.11 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.4.11-alpine-3.11/Dockerfile b/variants/2.4.11-alpine-3.11/Dockerfile index 73018ea..fcba3ec 100644 --- a/variants/2.4.11-alpine-3.11/Dockerfile +++ b/variants/2.4.11-alpine-3.11/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.11 RUN set -eux; \ - apk add --no-cache openvpn~=2.4.11 iptables \ - openvpn --version + apk add --no-cache openvpn~=2.4.11 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.4.11 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.4.12-alpine-3.12/Dockerfile b/variants/2.4.12-alpine-3.12/Dockerfile index 6ff43ac..bcc11f2 100644 --- a/variants/2.4.12-alpine-3.12/Dockerfile +++ b/variants/2.4.12-alpine-3.12/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.12 RUN set -eux; \ - apk add --no-cache openvpn~=2.4.12 iptables \ - openvpn --version + apk add --no-cache openvpn~=2.4.12 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.4.12 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.4.4-alpine-3.6/Dockerfile b/variants/2.4.4-alpine-3.6/Dockerfile index 1b296b4..7e584de 100644 --- a/variants/2.4.4-alpine-3.6/Dockerfile +++ b/variants/2.4.4-alpine-3.6/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.6 RUN set -eux; \ - apk add --no-cache openvpn>=2.4.4 iptables \ - openvpn --version + apk add --no-cache openvpn>=2.4.4 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.4.4 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.4.4-alpine-3.7/Dockerfile b/variants/2.4.4-alpine-3.7/Dockerfile index 5a96c3b..87ec257 100644 --- a/variants/2.4.4-alpine-3.7/Dockerfile +++ b/variants/2.4.4-alpine-3.7/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.7 RUN set -eux; \ - apk add --no-cache openvpn~=2.4.4 iptables \ - openvpn --version + apk add --no-cache openvpn~=2.4.4 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.4.4 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.4.6-alpine-3.8/Dockerfile b/variants/2.4.6-alpine-3.8/Dockerfile index a3f4fc3..5d4e5b2 100644 --- a/variants/2.4.6-alpine-3.8/Dockerfile +++ b/variants/2.4.6-alpine-3.8/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.8 RUN set -eux; \ - apk add --no-cache openvpn~=2.4.6 iptables \ - openvpn --version + apk add --no-cache openvpn~=2.4.6 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.4.6 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.4.6-alpine-3.9/Dockerfile b/variants/2.4.6-alpine-3.9/Dockerfile index 3a5df40..a3129a6 100644 --- a/variants/2.4.6-alpine-3.9/Dockerfile +++ b/variants/2.4.6-alpine-3.9/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.9 RUN set -eux; \ - apk add --no-cache openvpn~=2.4.6 iptables \ - openvpn --version + apk add --no-cache openvpn~=2.4.6 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.4.6 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.5.8-alpine-3.17/Dockerfile b/variants/2.5.8-alpine-3.17/Dockerfile index e607edf..9fecfbb 100644 --- a/variants/2.5.8-alpine-3.17/Dockerfile +++ b/variants/2.5.8-alpine-3.17/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.17 RUN set -eux; \ - apk add --no-cache openvpn~=2.5.8 iptables \ - openvpn --version + apk add --no-cache openvpn~=2.5.8 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.5.8 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh diff --git a/variants/2.6.5-alpine-3.18/Dockerfile b/variants/2.6.5-alpine-3.18/Dockerfile index 1565159..00021ca 100644 --- a/variants/2.6.5-alpine-3.18/Dockerfile +++ b/variants/2.6.5-alpine-3.18/Dockerfile @@ -1,8 +1,9 @@ FROM alpine:3.18 RUN set -eux; \ - apk add --no-cache openvpn~=2.6.5 iptables \ - openvpn --version + apk add --no-cache openvpn~=2.6.5 iptables; \ + # Workaround openvpn --version exiting with non-zero exit code on openvpn <= 2.4.x + openvpn --version | grep -A100 -B100 2.6.5 COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh