Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: Get rid of hardcoded GRASS GIS version in alpine Dockerfile #3068

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/grass84/gui/wxpython/xml/module_items.xml module_items.xml; \
rm -rf /usr/local/grass84/demolocation; \
rm -rf /usr/local/grass84/fonts; \
rm -rf /usr/local/grass84/gui; \
rm -rf /usr/local/grass84/share; \
mkdir -p /usr/local/grass84/gui/wxpython/xml/; \
mv module_items.xml /usr/local/grass84/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
Loading