Skip to content

Commit

Permalink
Solve issue with alpine and certificates.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Dec 12, 2024
1 parent fab9fce commit 23a7c73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion proxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 5 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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 \
Expand Down

0 comments on commit 23a7c73

Please sign in to comment.