mirror of https://github.com/OpenVidu/openvidu.git
Add privileged flag to DockerManager
parent
37b4f41862
commit
34a45ff923
|
@ -175,7 +175,7 @@ public class ComposedRecordingService extends RecordingService {
|
|||
List<Bind> binds = new ArrayList<>();
|
||||
binds.add(bind1);
|
||||
containerId = dockerManager.runContainer(container, containerName, null, volumes, binds, "host", envs, null,
|
||||
536870912L);
|
||||
536870912L, false);
|
||||
containers.put(containerId, containerName);
|
||||
} catch (Exception e) {
|
||||
this.cleanRecordingMaps(recording);
|
||||
|
|
|
@ -104,7 +104,7 @@ public class DockerManager {
|
|||
}
|
||||
|
||||
public String runContainer(String container, String containerName, String user, List<Volume> volumes,
|
||||
List<Bind> binds, String networkMode, List<String> envs, List<String> command, Long shmSize)
|
||||
List<Bind> binds, String networkMode, List<String> envs, List<String> command, Long shmSize, boolean privileged)
|
||||
throws Exception {
|
||||
|
||||
CreateContainerCmd cmd = dockerClient.createContainerCmd(container).withEnv(envs);
|
||||
|
@ -116,7 +116,7 @@ public class DockerManager {
|
|||
cmd.withUser(user);
|
||||
}
|
||||
|
||||
HostConfig hostConfig = new HostConfig().withNetworkMode(networkMode);
|
||||
HostConfig hostConfig = new HostConfig().withNetworkMode(networkMode).withPrivileged(privileged);
|
||||
if (shmSize != null) {
|
||||
hostConfig.withShmSize(shmSize);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue