-
Notifications
You must be signed in to change notification settings - Fork 9
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
added proj support #10
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thank you for your contribution 😄 I left you some comments
For the record, the issue about this change : mapnik/mapnik#4036
@@ -14,7 +14,7 @@ | |||
|
|||
FROM debian:bullseye-slim | |||
|
|||
ENV MAPNIK_VERSION v3.1.0 | |||
ENV MAPNIK_VERSION=v3.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not necessary IMO
&& ln -s /usr/local/lib/mapnik /usr/local/lib/plugins | ||
|
||
#WORKDIR /usr/local/lib | ||
#ENTRYPOINT ["mapnik-render"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove these two lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapnik-render requires to be run where it can access the plugins in "plugins/input" This is the reason for the symlink and the workdir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it's related to this comment #2 (comment)
Mapnik team says:
mapnik-render at this point is only designed to be used locally, from within a mapnik git clone. So it is not expected to work if installed.
So adding workarounds for these purposes is not necessary.
&& cd /root \ | ||
&& wget 'https://download.osgeo.org/proj/proj-5.2.0.tar.gz' \ | ||
&& tar -zxf proj-5.2.0.tar.gz \ | ||
&& cd proj-5.2.0 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to replace this by
- && cd /root \
- && wget 'https://download.osgeo.org/proj/proj-5.2.0.tar.gz' \
- && tar -zxf proj-5.2.0.tar.gz \
- && cd proj-5.2.0 \
+ && mkdir proj \
+ && wget -q 'https://download.osgeo.org/proj/proj-5.2.0.tar.gz' -O - | tar -zx --strip-components=1 -C proj \
+ && cd proj \
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that your code is cleaner.
@@ -77,4 +87,8 @@ RUN apt-get update \ | |||
&& rm -r mapnik \ | |||
&& apt-get autoremove -y --purge $BUILD_DEPENDENCIES \ | |||
&& rm -rf /var/lib/apt/lists/* \ | |||
&& ln -s /usr/local/lib/mapnik /usr/lib/mapnik | |||
&& ln -s /usr/local/lib/mapnik /usr/lib/mapnik \ | |||
&& ln -s /usr/local/lib/mapnik /usr/local/lib/plugins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you link the mapnik folder to plugin ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is for mapnik-render to be able to access the plugins.
Fixed ENV for MAPNIK_VERSION and added support for proj (default proj from Debian was too far ahead, mapnik v3.1 needs proj v5.xx)