Snap 8 BackGeocoding in Alpine linux Docker

There is no new installer yet: http://step.esa.int/main/download/snap-download/

Yes, there is no new installer. You can get the latest updates by updating the modules.
You can also download nbm files manually. See this thread.
.nbm files for offline install - snap - STEP Forum (esa.int)

Here @MarkWilliamMatthews explained how he solves this issue.

Here we have in docker the “endless loop” problem (see above)…

Do you suggest to modify the Dockerfile to download nbm files as done in the post you indicated?

Yes, I think the solution mark wrote is the best solution in the short or medium term.
Unfortunately, you need a desktop installation to retrieve the latest module updates.

I think there is currently no way to download modules e.g. by wget and then include them in SNAP without using the SNAP command line (Update SNAP from the command line - SNAP - SNAP Wiki (atlassian.net)).

There would be no problem to use the SNAP command line even in docker, but still there is the NullPointerException loop (see above):

Exception in thread “main” java.lang.NullPointerException
at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
at sun.font.SunFontManager$2.run(SunFontManager.java:431)
at java.security.AccessController.doPrivileged(Native Method)

at org.netbeans.updater.UpdaterFrame.initComponents(UpdaterFrame.java:175)
at org.netbeans.updater.UpdaterFrame.(UpdaterFrame.java:128)
at org.netbeans.updater.UpdaterFrame.main(UpdaterFrame.java:253)

which I don’t know how to work-around.

Installing fonts didn’t help?

Using Fonts with OpenJDK / Zulu – Azul Systems

Thanks for the hint, the font addition seems to do the trick in Alpine:

docker run -it --rm mundialis/esa-snap sh
/ # apk add ttf-dejavu
...
Executing mkfontscale-1.2.1-r1.trigger
OK: 170 MiB in 71 packages

/ # /usr/local/snap/bin/snap --nosplash --nogui --modules --update-all
/usr/local/snap/bin/../platform/lib/nbexec: WARNING: environment variable DISPLAY is not set
Refreshing SNAP Supported Plugins
Refreshing SNAP Core
Refreshing SNAP Toolboxes
Will update org.csa.rstb.rstb.op.polarimetric.tools@8.0.0 to version 8.0.1
Will update org.esa.s2tbx.s2tbx.s2msi.reader@8.0.0 to version 8.0.1
Will update org.esa.snap.snap.temporal.percentile@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.unmix.ui@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.pgx.reader@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.remote.products.repository@8.0.0 to version 8.0.3
Will update org.esa.s2tbx.s2tbx.forest.cover.change@8.0.0 to version 8.0.1
...
SNAP Standalone Tool Adapter GUI
SNAP Standalone Tool Adapter GUI
Sentinel-2 Toolbox Adapters Help
Sentinel-2 Toolbox Adapters Help


null
null


Updates not found.
updates=0
/ #

Indeed no more NullPointerException, even in Alpine!

Can I assume that the update was successful? If yes, then I’ll update the Dockerfile.

Yes, considering the log, the update should be successful.

Great!

Our Alpine-based docker images are now updated (Ubuntu still pending):

3 Likes

It’s not the same as the issue SNAP-1367. It’s does not even try to install updates as it does not found any.
Anyway, I tried to install the fonts, but it does not change anything. hellodear

We just succeeded in updating our SNAP Ubuntu-based docker container as well.
For the trick, see this GitHub commit for “update in loop”.

For choices, see:

2 Likes

Thank you Markus.

Back-Geocoding in Alpine Docker still does not work :frowning:, but it works with Ubuntu Docker :).

For those who want to use Ubuntu docker and Back-Geocoding, install the following package:
apt install libgfortran5

Thanks a lot all of you for your help !

Ah sorry - somehow I missed that lib in the Ubuntu Dockerfile. Added now, and rebuilding…