Skip to content

Commit

Permalink
Merge pull request #62 from theohbrothers/fix/fix-testing-openvpn-in-…
Browse files Browse the repository at this point in the history
…dockerfile

Fix: Fix testing `openvpn` in Dockerfile
  • Loading branch information
leojonathanoh authored Sep 27, 2023
2 parents 77bae70 + df189f8 commit c0e8fbe
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 26 deletions.
5 changes: 3 additions & 2 deletions generate/templates/Dockerfile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.3.18-alpine-3.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.3.18-alpine-3.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.3.18-alpine-3.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.4.11-alpine-3.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.4.11-alpine-3.11/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.4.12-alpine-3.12/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.4.4-alpine-3.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.4.4-alpine-3.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.4.6-alpine-3.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.4.6-alpine-3.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.5.8-alpine-3.17/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions variants/2.6.5-alpine-3.18/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c0e8fbe

Please sign in to comment.