Update snap in docker container


I have a dockerfile which installs snap with a commands:

# download snap installer version 9.0
RUN wget https://download.esa.int/step/snap/9.0/installers/esa-snap_sentinel_unix_9_0_0.sh

#change file execution rights for snap installer
RUN chmod +x esa-snap_sentinel_unix_9_0_0.sh

# install snap with gpt
RUN ./esa-snap_sentinel_unix_9_0_0.sh -q

# link gpt so it can be used systemwide
RUN ln -s /usr/local/snap/bin/gpt /usr/bin/gpt

# update SNAP
RUN snap --nosplash --nogui --modules --update-all

And all goes fine and I can use the docker with gpt without the last update part. But running the update fails with

Exception in thread "main" java.lang.Error: Probable fatal error:No fonts found.
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1236)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)

And it does not stop at that error, but then tries again forever.

Any ideas what am I missing here?

Best regards

The used JRE does not provide font files but relies on those provided by the OS.
Unfortunately, some do not have fonts installed by default.
You can fix it by following this work around:
Using Fonts with OpenJDK, Zulu, Azul Platform Core and Azul Platform Prime – Azul


Thanks, adding “fonts-dejavu fontconfig” to packages solved the particular error. Now, the update seems to succeed, but then it seems that the update is retrying, finding no updates, and just hangs in that state without completing?


Updates not found.

So, killing the process, but now when I run

gpt --diag

I still get the snap version as 9.0.0. Trying to update some single package does not show any available updates so I assume it actually did the update.

Please have a look here:
Update SNAP from the command line - SNAP - Confluence (atlassian.net)
In the note it is mentioned how to stop the update process.
The –diag option only shows the major release version.

Ok, that explains the situation, thanks.

The quick workaround may be to install some fonts. Even if you never use the GUI, fonts may be needed to produce image files.

My main confusion is that missing fonts will disturb program running, then this kind of problem should be detected already during the main installation, not just during the update?