adoublefA
Denoβ€’3y agoβ€’
3 replies
adoublef

Distroless Docker image fails with `libc.so: cannot open shared object file: No such file`

I am building a 1:1 with a Node project using the same base for a docker image distroless/cc. Both projects use the same external dependency pulled from npm called libsql however the Deno project seems to fail with the following error

libc.so: cannot open shared object file: No such file or directory


I am unsure where to direct this issue as I can see that the container does include a file under /lib/x86_64-linux-gnu directory.

Here is my current dockerfile

ARG DENO_VERSION=1.37.2

FROM denoland/deno:${DENO_VERSION} AS build
WORKDIR /app

USER deno

COPY deno.* deps.ts ./
RUN deno cache deps.ts

ADD . .

RUN deno cache cmd/www/main.ts

# ? --------------------------------

# FROM gcr.io/distroless/cc AS final
FROM denoland/deno:distroless-${DENO_VERSION} AS final
WORKDIR /app

COPY --from=build /deno-dir /deno-dir
COPY . .

CMD ["run", "-A", "--unstable", "cmd/www/main.ts"]

EXPOSE 8000


Any suggestions?
Was this page helpful?