From ba00f93ccbf4e201de4bf661f5bea4379df2a0b6 Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Fri, 30 Jun 2023 13:28:32 +0000 Subject: [PATCH] Enhancement: Enhance `/docker-entrypoint.sh` with `pwsh` flag detection with fallback on binary --- generate/definitions/VARIANTS.ps1 | 8 ++++++++ generate/templates/Dockerfile.ps1 | 8 ++++++++ generate/templates/docker-entrypoint.sh.ps1 | 10 ++++++++++ variants/6.0.2-ubuntu-16.04-git-sops/Dockerfile | 4 ++++ .../6.0.2-ubuntu-16.04-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/6.0.2-ubuntu-16.04/Dockerfile | 4 ++++ variants/6.0.2-ubuntu-16.04/docker-entrypoint.sh | 8 ++++++++ variants/6.1.3-alpine-3.8-git-sops/Dockerfile | 4 ++++ .../6.1.3-alpine-3.8-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/6.1.3-alpine-3.8/Dockerfile | 4 ++++ variants/6.1.3-alpine-3.8/docker-entrypoint.sh | 8 ++++++++ variants/6.1.3-ubuntu-18.04-git-sops/Dockerfile | 4 ++++ .../6.1.3-ubuntu-18.04-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/6.1.3-ubuntu-18.04/Dockerfile | 4 ++++ variants/6.1.3-ubuntu-18.04/docker-entrypoint.sh | 8 ++++++++ variants/6.2.4-alpine-3.8-git-sops/Dockerfile | 4 ++++ .../6.2.4-alpine-3.8-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/6.2.4-alpine-3.8/Dockerfile | 4 ++++ variants/6.2.4-alpine-3.8/docker-entrypoint.sh | 8 ++++++++ variants/6.2.4-ubuntu-18.04-git-sops/Dockerfile | 4 ++++ .../6.2.4-ubuntu-18.04-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/6.2.4-ubuntu-18.04/Dockerfile | 4 ++++ variants/6.2.4-ubuntu-18.04/docker-entrypoint.sh | 8 ++++++++ variants/7.0.3-alpine-3.9-git-sops/Dockerfile | 4 ++++ .../7.0.3-alpine-3.9-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/7.0.3-alpine-3.9/Dockerfile | 4 ++++ variants/7.0.3-alpine-3.9/docker-entrypoint.sh | 8 ++++++++ variants/7.0.3-ubuntu-18.04-git-sops/Dockerfile | 4 ++++ .../7.0.3-ubuntu-18.04-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/7.0.3-ubuntu-18.04/Dockerfile | 4 ++++ variants/7.0.3-ubuntu-18.04/docker-entrypoint.sh | 8 ++++++++ variants/7.1.5-alpine-3.13-git-sops/Dockerfile | 4 ++++ .../7.1.5-alpine-3.13-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/7.1.5-alpine-3.13/Dockerfile | 4 ++++ variants/7.1.5-alpine-3.13/docker-entrypoint.sh | 8 ++++++++ variants/7.1.5-ubuntu-20.04-git-sops/Dockerfile | 4 ++++ .../7.1.5-ubuntu-20.04-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/7.1.5-ubuntu-20.04/Dockerfile | 4 ++++ variants/7.1.5-ubuntu-20.04/docker-entrypoint.sh | 8 ++++++++ variants/7.2.2-alpine-3.14-git-sops/Dockerfile | 4 ++++ .../7.2.2-alpine-3.14-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/7.2.2-alpine-3.14/Dockerfile | 4 ++++ variants/7.2.2-alpine-3.14/docker-entrypoint.sh | 8 ++++++++ variants/7.2.2-ubuntu-20.04-git-sops/Dockerfile | 4 ++++ .../7.2.2-ubuntu-20.04-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/7.2.2-ubuntu-20.04/Dockerfile | 4 ++++ variants/7.2.2-ubuntu-20.04/docker-entrypoint.sh | 8 ++++++++ variants/7.3-alpine-3.17-git-sops/Dockerfile | 4 ++++ variants/7.3-alpine-3.17-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/7.3-alpine-3.17/Dockerfile | 4 ++++ variants/7.3-alpine-3.17/docker-entrypoint.sh | 8 ++++++++ variants/7.3-ubuntu-22.04-git-sops/Dockerfile | 4 ++++ .../7.3-ubuntu-22.04-git-sops/docker-entrypoint.sh | 8 ++++++++ variants/7.3-ubuntu-22.04/Dockerfile | 4 ++++ variants/7.3-ubuntu-22.04/docker-entrypoint.sh | 8 ++++++++ 55 files changed, 338 insertions(+) create mode 100755 generate/templates/docker-entrypoint.sh.ps1 create mode 100644 variants/6.0.2-ubuntu-16.04-git-sops/docker-entrypoint.sh create mode 100644 variants/6.0.2-ubuntu-16.04/docker-entrypoint.sh create mode 100644 variants/6.1.3-alpine-3.8-git-sops/docker-entrypoint.sh create mode 100644 variants/6.1.3-alpine-3.8/docker-entrypoint.sh create mode 100644 variants/6.1.3-ubuntu-18.04-git-sops/docker-entrypoint.sh create mode 100644 variants/6.1.3-ubuntu-18.04/docker-entrypoint.sh create mode 100644 variants/6.2.4-alpine-3.8-git-sops/docker-entrypoint.sh create mode 100644 variants/6.2.4-alpine-3.8/docker-entrypoint.sh create mode 100644 variants/6.2.4-ubuntu-18.04-git-sops/docker-entrypoint.sh create mode 100644 variants/6.2.4-ubuntu-18.04/docker-entrypoint.sh create mode 100644 variants/7.0.3-alpine-3.9-git-sops/docker-entrypoint.sh create mode 100644 variants/7.0.3-alpine-3.9/docker-entrypoint.sh create mode 100644 variants/7.0.3-ubuntu-18.04-git-sops/docker-entrypoint.sh create mode 100644 variants/7.0.3-ubuntu-18.04/docker-entrypoint.sh create mode 100644 variants/7.1.5-alpine-3.13-git-sops/docker-entrypoint.sh create mode 100644 variants/7.1.5-alpine-3.13/docker-entrypoint.sh create mode 100644 variants/7.1.5-ubuntu-20.04-git-sops/docker-entrypoint.sh create mode 100644 variants/7.1.5-ubuntu-20.04/docker-entrypoint.sh create mode 100644 variants/7.2.2-alpine-3.14-git-sops/docker-entrypoint.sh create mode 100644 variants/7.2.2-alpine-3.14/docker-entrypoint.sh create mode 100644 variants/7.2.2-ubuntu-20.04-git-sops/docker-entrypoint.sh create mode 100644 variants/7.2.2-ubuntu-20.04/docker-entrypoint.sh create mode 100644 variants/7.3-alpine-3.17-git-sops/docker-entrypoint.sh create mode 100644 variants/7.3-alpine-3.17/docker-entrypoint.sh create mode 100644 variants/7.3-ubuntu-22.04-git-sops/docker-entrypoint.sh create mode 100644 variants/7.3-ubuntu-22.04/docker-entrypoint.sh diff --git a/generate/definitions/VARIANTS.ps1 b/generate/definitions/VARIANTS.ps1 index d0d19a1..682f541 100644 --- a/generate/definitions/VARIANTS.ps1 +++ b/generate/definitions/VARIANTS.ps1 @@ -62,6 +62,14 @@ $VARIANTS_SHARED = @{ } ) } + 'docker-entrypoint.sh' = @{ + common = $true + passes = @( + @{ + variables = @{} + } + ) + } } } } diff --git a/generate/templates/Dockerfile.ps1 b/generate/templates/Dockerfile.ps1 index 8db13ba..05f7934 100644 --- a/generate/templates/Dockerfile.ps1 +++ b/generate/templates/Dockerfile.ps1 @@ -91,3 +91,11 @@ RUN set -eux; \ throw "Only alpine and ubuntu base image tags supported" } } + +@" +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] + +"@ diff --git a/generate/templates/docker-entrypoint.sh.ps1 b/generate/templates/docker-entrypoint.sh.ps1 new file mode 100755 index 0000000..ffef17e --- /dev/null +++ b/generate/templates/docker-entrypoint.sh.ps1 @@ -0,0 +1,10 @@ +@' +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" +'@ diff --git a/variants/6.0.2-ubuntu-16.04-git-sops/Dockerfile b/variants/6.0.2-ubuntu-16.04-git-sops/Dockerfile index 85e495b..b1fff19 100644 --- a/variants/6.0.2-ubuntu-16.04-git-sops/Dockerfile +++ b/variants/6.0.2-ubuntu-16.04-git-sops/Dockerfile @@ -38,3 +38,7 @@ RUN set -eux; \ apt-get clean; \ rm -rf /var/lib/apt/lists/* +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.0.2-ubuntu-16.04-git-sops/docker-entrypoint.sh b/variants/6.0.2-ubuntu-16.04-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.0.2-ubuntu-16.04-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/6.0.2-ubuntu-16.04/Dockerfile b/variants/6.0.2-ubuntu-16.04/Dockerfile index a85023b..917c8a4 100644 --- a/variants/6.0.2-ubuntu-16.04/Dockerfile +++ b/variants/6.0.2-ubuntu-16.04/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.0.2-ubuntu-16.04/docker-entrypoint.sh b/variants/6.0.2-ubuntu-16.04/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.0.2-ubuntu-16.04/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/6.1.3-alpine-3.8-git-sops/Dockerfile b/variants/6.1.3-alpine-3.8-git-sops/Dockerfile index bb7d1e4..a9e0b68 100644 --- a/variants/6.1.3-alpine-3.8-git-sops/Dockerfile +++ b/variants/6.1.3-alpine-3.8-git-sops/Dockerfile @@ -23,3 +23,7 @@ RUN set -eux; \ RUN apk add --no-cache gnupg +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.1.3-alpine-3.8-git-sops/docker-entrypoint.sh b/variants/6.1.3-alpine-3.8-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.1.3-alpine-3.8-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/6.1.3-alpine-3.8/Dockerfile b/variants/6.1.3-alpine-3.8/Dockerfile index 6f9854d..9c207b4 100644 --- a/variants/6.1.3-alpine-3.8/Dockerfile +++ b/variants/6.1.3-alpine-3.8/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.1.3-alpine-3.8/docker-entrypoint.sh b/variants/6.1.3-alpine-3.8/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.1.3-alpine-3.8/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/6.1.3-ubuntu-18.04-git-sops/Dockerfile b/variants/6.1.3-ubuntu-18.04-git-sops/Dockerfile index 7781065..1ea243d 100644 --- a/variants/6.1.3-ubuntu-18.04-git-sops/Dockerfile +++ b/variants/6.1.3-ubuntu-18.04-git-sops/Dockerfile @@ -38,3 +38,7 @@ RUN set -eux; \ apt-get clean; \ rm -rf /var/lib/apt/lists/* +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.1.3-ubuntu-18.04-git-sops/docker-entrypoint.sh b/variants/6.1.3-ubuntu-18.04-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.1.3-ubuntu-18.04-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/6.1.3-ubuntu-18.04/Dockerfile b/variants/6.1.3-ubuntu-18.04/Dockerfile index 2f42e58..ed964b0 100644 --- a/variants/6.1.3-ubuntu-18.04/Dockerfile +++ b/variants/6.1.3-ubuntu-18.04/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.1.3-ubuntu-18.04/docker-entrypoint.sh b/variants/6.1.3-ubuntu-18.04/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.1.3-ubuntu-18.04/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/6.2.4-alpine-3.8-git-sops/Dockerfile b/variants/6.2.4-alpine-3.8-git-sops/Dockerfile index 32cd8a3..5cdac9f 100644 --- a/variants/6.2.4-alpine-3.8-git-sops/Dockerfile +++ b/variants/6.2.4-alpine-3.8-git-sops/Dockerfile @@ -23,3 +23,7 @@ RUN set -eux; \ RUN apk add --no-cache gnupg +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.2.4-alpine-3.8-git-sops/docker-entrypoint.sh b/variants/6.2.4-alpine-3.8-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.2.4-alpine-3.8-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/6.2.4-alpine-3.8/Dockerfile b/variants/6.2.4-alpine-3.8/Dockerfile index 72be6b1..bdea3a1 100644 --- a/variants/6.2.4-alpine-3.8/Dockerfile +++ b/variants/6.2.4-alpine-3.8/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.2.4-alpine-3.8/docker-entrypoint.sh b/variants/6.2.4-alpine-3.8/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.2.4-alpine-3.8/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/6.2.4-ubuntu-18.04-git-sops/Dockerfile b/variants/6.2.4-ubuntu-18.04-git-sops/Dockerfile index b3c402d..1abecf2 100644 --- a/variants/6.2.4-ubuntu-18.04-git-sops/Dockerfile +++ b/variants/6.2.4-ubuntu-18.04-git-sops/Dockerfile @@ -38,3 +38,7 @@ RUN set -eux; \ apt-get clean; \ rm -rf /var/lib/apt/lists/* +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.2.4-ubuntu-18.04-git-sops/docker-entrypoint.sh b/variants/6.2.4-ubuntu-18.04-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.2.4-ubuntu-18.04-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/6.2.4-ubuntu-18.04/Dockerfile b/variants/6.2.4-ubuntu-18.04/Dockerfile index d62d7a9..918525e 100644 --- a/variants/6.2.4-ubuntu-18.04/Dockerfile +++ b/variants/6.2.4-ubuntu-18.04/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/6.2.4-ubuntu-18.04/docker-entrypoint.sh b/variants/6.2.4-ubuntu-18.04/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/6.2.4-ubuntu-18.04/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.0.3-alpine-3.9-git-sops/Dockerfile b/variants/7.0.3-alpine-3.9-git-sops/Dockerfile index c888573..1d318f1 100644 --- a/variants/7.0.3-alpine-3.9-git-sops/Dockerfile +++ b/variants/7.0.3-alpine-3.9-git-sops/Dockerfile @@ -23,3 +23,7 @@ RUN set -eux; \ RUN apk add --no-cache gnupg +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.0.3-alpine-3.9-git-sops/docker-entrypoint.sh b/variants/7.0.3-alpine-3.9-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.0.3-alpine-3.9-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.0.3-alpine-3.9/Dockerfile b/variants/7.0.3-alpine-3.9/Dockerfile index 8b43893..df4c64c 100644 --- a/variants/7.0.3-alpine-3.9/Dockerfile +++ b/variants/7.0.3-alpine-3.9/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.0.3-alpine-3.9/docker-entrypoint.sh b/variants/7.0.3-alpine-3.9/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.0.3-alpine-3.9/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.0.3-ubuntu-18.04-git-sops/Dockerfile b/variants/7.0.3-ubuntu-18.04-git-sops/Dockerfile index 3195175..b62c93e 100644 --- a/variants/7.0.3-ubuntu-18.04-git-sops/Dockerfile +++ b/variants/7.0.3-ubuntu-18.04-git-sops/Dockerfile @@ -38,3 +38,7 @@ RUN set -eux; \ apt-get clean; \ rm -rf /var/lib/apt/lists/* +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.0.3-ubuntu-18.04-git-sops/docker-entrypoint.sh b/variants/7.0.3-ubuntu-18.04-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.0.3-ubuntu-18.04-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.0.3-ubuntu-18.04/Dockerfile b/variants/7.0.3-ubuntu-18.04/Dockerfile index 7c2b8a2..34cc171 100644 --- a/variants/7.0.3-ubuntu-18.04/Dockerfile +++ b/variants/7.0.3-ubuntu-18.04/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.0.3-ubuntu-18.04/docker-entrypoint.sh b/variants/7.0.3-ubuntu-18.04/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.0.3-ubuntu-18.04/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.1.5-alpine-3.13-git-sops/Dockerfile b/variants/7.1.5-alpine-3.13-git-sops/Dockerfile index 5b7ca34..c200535 100644 --- a/variants/7.1.5-alpine-3.13-git-sops/Dockerfile +++ b/variants/7.1.5-alpine-3.13-git-sops/Dockerfile @@ -23,3 +23,7 @@ RUN set -eux; \ RUN apk add --no-cache gnupg +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.1.5-alpine-3.13-git-sops/docker-entrypoint.sh b/variants/7.1.5-alpine-3.13-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.1.5-alpine-3.13-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.1.5-alpine-3.13/Dockerfile b/variants/7.1.5-alpine-3.13/Dockerfile index 5eb7acd..774bb70 100644 --- a/variants/7.1.5-alpine-3.13/Dockerfile +++ b/variants/7.1.5-alpine-3.13/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.1.5-alpine-3.13/docker-entrypoint.sh b/variants/7.1.5-alpine-3.13/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.1.5-alpine-3.13/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.1.5-ubuntu-20.04-git-sops/Dockerfile b/variants/7.1.5-ubuntu-20.04-git-sops/Dockerfile index 9b53bf4..7457855 100644 --- a/variants/7.1.5-ubuntu-20.04-git-sops/Dockerfile +++ b/variants/7.1.5-ubuntu-20.04-git-sops/Dockerfile @@ -38,3 +38,7 @@ RUN set -eux; \ apt-get clean; \ rm -rf /var/lib/apt/lists/* +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.1.5-ubuntu-20.04-git-sops/docker-entrypoint.sh b/variants/7.1.5-ubuntu-20.04-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.1.5-ubuntu-20.04-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.1.5-ubuntu-20.04/Dockerfile b/variants/7.1.5-ubuntu-20.04/Dockerfile index 0c5a100..f788e5c 100644 --- a/variants/7.1.5-ubuntu-20.04/Dockerfile +++ b/variants/7.1.5-ubuntu-20.04/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.1.5-ubuntu-20.04/docker-entrypoint.sh b/variants/7.1.5-ubuntu-20.04/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.1.5-ubuntu-20.04/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.2.2-alpine-3.14-git-sops/Dockerfile b/variants/7.2.2-alpine-3.14-git-sops/Dockerfile index fb73665..bd62681 100644 --- a/variants/7.2.2-alpine-3.14-git-sops/Dockerfile +++ b/variants/7.2.2-alpine-3.14-git-sops/Dockerfile @@ -23,3 +23,7 @@ RUN set -eux; \ RUN apk add --no-cache gnupg +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.2.2-alpine-3.14-git-sops/docker-entrypoint.sh b/variants/7.2.2-alpine-3.14-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.2.2-alpine-3.14-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.2.2-alpine-3.14/Dockerfile b/variants/7.2.2-alpine-3.14/Dockerfile index 8c16e1c..841b5c3 100644 --- a/variants/7.2.2-alpine-3.14/Dockerfile +++ b/variants/7.2.2-alpine-3.14/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.2.2-alpine-3.14/docker-entrypoint.sh b/variants/7.2.2-alpine-3.14/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.2.2-alpine-3.14/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.2.2-ubuntu-20.04-git-sops/Dockerfile b/variants/7.2.2-ubuntu-20.04-git-sops/Dockerfile index ebe2d17..ce8bc53 100644 --- a/variants/7.2.2-ubuntu-20.04-git-sops/Dockerfile +++ b/variants/7.2.2-ubuntu-20.04-git-sops/Dockerfile @@ -38,3 +38,7 @@ RUN set -eux; \ apt-get clean; \ rm -rf /var/lib/apt/lists/* +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.2.2-ubuntu-20.04-git-sops/docker-entrypoint.sh b/variants/7.2.2-ubuntu-20.04-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.2.2-ubuntu-20.04-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.2.2-ubuntu-20.04/Dockerfile b/variants/7.2.2-ubuntu-20.04/Dockerfile index 5303430..4b925d1 100644 --- a/variants/7.2.2-ubuntu-20.04/Dockerfile +++ b/variants/7.2.2-ubuntu-20.04/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.2.2-ubuntu-20.04/docker-entrypoint.sh b/variants/7.2.2-ubuntu-20.04/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.2.2-ubuntu-20.04/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.3-alpine-3.17-git-sops/Dockerfile b/variants/7.3-alpine-3.17-git-sops/Dockerfile index 0183e23..bb5790c 100644 --- a/variants/7.3-alpine-3.17-git-sops/Dockerfile +++ b/variants/7.3-alpine-3.17-git-sops/Dockerfile @@ -23,3 +23,7 @@ RUN set -eux; \ RUN apk add --no-cache gnupg +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.3-alpine-3.17-git-sops/docker-entrypoint.sh b/variants/7.3-alpine-3.17-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.3-alpine-3.17-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.3-alpine-3.17/Dockerfile b/variants/7.3-alpine-3.17/Dockerfile index 9ac091f..13d7f6f 100644 --- a/variants/7.3-alpine-3.17/Dockerfile +++ b/variants/7.3-alpine-3.17/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.3-alpine-3.17/docker-entrypoint.sh b/variants/7.3-alpine-3.17/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.3-alpine-3.17/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.3-ubuntu-22.04-git-sops/Dockerfile b/variants/7.3-ubuntu-22.04-git-sops/Dockerfile index a4503f5..c93db20 100644 --- a/variants/7.3-ubuntu-22.04-git-sops/Dockerfile +++ b/variants/7.3-ubuntu-22.04-git-sops/Dockerfile @@ -38,3 +38,7 @@ RUN set -eux; \ apt-get clean; \ rm -rf /var/lib/apt/lists/* +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.3-ubuntu-22.04-git-sops/docker-entrypoint.sh b/variants/7.3-ubuntu-22.04-git-sops/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.3-ubuntu-22.04-git-sops/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/variants/7.3-ubuntu-22.04/Dockerfile b/variants/7.3-ubuntu-22.04/Dockerfile index e46913e..53cceac 100644 --- a/variants/7.3-ubuntu-22.04/Dockerfile +++ b/variants/7.3-ubuntu-22.04/Dockerfile @@ -13,3 +13,7 @@ ENV COMPlus_EnableDiagnostics=0 RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh + +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/7.3-ubuntu-22.04/docker-entrypoint.sh b/variants/7.3-ubuntu-22.04/docker-entrypoint.sh new file mode 100644 index 0000000..5b23d6d --- /dev/null +++ b/variants/7.3-ubuntu-22.04/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- pwsh "$@" +fi + +exec "$@" \ No newline at end of file