Deno: Problems when building deno docker image based on alpine

Created on 10 Jan 2019  路  2Comments  路  Source: denoland/deno

I started with a Dockerfile:

FROM alpine
RUN apk add libgcc libc6-compat && \
    cd /root && \
    wget https://github.com/denoland/deno/releases/download/v0.2.6/deno_linux_x64.gz && \
    gunzip deno_linux_x64.gz && \
    mv deno_linux_x64 /bin/deno && \
    chmod +x /bin/deno
CMD [ "/bin/deno" ]

And build it with:

docker build -t sunfmin/deno .

Then I run:

$ docker run sunfmin/deno deno https://deno.land/thumb.ts
Error relocating /bin/deno: __rawmemchr: symbol not found
Error relocating /bin/deno: strtoll_l: symbol not found
Error relocating /bin/deno: strtoull_l: symbol not found
Error relocating /bin/deno: __register_atfork: symbol not found
Error relocating /bin/deno: __res_init: symbol not found
Error relocating /bin/deno: __isnan: symbol not found
Error relocating /bin/deno: __vfprintf_chk: symbol not found
Error relocating /bin/deno: __vsnprintf_chk: symbol not found
Error relocating /bin/deno: __isinf: symbol not found
Error relocating /bin/deno: __isnanf: symbol not found
Error relocating /bin/deno: backtrace: symbol not found
Error relocating /bin/deno: backtrace_symbols: symbol not found

I got this error: Error relocating /bin/deno: __res_init: symbol not found

If I do:

/ # ldd /bin/deno
    /lib64/ld-linux-x86-64.so.2 (0x7f4d4c9a7000)
    libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f4d4c9a7000)
    libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f4d4c9a7000)
    librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7f4d4c9a7000)
    libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f4d4c9a7000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f4d4c795000)
    libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f4d4c9a7000)
Error relocating /bin/deno: __rawmemchr: symbol not found
Error relocating /bin/deno: strtoll_l: symbol not found
Error relocating /bin/deno: strtoull_l: symbol not found
Error relocating /bin/deno: __register_atfork: symbol not found
Error relocating /bin/deno: __res_init: symbol not found
Error relocating /bin/deno: __isnan: symbol not found
Error relocating /bin/deno: __vfprintf_chk: symbol not found
Error relocating /bin/deno: __vsnprintf_chk: symbol not found
Error relocating /bin/deno: __isinf: symbol not found
Error relocating /bin/deno: __isnanf: symbol not found
Error relocating /bin/deno: backtrace: symbol not found
Error relocating /bin/deno: backtrace_symbols: symbol not found

What should I do to fix this?

Most helpful comment

You need glibc. See: https://github.com/hayd/deno_docker

That said, it should be possible to build a binary for alpine which doesn't require glibc...
(see also https://github.com/denoland/deno/issues/1456#issuecomment-451780202 )

All 2 comments

You need glibc. See: https://github.com/hayd/deno_docker

That said, it should be possible to build a binary for alpine which doesn't require glibc...
(see also https://github.com/denoland/deno/issues/1456#issuecomment-451780202 )

It worked. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CruxCv picture CruxCv  路  3Comments

xueqingxiao picture xueqingxiao  路  3Comments

kyeotic picture kyeotic  路  3Comments

benjamingr picture benjamingr  路  3Comments

ry picture ry  路  3Comments