From 23a7c73cc673bf3f925c65c5e2c5cba880051ec7 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 12 Dec 2024 17:16:01 +0100 Subject: [PATCH] Solve issue with alpine and certificates. --- proxy/Dockerfile | 3 ++- test.sh | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 32698d3..1354946 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -34,7 +34,8 @@ RUN apk add openssl \ && openssl req -x509 -nodes -days 365 -subj "/C=CA/ST=QC/O=Company, Inc./CN=raw.githubusercontent.com" \ -addext "subjectAltName=DNS:raw.githubusercontent.com" -newkey rsa:2048 \ -keyout /etc/ssl/private/nginx-selfsigned.key \ - -out /etc/ssl/certs/nginx-selfsigned.crt + -out /etc/ssl/certs/nginx-selfsigned.crt \ + && cat /etc/ssl/certs/nginx-selfsigned.crt >> /etc/ssl/certs/ca-certificates.crt USER root diff --git a/test.sh b/test.sh index 715abe9..25aad77 100755 --- a/test.sh +++ b/test.sh @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -xuo pipefail +set -exuo pipefail # Run with Buildkit export DOCKER_BUILDKIT=1 @@ -36,7 +36,7 @@ METACALL_INSTALL_CERTS="${METACALL_INSTALL_CERTS:-certificates_local}" docker build -t metacall/install_nginx -f proxy/Dockerfile . # Stop the container if it is already running -if [ $(docker ps -f "name=metacall_install_nginx" --format '{{.Names}}') = "metacall_install_nginx" ]; then +if [ "$(docker ps -f "name=metacall_install_nginx" --format '{{.Names}}')" = "metacall_install_nginx" ]; then docker stop metacall_install_nginx fi @@ -55,6 +55,9 @@ else METACALL_INSTALL_DNS= fi +# Disable exit on error for printing the test fails +set +e + # Run tests for test in ${TEST_LIST}; do docker build \