Skip to content

Commit

Permalink
Run ibmcom/db2 container non privileged. (ibm-functions#127)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
falkzoll authored Dec 21, 2020
1 parent 4de5179 commit 03bca6b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ class IBMPythonActionDB2Tests extends TestHelpers with WskTestHelpers with Befor
"docker",
"run",
"-d",
"--cap-add",
"IPC_LOCK",
"--cap-add",
"IPC_OWNER",
"-p",
"50000:50000",
"-e",
Expand All @@ -113,7 +117,6 @@ class IBMPythonActionDB2Tests extends TestHelpers with WskTestHelpers with Befor
"DB2INST1_PASSWORD=db2inst1-pwd",
"-e",
"LICENSE=accept",
"--privileged=true",
"--name",
db2containerName,
"ibmcom/db2")
Expand Down

0 comments on commit 03bca6b

Please sign in to comment.