Home > OS >  Docker container with KDB executable "No such file or directory"
Docker container with KDB executable "No such file or directory"

Time:01-26

I am trying to use docker to run kdb/q. But I get a "No such file or directory" error

Dockerfile:

FROM ubuntu

COPY ./ /root_dir/

WORKDIR root_dir

ENV QHOME=/root_dir/bin/q

RUN ["chmod", " x", "/root_dir/bin/q/l32/q"]

CMD ["/bin/bash"]

I am opening a bash command prompt just so I can take a look at it but eventually this would just be run with the q command directly

File Layout:

- root_dir
  - bin
    - q
      - q.k
      - s.k
      - l32
        - q

Build:

sudo docker build -t dfile -f Dockerfile .

Run:

sudo docker run -it dfile

Gives me a bash command prompt, and trying to launch q:

root@5e4b86578916:/root_dir# /root_dir/bin/q/l32/q

Gives

bash: /root_dir/bin/q/l32/q: No such file or directory

However I can see it there:

root@5e4b86578916:/root_dir# ls /root_dir/bin/q/l32/
q

How can I launch q/any executable from here?

NB: I am running q locally on Ubuntu with the same command, if I set QHOME to the same (local) location using export then give the full path to the executable I enter into a valid q session

CodePudding user response:

Seems that it needs libc6-i386 to run (64 bit/32 bit conversion)

FROM ubuntu

COPY ./ /root_dir/

WORKDIR root_dir

RUN apt-get update && apt-get install libc6-i386

ENV QHOME=/root_dir/bin/q

RUN chmod  x /root_dir/bin/q/l32/q

CMD /root_dir/bin/q/l32/q

Now works as expected. The only docs I can find are not very illuminating https://packages.ubuntu.com/focal/libc6-i386

CodePudding user response:

See kdb install notes for how to run 32-bit kdb on 64-bit linux.

  •  Tags:  
  • Related