admin管理员组

文章数量:1022679

I've setup Podman using non-root user in CentOS 9 machine.

The user is added to docker group. I am able to run and setup containers in the env as well. But when trying to run and setup the db2server using below command:

podman run -d  -e DB2INSTANCE=test \
  --name db2_container \
  -e LICENSE=accept \
  -e DB2INST1_PASSWORD=mypassword \
  -e DBNAME=testdb \
  -v database:/database \
  --privileged=true \
  -p 50002:50002 \
  docker.io/ibmcom/db2:11.5.7.0a

The container is failing to come up and following error is encountered.

No Cgroup memory limit detected, instance memory will follow automatic tuning
(*) Remounting /database with suid... 
mount: /database: permission denied.
(*) Nothing appears in the Db2 directory. will skip update/upgrade.
(*) Code level is the same. No update/upgrade needed.
And the db2 container is not coming up.

Podman version: podman version 5.0.2

Already tried solutions:

  1. Tried to disable SELinux, using --security-opt label=disable. This as well and it didn't work. I got the same error again.
  2. Tried to do userns-id, that as well didn't work.

How can I successfully run db2 container using Podman (non-root) user in CentOS 9 machine?

P.S. The same works if I try using root user in the machine.

I've setup Podman using non-root user in CentOS 9 machine.

The user is added to docker group. I am able to run and setup containers in the env as well. But when trying to run and setup the db2server using below command:

podman run -d  -e DB2INSTANCE=test \
  --name db2_container \
  -e LICENSE=accept \
  -e DB2INST1_PASSWORD=mypassword \
  -e DBNAME=testdb \
  -v database:/database \
  --privileged=true \
  -p 50002:50002 \
  docker.io/ibmcom/db2:11.5.7.0a

The container is failing to come up and following error is encountered.

No Cgroup memory limit detected, instance memory will follow automatic tuning
(*) Remounting /database with suid... 
mount: /database: permission denied.
(*) Nothing appears in the Db2 directory. will skip update/upgrade.
(*) Code level is the same. No update/upgrade needed.
And the db2 container is not coming up.

Podman version: podman version 5.0.2

Already tried solutions:

  1. Tried to disable SELinux, using --security-opt label=disable. This as well and it didn't work. I got the same error again.
  2. Tried to do userns-id, that as well didn't work.

How can I successfully run db2 container using Podman (non-root) user in CentOS 9 machine?

P.S. The same works if I try using root user in the machine.

本文标签: How to setup DB2 container in Linux VM using Podman (nonroot) userStack Overflow