fix: add entrypoint.sh

This commit is contained in:
Georg K 2022-03-03 23:01:25 +03:00
parent 513e50f7f5
commit 9de64c0d8d
3 changed files with 9 additions and 1 deletions

View File

@ -12,4 +12,7 @@ ENV GONOSUMDB=gitlab.connectone.pro/*
WORKDIR /opt/app
RUN apk add --no-cache tzdata ca-certificates git openssh
COPY --from=build /build/gomodproxy ./
ADD entrypoint.sh .
RUN chmod a+x *.sh
ENTRYPOINT ["/opt/app/entrypoint.sh"]
CMD ["/opt/app/gomodproxy", "--addr", ":8080"]

View File

@ -17,6 +17,9 @@ services:
target: /root/.ssh
bind:
propagation: shared
environment:
GIT_USER: ""
GIT_PASS: ""
command:
- /opt/app/gomodproxy
- --dir
@ -26,4 +29,4 @@ services:
- -git
- gitlab.connectone.pro/:/root/.ssh/id_rsa
- -git
- gitlab.connectone.pro/:goproxy:glpat-_4p1YmfjcMsxdfXnayLm
- gitlab.connectone.pro/:${GIT_USER}:${GIT_PASS}

2
entrypoint.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
git config --global url."https://${GIT_USER}:${GIT_PASS}@gitlab.connectone.pro".insteadOf "https://gitlab.connectone.pro"