dockerelixiralpine-linuxsemaphore-ci

Docker - Alpine Elixir container has unsatisfiable constraints


I have this Dockerfile for my Phoenix application. When running a promotion with Semaphore CI, my deployment fails and returns this error:

ERROR: unsatisfiable constraints:
  libssl1.0 (missing):
    required by: world[libssl1.0]
  pdftk (missing):
    required by: world[pdftk]

How come it can't fetch these two packages?


Solution

  • 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:

    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.