Skip to content

Commit

Permalink
docker: get rid of grass gis version in alpine Dockerfile (#3068)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmacata authored and neteler committed Jun 29, 2023
1 parent fa31e7b commit 8bd832f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,23 @@ RUN echo " => Configure and compile grass" && \
make install && \
ldconfig /etc/ld.so.conf.d

# Get rid of version number here, restore in next stage via symbolic link
RUN mv $(grass --config path) /usr/local/grass

# Reduce the image size - Remove unnecessary grass files
RUN cp /usr/local/grass83/gui/wxpython/xml/module_items.xml module_items.xml; \
rm -rf /usr/local/grass83/demolocation; \
rm -rf /usr/local/grass83/fonts; \
rm -rf /usr/local/grass83/gui; \
rm -rf /usr/local/grass83/share; \
mkdir -p /usr/local/grass83/gui/wxpython/xml/; \
mv module_items.xml /usr/local/grass83/gui/wxpython/xml/module_items.xml;
RUN cp /usr/local/grass/gui/wxpython/xml/module_items.xml module_items.xml; \
rm -rf /usr/local/grass/demolocation; \
rm -rf /usr/local/grass/fonts; \
rm -rf /usr/local/grass/gui; \
rm -rf /usr/local/grass/share; \
mkdir -p /usr/local/grass/gui/wxpython/xml/; \
mv module_items.xml /usr/local/grass/gui/wxpython/xml/module_items.xml;

RUN git clone https://github.com/OSGeo/gdal-grass /src/gdal-grass
WORKDIR /src/gdal-grass
RUN ./configure \
--with-gdal=/usr/bin/gdal-config \
--with-grass=/usr/local/grass84 && \
--with-grass=/usr/local/grass && \
make -j $NUMTHREADS && \
make install -j $NUMTHREADS

Expand Down

0 comments on commit 8bd832f

Please sign in to comment.