From 7fd67438afef55d9aa42bba7a9aed7d3dfb1b4fc Mon Sep 17 00:00:00 2001 From: dongdigua Date: Wed, 12 Jul 2023 16:22:35 +0800 Subject: [PATCH] docker: change ssl volume path otherwise ca-certificate will be missing and it can't install package through https --- gmi/docker/genkey.sh | 9 +++++---- gmi/docker/gmid.conf | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gmi/docker/genkey.sh b/gmi/docker/genkey.sh index accf371..453184c 100755 --- a/gmi/docker/genkey.sh +++ b/gmi/docker/genkey.sh @@ -1,12 +1,13 @@ #! /bin/sh -if test -f /etc/ssl/gmid.pem; then +if test -f /ssl/gmid.pem; then echo "OK certificate exists" else echo "generating certificate..." - apk add libressl + mkdir /ssl + apk add --no-cache libressl libressl req -x509 -newkey rsa:4096 -nodes \ - -keyout /etc/ssl/private/gmid.key \ - -out /etc/ssl/gmid.pem \ + -keyout /ssl/private/gmid.key \ + -out /ssl/gmid.pem \ -days 365 -subj "/CN=$GEMINI_HOST" fi diff --git a/gmi/docker/gmid.conf b/gmi/docker/gmid.conf index 8fe9fe3..3302845 100644 --- a/gmi/docker/gmid.conf +++ b/gmi/docker/gmid.conf @@ -1,6 +1,6 @@ server $gem_host { - cert "/etc/ssl/gmid.pem" - key "/etc/ssl/private/gmid.key" + cert "/ssl/gmid.pem" + key "/ssl/private/gmid.key" root "/dongdigua.github.io" cgi "/cgi/*"