DB2: Running DB2 as Container

From Wiki
Revision as of 14:01, 19 February 2026 by Ebasso (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Running DB2 as Container

Create db2data directory

# mkdir -p /opt/db2data


Pull images

podman pull icr.io/db2_community/db2

Running Db2

podman run -d --name mydb2_50000 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=db2inst1 \
-v /opt/db2data:/database db2_community/db2


Cheking Logs

podman logs -f mydb2_50000


Stopping container

podman stop -t 2 mydb2_50000

Starting container

podman start -a mydb2_50000


Ver também