still not working. TLS error with gogs

This commit is contained in:
admin2
2022-11-16 10:13:27 +03:00
parent 71be7fc6c1
commit bd4ea3488c
2 changed files with 38 additions and 9 deletions
+34 -8
View File
@@ -1,12 +1,38 @@
# syntax=docker/dockerfile:1.2
# staic webserver with zola
# https://github.com/joseluisq/static-web-server
FROM joseluisq/static-web-server:latest
FROM joseluisq/static-web-server:2-alpine
MAINTAINER serinty.net
RUN apk add git
RUN apk add zola --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/
ARG GITCLONEURL=clone https://gogs.serinty.net/Serinty/serinty-website.git
RUN apk upgrade --update-cache --available
RUN apk add --no-cache git openssh-client
RUN apk add --no-cache zola --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/
ARG GITPROJECTNAME=serinty-website
ENV GITPROJECTNAME=${GITPROJECTNAME}
ARG GITPROJECTUSER=Serinty
ENV GITPROJECTUSER=${GITPROJECTUSER}
ARG GITSERVER=gogs.serinty.net
ENV GITSERVER=${GITSERVER}
ARG GITSERVERPORT=22104
ENV GITSERVERPORT=${GITSERVERPORT}
ARG GITUSER=gogs
ENV GITUSER=${GITUSER}
ARG GITPASSWD=gogspw
ENV GITPASSWD=${GITPASSWD}
# ssh forwarding dosen't work, no --secret option is working
#ARG GITCLONEURL=ssh://gogs@${GITSERVER}:${GITSERVERPORT}/${GITPROJECTUSER}/${GITPROJECTNAME}.git
# https://gogs.serinty.net/Serinty/serinty-website.git
#RUN --mount=type=secret,id=gogsserintywebsitepw GITPASSWD=$(cat /run/secrets/gogsserintywebsitepw)\
# && export GITPASSWD
ARG GITCLONEURL=https://${GITUSER}:${GITPASSWD}@${GITSERVER}:${GITSERVERPORT}/${GITPROJECTUSER}/${GITPROJECTNAME}.git
ENV GITCLONEURL=${GITCLONEURL}
RUN git clone ${GITCLONEURL}
RUN cd serinty-website
RUN requirements.sh
RUN zola build --output-dir ./public
RUN git config --global http.sslverify "false"
RUN git clone "${GITCLONEURL}"
#RUN mkdir -p -m 0700 ~/.ssh && touch -m 600 ~/.ssh/known_hosts && ssh-keyscan -H -4 -t rsa -p ${GITSERVERPORT} ${GITSERVER} >> ~/.ssh/known_hosts
#RUN echo "Host *" >> /etc/ssh/ssh_config
#RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
#RUN cat ~/.ssh/known_hosts
#RUN cat /etc/ssh/ssh_config
#RUN --mount=type=ssh ssh-add -L
#RUN --mount=type=ssh git clone -v ${GITCLONEURL}
WORKDIR ./${GITPROJECTNAME}/
RUN zola build --output-dir /public_html
+4 -1
View File
@@ -2,4 +2,7 @@
#ssh-add
# info from https://medium.com/@tonistiigi/build-secrets-and-ssh-forwarding-in-docker-18-09-ae8161d066
export DOCKER_BUILDKIT=1
docker build --progress=plain --ssh default .
# docker secret create gogsserintywebsitepw -
read -p "enter git user:" GITUSER
read -s -p "enter git password:" GITPASSWD
docker build --progress=plain --build-arg GITUSER=${GITUSER} --build-arg GITPASSWD=${GITPASSWD} .