Browse Source

Stop ignoring .git folder for docker builds (#1182)

* stop ignoring .git folder for docker builds
* docker: remove .git folder after compilation
* docker: include .git folder more precise
mmacata 3 years ago
parent
commit
2efac9859e
3 changed files with 11 additions and 3 deletions
  1. 9 3
      .dockerignore
  2. 1 0
      docker/debian/Dockerfile_debian_pdal
  3. 1 0
      docker/ubuntu/Dockerfile_ubuntu_pdal

+ 9 - 3
.dockerignore

@@ -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/*

+ 1 - 0
docker/debian/Dockerfile_debian_pdal

@@ -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
 

+ 1 - 0
docker/ubuntu/Dockerfile_ubuntu_pdal

@@ -214,6 +214,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