File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,6 @@ ADD ssh-add-key /usr/bin/ssh-add-key
55
55
RUN useradd -s /bin/bash git
56
56
RUN echo "git ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
57
57
58
- RUN mkdir -p /parse-cloud-code && \
59
- chown -R git:git /parse-cloud-code && \
60
- chown -R git:git /parse/cloud
61
-
62
58
ENV TINI_VERSION v0.9.0
63
59
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
64
60
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc /tini.asc
Original file line number Diff line number Diff line change 4
4
5
5
/etc/init.d/ssh start > /dev/null
6
6
7
- if [ ! -d /parse-cloud-code ]; then
8
- mkdir -p /parse-cloud-code
9
- fi
7
+ mkdir -p /parse-cloud-code
10
8
11
- if [ ! -d /parse/cloud ]; then
12
- mkdir -p /parse/cloud
13
- fi
14
-
15
- pushd /parse-cloud-code > /dev/null
16
- git init --bare > /dev/null
9
+ git init --bare /parse-cloud-code > /dev/null
17
10
18
11
cat << EOF > /parse-cloud-code/hooks/post-receive
19
12
#!/bin/bash
20
13
unset GIT_INDEX_FILE
21
- git --work-tree=/parse/cloud clean -df
22
- git --work-tree=/parse/cloud checkout -f
14
+ git --work-tree=" ${CLOUD_CODE_HOME} " clean -df
15
+ git --work-tree=" ${CLOUD_CODE_HOME} " checkout -f
23
16
EOF
24
17
25
- chown -R git:git /parse-cloud-code > /dev/null
26
- chown -R git:git /parse/cloud > /dev/null
27
18
chmod a+x /parse-cloud-code/hooks/post-receive > /dev/null
28
- popd > /dev/null
19
+
20
+ chown -R git:git /parse-cloud-code > /dev/null
21
+ chown -R git:git " $CLOUD_CODE_HOME " > /dev/null
29
22
30
23
exec " $@ "
You can’t perform that action at this time.
0 commit comments