File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM alpine:3.10
2+
3+ COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
4+
5+ RUN set -ex ;\
6+ sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories ;\
7+ apk add --update bash git inotify-tools openssh ;\
8+ git clone https://github.com/gitwatch/gitwatch.git ;\
9+ install -b gitwatch/gitwatch.sh /usr/local/bin/gitwatch ;\
10+ mkdir ~/.ssh ;\
11+ echo 'Host *' > ~/.ssh/config ;\
12+ echo ' StrictHostKeyChecking no' >> ~/.ssh/config ;\
13+ chmod 700 ~/.ssh ;\
14+ chmod +x /usr/local/bin/docker-entrypoint.sh ;\
15+ rm -rf /var/cache/apk/* ;\
16+ rm -rf gitwatch
17+
18+ ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [ -n " ${SSH_PRIVATE_KEY} " ]
4+ then
5+ echo " ${SSH_PRIVATE_KEY} " > ~ /.ssh/id_rsa
6+ chmod 400 ~ /.ssh/id_rsa
7+ fi
8+
9+ if [ -n " ${EMAIL} " ]
10+ then
11+ git config --global user.email " ${EMAIL} "
12+ fi
13+ if [ -n " ${NAME} " ]
14+ then
15+ git config --global user.name " ${NAME} "
16+ fi
17+
18+ if [ " ${1: 0: 1} " = ' -' ]
19+ then
20+ set -- gitwatch " $@ "
21+ fi
22+
23+ exec " $@ "
24+ # EOF
You can’t perform that action at this time.
0 commit comments