]> Repositorios git - scryer-prolog.git/commitdiff
fix Docker image
authorNiklas Gruhn <[email protected]>
Sun, 10 Sep 2023 23:40:05 +0000 (01:40 +0200)
committerNiklas Gruhn <[email protected]>
Sun, 10 Sep 2023 23:46:59 +0000 (01:46 +0200)
The Docker image is broken with the error message:

    scryer-prolog: error while loading shared libraries:
    libssl.so.1.1: cannot open shared object file: No such
    file or directory

We use the base base image `debian:stable-slim` and in the
background a new Debian version was marked stable (bookworm),
which has libssl3 instead of libssl1.1 installed.

I downgraded the base image to the previous stable version
(bullseye), which seems to fix the issue.

Dockerfile

index 0c1195ac8440699cc77012626286642e701314fb..9aaac9c010df55aa512c8020246376cb20a043be 100755 (executable)
@@ -20,7 +20,12 @@ COPY --from=cacher /scryer-prolog/target target
 COPY --from=cacher $CARGO_HOME $CARGO_HOME
 RUN cargo build --release --bin scryer-prolog
 
-FROM debian:stable-slim
+# Newer versions of Debian (i.e. bookworm) contain libssl3 instead of libssl1.1 
+# which we depend on.
+FROM debian:bullseye-slim
 COPY --from=builder /scryer-prolog/target/release/scryer-prolog /usr/local/bin
 ENV RUST_BACKTRACE=1
+# Sanity check the binary: if it can't be executed (e.g. if there are missing libraries) 
+# then fail the build
+RUN scryer-prolog --version
 ENTRYPOINT ["/usr/local/bin/scryer-prolog"]