Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to use YottaDB Docker image?

42 views
Skip to first unread message

Kevin Toppenberg

unread,
Dec 6, 2024, 4:53:19 PM12/6/24
to Everything MUMPS
I am new to Docker.

I am trying to use the Docker image (?container?) listed here: https://hub.docker.com/r/yottadb/yottadb-debian

I have gotten Docker installed and successfully did the Docker pull request:
"docker pull yottadb/yottadb-debian"

I can see the image listed, as below.

kdtop@kdtop-VirtualBox:~$ sudo docker images
REPOSITORY               TAG       IMAGE ID       CREATED       SIZE
yottadb/yottadb-debian   latest    6502482464bf   6 weeks ago   2.89GB

According to ChatGPT, the next step is to run the image, as below. 

kdtop@kdtop-VirtualBox:~$ sudo docker run -d yottadb/yottadb-debian
e00a3ff20d4d99bbff92a5f7ace575507cf35750b74736a4f3c7c52380e93789

I'm not sure what the above long number is, but OK.  To get the container ID, I enter command as below.

kdtop@kdtop-VirtualBox:~$ sudo docker ps
CONTAINER ID   IMAGE                    COMMAND                  CREATED         STATUS         PORTS                NAMES
e00a3ff20d4d   yottadb/yottadb-debian   "/docker-debian-star…"   7 seconds ago   Up 6 seconds   1337/tcp, 9080/tcp   frosty_mirzakhani

I then try to launch a terminal inside the container (again per ChatGPT instructions)

kdtop@kdtop-VirtualBox:~$ sudo docker exec -it e00a3ff20d4d bash
Error response from daemon: container e00a3ff20d4d99bbff92a5f7ace575507cf35750b74736a4f3c7c52380e93789 is not running

As above, I'm getting an error. 

My goal is to run gdb on this as Sam indicated was possible.

Can anyone tell me how to move forward?

Thanks
Kevin

Kevin Toppenberg

unread,
Dec 6, 2024, 5:24:21 PM12/6/24
to Everything MUMPS
OK, I was missing the run instructions, which I just found here: https://github.com/YottaDB/YDB

It gives this command: docker run --rm -it -p 9080-9081:9080-9081 download.yottadb.com/yottadb/yottadb # you can add a specific version after a ":" if desired

This will work and puts me into a YDB mumps shell.  But this is running "download.yottadb.com/yottadb/yottadb"  This is different than the image Sam mentions in his prior post:

  >Instructions here: https://gitlab.com/YottaDB/DB/YDB
  >
  >We also have a debug image on Docker: https://hub.docker.com/r/yottadb/yottadb-debian and yottadb-debian-base. You can use gdb and start debugging there.
  >
  >--Sam

So I swapped out the other name giving: sudo docker run -d --rm -it -p 9080-9081:9080-9081 yottadb/yottadb-debian   <-- note I added "-d" to make this run in the background.  I then connect to it via

sudo docker exec -it 4af3bc6d06ac bash   <-- I got container ID via sudo docker ps

This takes me into a shell

root@4af3bc6d06ac:/data# ls -Al
total 28
lrwxrwxrwx 1 root root   12 Oct 25 19:23 V7.0-005_x86_64 -> r2.01_x86_64
drwxr-xr-x 2 root root 4096 Dec  6 22:15 logs
drwxr-xr-x 3 root root 4096 Dec  6 22:15 node_modules
-rw-r--r-- 1 root root  802 Dec  6 22:15 package-lock.json
-rw-r--r-- 1 root root   51 Dec  6 22:15 package.json
drwxr-xr-x 2 root root 4096 Oct 25 19:23 r
drwxr-xr-x 1 root root 4096 Oct 25 19:23 r2.01_x86_64
root@4af3bc6d06ac:/data#

But I don't see how to run ydb here.  I will need this so I can use "gdb ydb"

What should I do next?

KT

Sam Habiel

unread,
Dec 6, 2024, 6:25:04 PM12/6/24
to Kevin Toppenberg, Everything MUMPS
I am pretty much dead today. I will respond tomorrow.

—Sam

--
You received this message because you are subscribed to the Google Groups "Everything MUMPS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to everythingmum...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/everythingmumps/e2819cad-1198-42b9-87bf-7aa0843217ean%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sam Habiel

unread,
Dec 7, 2024, 10:09:35 AM12/7/24
to Kevin Toppenberg, Everything MUMPS
Here you are Kevin.

docker run -it download.yottadb.com/yottadb/yottadb-debug-base /bin/bash
apt update
apt install -y git gdb
git clone https://gitlab.com/YottaDB/DB/YDB.git /tmp/yottadb-src
. /opt/yottadb/current/ydb_env_set
gdb --args yottadb -dir

See https://beej.us/guide/bggdb/ for help using GDB.

--Sam

Kevin Toppenberg

unread,
Dec 8, 2024, 5:29:02 PM12/8/24
to Everything MUMPS
Thank you Sam, this got me going.

I would add one small tweak to the instructions:
cd /opt/yottadb/current  <-- inside the container.

before launching gdb

Thanks again!
Reply all
Reply to author
Forward
0 new messages