From f58a0944b12737277224589a64ba35641872f6f0 Mon Sep 17 00:00:00 2001 From: George Adams Date: Mon, 30 Oct 2023 14:06:18 +0000 Subject: [PATCH] entrypoint comment --- .test/config.sh | 1 + .../dotted-environment-variables/expected-std-out.txt | 1 + .test/tests/dotted-environment-variables/run.sh | 8 ++++++++ 11/jdk/alpine/entrypoint.sh | 5 +++-- 11/jre/alpine/entrypoint.sh | 5 +++-- 17/jdk/alpine/entrypoint.sh | 5 +++-- 17/jre/alpine/entrypoint.sh | 5 +++-- 21/jdk/alpine/entrypoint.sh | 5 +++-- 21/jre/alpine/entrypoint.sh | 5 +++-- 8/jdk/alpine/entrypoint.sh | 5 +++-- 8/jre/alpine/entrypoint.sh | 5 +++-- docker_templates/scripts/entrypoint.alpine-linux.sh | 5 +++-- 12 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 .test/tests/dotted-environment-variables/expected-std-out.txt create mode 100644 .test/tests/dotted-environment-variables/run.sh diff --git a/.test/config.sh b/.test/config.sh index 274c626ef..741795c8a 100644 --- a/.test/config.sh +++ b/.test/config.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash imageTests[openjdk]+=' + dotted-environment-variables java-ca-certificates-update ' diff --git a/.test/tests/dotted-environment-variables/expected-std-out.txt b/.test/tests/dotted-environment-variables/expected-std-out.txt new file mode 100644 index 000000000..8dc3bdb62 --- /dev/null +++ b/.test/tests/dotted-environment-variables/expected-std-out.txt @@ -0,0 +1 @@ +variable.with.a.dot=value.foo diff --git a/.test/tests/dotted-environment-variables/run.sh b/.test/tests/dotted-environment-variables/run.sh new file mode 100644 index 000000000..d7478c36d --- /dev/null +++ b/.test/tests/dotted-environment-variables/run.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -o pipefail + +CMD1=(env | grep variable.with.a.dot ) + +# Test run 1: Expect dotted environment variables to be set correctly +docker run --rm -e "variable.with.a.dot=value.foo" "$1" $CMD1 diff --git a/11/jdk/alpine/entrypoint.sh b/11/jdk/alpine/entrypoint.sh index 0b9e36a0c..3fa15c17a 100755 --- a/11/jdk/alpine/entrypoint.sh +++ b/11/jdk/alpine/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Converted to shell to avoid the need for bash in the image set -e @@ -20,7 +20,8 @@ if [ -n "$USE_SYSTEM_CA_CERTS" ]; then CACERT="$JAVA_HOME/jre/lib/security/cacerts" fi - # Update CA certificates and extract the trust store + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. update-ca-certificates trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" diff --git a/11/jre/alpine/entrypoint.sh b/11/jre/alpine/entrypoint.sh index 0b9e36a0c..3fa15c17a 100755 --- a/11/jre/alpine/entrypoint.sh +++ b/11/jre/alpine/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Converted to shell to avoid the need for bash in the image set -e @@ -20,7 +20,8 @@ if [ -n "$USE_SYSTEM_CA_CERTS" ]; then CACERT="$JAVA_HOME/jre/lib/security/cacerts" fi - # Update CA certificates and extract the trust store + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. update-ca-certificates trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" diff --git a/17/jdk/alpine/entrypoint.sh b/17/jdk/alpine/entrypoint.sh index 0b9e36a0c..3fa15c17a 100755 --- a/17/jdk/alpine/entrypoint.sh +++ b/17/jdk/alpine/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Converted to shell to avoid the need for bash in the image set -e @@ -20,7 +20,8 @@ if [ -n "$USE_SYSTEM_CA_CERTS" ]; then CACERT="$JAVA_HOME/jre/lib/security/cacerts" fi - # Update CA certificates and extract the trust store + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. update-ca-certificates trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" diff --git a/17/jre/alpine/entrypoint.sh b/17/jre/alpine/entrypoint.sh index 0b9e36a0c..3fa15c17a 100755 --- a/17/jre/alpine/entrypoint.sh +++ b/17/jre/alpine/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Converted to shell to avoid the need for bash in the image set -e @@ -20,7 +20,8 @@ if [ -n "$USE_SYSTEM_CA_CERTS" ]; then CACERT="$JAVA_HOME/jre/lib/security/cacerts" fi - # Update CA certificates and extract the trust store + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. update-ca-certificates trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" diff --git a/21/jdk/alpine/entrypoint.sh b/21/jdk/alpine/entrypoint.sh index 0b9e36a0c..3fa15c17a 100755 --- a/21/jdk/alpine/entrypoint.sh +++ b/21/jdk/alpine/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Converted to shell to avoid the need for bash in the image set -e @@ -20,7 +20,8 @@ if [ -n "$USE_SYSTEM_CA_CERTS" ]; then CACERT="$JAVA_HOME/jre/lib/security/cacerts" fi - # Update CA certificates and extract the trust store + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. update-ca-certificates trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" diff --git a/21/jre/alpine/entrypoint.sh b/21/jre/alpine/entrypoint.sh index 0b9e36a0c..3fa15c17a 100755 --- a/21/jre/alpine/entrypoint.sh +++ b/21/jre/alpine/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Converted to shell to avoid the need for bash in the image set -e @@ -20,7 +20,8 @@ if [ -n "$USE_SYSTEM_CA_CERTS" ]; then CACERT="$JAVA_HOME/jre/lib/security/cacerts" fi - # Update CA certificates and extract the trust store + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. update-ca-certificates trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" diff --git a/8/jdk/alpine/entrypoint.sh b/8/jdk/alpine/entrypoint.sh index 0b9e36a0c..3fa15c17a 100755 --- a/8/jdk/alpine/entrypoint.sh +++ b/8/jdk/alpine/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Converted to shell to avoid the need for bash in the image set -e @@ -20,7 +20,8 @@ if [ -n "$USE_SYSTEM_CA_CERTS" ]; then CACERT="$JAVA_HOME/jre/lib/security/cacerts" fi - # Update CA certificates and extract the trust store + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. update-ca-certificates trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" diff --git a/8/jre/alpine/entrypoint.sh b/8/jre/alpine/entrypoint.sh index 0b9e36a0c..3fa15c17a 100755 --- a/8/jre/alpine/entrypoint.sh +++ b/8/jre/alpine/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Converted to shell to avoid the need for bash in the image set -e @@ -20,7 +20,8 @@ if [ -n "$USE_SYSTEM_CA_CERTS" ]; then CACERT="$JAVA_HOME/jre/lib/security/cacerts" fi - # Update CA certificates and extract the trust store + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. update-ca-certificates trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" diff --git a/docker_templates/scripts/entrypoint.alpine-linux.sh b/docker_templates/scripts/entrypoint.alpine-linux.sh index 0b9e36a0c..3fa15c17a 100755 --- a/docker_templates/scripts/entrypoint.alpine-linux.sh +++ b/docker_templates/scripts/entrypoint.alpine-linux.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Converted to shell to avoid the need for bash in the image set -e @@ -20,7 +20,8 @@ if [ -n "$USE_SYSTEM_CA_CERTS" ]; then CACERT="$JAVA_HOME/jre/lib/security/cacerts" fi - # Update CA certificates and extract the trust store + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. update-ca-certificates trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT"