Browse Source

remove .git folder

Fabian Peter Hammerle 3 years ago
parent
commit
cb37b45b92
1 changed files with 6 additions and 4 deletions
  1. 6 4
      Dockerfile

+ 6 - 4
Dockerfile

@@ -3,13 +3,15 @@ RUN apk add --no-cache git
 USER nobody
 # 0.2.200
 ARG MONITOR_VERSION=1deec402b9b6323a964381819b199300259bb584
-RUN git clone https://github.com/andrewjfreyer/monitor /tmp/monitor \
-    && git -C /tmp/monitor checkout $MONITOR_VERSION
+RUN git clone https://github.com/andrewjfreyer/monitor /tmp/monitor
+WORKDIR /tmp/monitor
+RUN git checkout $MONITOR_VERSION \
+    && rm -r .git .gitignore
 # workaround for broken multi-stage copy
 # > failed to copy files: failed to copy directory: Error processing tar file(exit status 1): Container ID ... cannot be mapped to a host ID
 USER 0
-RUN chown -R 0:0 /tmp/monitor \
-    && chmod a+rX -R -c /tmp/monitor
+RUN chown -R 0:0 . \
+    && chmod a+rX -R -c .
 
 FROM alpine:3.11
 RUN apk add --no-cache \