最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to setup DB2 container in Linux VM using Podman (non-root) user - Stack Overflow

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论