File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,16 @@ WORKDIR /repo.git
24
24
RUN git init --bare && \
25
25
chown git -R /repo.git
26
26
27
- COPY main.sh /
28
-
29
27
EXPOSE 22
30
28
29
+ COPY main.sh /
31
30
ENTRYPOINT ["/main.sh" ]
32
31
33
- HEALTHCHECK --interval=5m --timeout=5s \
34
- CMD sshpass -p secret ssh git@localhost | grep -q 'fatal: Interactive git shell is not enabled' || exit 1
32
+ # ## Configure local key for healthcheck
33
+
34
+ WORKDIR /root/.ssh
35
+ RUN echo 'localhost ' $(cat /etc/ssh/ssh_host_rsa_key.pub) >> known_hosts
36
+
37
+ COPY check.sh /
38
+ HEALTHCHECK --interval=10s --timeout=3s CMD /check.sh
35
39
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ script -q -c ' sshpass -p secret ssh -t git@localhost | grep "fatal: Interactive git shell is not enabled." || exit 1'
4
+
You can’t perform that action at this time.
0 commit comments