* stop ignoring .git folder for docker builds * docker: remove .git folder after compilation * docker: include .git folder more precise
@@ -1,9 +1,15 @@
docker
!docker/testdata
-!docker/alpine/alpine-py38-ctypes.patch
-!docker/alpine/alpine-py38-gisinit.patch
-.git
.gitignore
.github
.travis
.travis.yml
+
+# The following git files are needed by GRASS GIS to extract the revision
+# during compilation. If you are not using one of the Dockerimages from this
+# repository, delete the .git folder in your Dockerfile after compilation.
+.git
+!.git/HEAD
+!.git/refs/heads
+!.git/objects
+.git/objects/*
@@ -222,6 +222,7 @@ RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \
# Reduce the image size
RUN apt-get autoremove -y
RUN apt-get clean -y
+RUN rm -r /src/grass_build/.git
WORKDIR /scripts
@@ -214,6 +214,7 @@ RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \