DB2: Running DB2 as Container: Difference between revisions

From Wiki
No edit summary
No edit summary
 
Line 12: Line 12:
Running Db2
Running Db2


  podman run -d --name mydb2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=db2inst1 \
  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
  -v /opt/db2data:/database db2_community/db2


Line 18: Line 18:
Cheking Logs
Cheking Logs


  podman logs -f mydb2
  podman logs -f mydb2_50000
 
 
Stopping container
 
podman stop -t 2 mydb2_50000
 
Starting container
 
podman start -a mydb2_50000
 





Latest revision as of 14:01, 19 February 2026

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