Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 03bca6b

Browse files
authored
Run ibmcom/db2 container non privileged. (#127)
- Running privileged containers is not possible in all environments. With actual docker installations it is now possible to get the required permissions for the ibmcom/db2 containers also via '--cap-add' statements (db2 requires larger shared memory than the default allows). Adding '--cap-add IPC_LOCK' and '--cap-add IPC_OWNER' allows to remove the '--privileged=true' and still run ibmcom/db2 successfully.
1 parent 4de5179 commit 03bca6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/src/test/scala/actionContainers/IBMPythonActionDB2Tests.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ class IBMPythonActionDB2Tests extends TestHelpers with WskTestHelpers with Befor
105105
"docker",
106106
"run",
107107
"-d",
108+
"--cap-add",
109+
"IPC_LOCK",
110+
"--cap-add",
111+
"IPC_OWNER",
108112
"-p",
109113
"50000:50000",
110114
"-e",
@@ -113,7 +117,6 @@ class IBMPythonActionDB2Tests extends TestHelpers with WskTestHelpers with Befor
113117
"DB2INST1_PASSWORD=db2inst1-pwd",
114118
"-e",
115119
"LICENSE=accept",
116-
"--privileged=true",
117120
"--name",
118121
db2containerName,
119122
"ibmcom/db2")

0 commit comments

Comments
 (0)