Docker - Alpine Elixir container has unsatisfiable constraints Docker - Alpine Elixir container has unsatisfiable constraints docker docker

Docker - Alpine Elixir container has unsatisfiable constraints


The erlang:20-alpine image (Dockerfile), which is used as base for elixir:1.6.6-alpine (Dockerfile), has been recently updated from Alpine 3.8 to 3.9 (Github commit).

The following has changed between Alpine 3.8 and 3.9:

  • The libssl1.0 package has been removed, and superseded by libssl1.1.

  • The pdftk package has been removed in 3.9, and is only available in the edge branch community repository (and older Alpine branches).

libssl:

This one is easily fixed: just replace the libssl1.0 package with libssl1.1.

pdftk:

pdftk is more problematic. It depends on libgcj6, the Java runtime for GCC 6. However, the Java runtime was completely removed from GCC 8 and onwards. libgcj6 is the Java runtime for GCC 6, and is not compatible with GCC 8. Installing libgcj6 also pulls the GCC 6 C++ runtime, libstdc++6 (6.4.0-r9).

An attempt to install pdftk along with libgcj6, for example:

RUN apk add --no-cache libgcj6 pdftk --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community

Fails with:

ERROR: unsatisfiable constraints:  so:libgcj.so.17 (missing):    required by: pdftk-2.02-r1[so:libgcj.so.17]

Unfortunately, I'm not familiar with a workaround, currently.

There's an active open Alpine ticket for this issue: https://bugs.alpinelinux.org/issues/10136, so it's worth keeping an eye for possible updates.