|
@@ -78,7 +78,7 @@ module.exports = DockerRunner =
|
|
|
_callback(args...)
|
|
_callback(args...)
|
|
|
# Only call the callback once
|
|
# Only call the callback once
|
|
|
_callback = () ->
|
|
_callback = () ->
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
name = options.name
|
|
name = options.name
|
|
|
|
|
|
|
|
streamEnded = false
|
|
streamEnded = false
|
|
@@ -115,7 +115,7 @@ module.exports = DockerRunner =
|
|
|
|
|
|
|
|
_getContainerOptions: (command, image, volumes, timeout, environment) ->
|
|
_getContainerOptions: (command, image, volumes, timeout, environment) ->
|
|
|
timeoutInSeconds = timeout / 1000
|
|
timeoutInSeconds = timeout / 1000
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
dockerVolumes = {}
|
|
dockerVolumes = {}
|
|
|
for hostVol, dockerVol of volumes
|
|
for hostVol, dockerVol of volumes
|
|
|
dockerVolumes[dockerVol] = {}
|
|
dockerVolumes[dockerVol] = {}
|
|
@@ -148,7 +148,7 @@ module.exports = DockerRunner =
|
|
|
"Ulimits": [{'Name': 'cpu', 'Soft': timeoutInSeconds+5, 'Hard': timeoutInSeconds+10}]
|
|
"Ulimits": [{'Name': 'cpu', 'Soft': timeoutInSeconds+5, 'Hard': timeoutInSeconds+10}]
|
|
|
"CapDrop": "ALL"
|
|
"CapDrop": "ALL"
|
|
|
"SecurityOpt": ["no-new-privileges"]
|
|
"SecurityOpt": ["no-new-privileges"]
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
if Settings.path?.synctexBinHostPath?
|
|
if Settings.path?.synctexBinHostPath?
|
|
|
options["HostConfig"]["Binds"].push("#{Settings.path.synctexBinHostPath}:/opt/synctex:ro")
|
|
options["HostConfig"]["Binds"].push("#{Settings.path.synctexBinHostPath}:/opt/synctex:ro")
|
|
@@ -276,7 +276,7 @@ module.exports = DockerRunner =
|
|
|
logger.log container_id: containerId, "timeout reached, killing container"
|
|
logger.log container_id: containerId, "timeout reached, killing container"
|
|
|
container.kill(() ->)
|
|
container.kill(() ->)
|
|
|
, timeout
|
|
, timeout
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
logger.log container_id: containerId, "waiting for docker container"
|
|
logger.log container_id: containerId, "waiting for docker container"
|
|
|
container.wait (error, res) ->
|
|
container.wait (error, res) ->
|
|
|
if error?
|
|
if error?
|
|
@@ -355,4 +355,4 @@ module.exports = DockerRunner =
|
|
|
, oneHour = 60 * 60 * 1000
|
|
, oneHour = 60 * 60 * 1000
|
|
|
, randomDelay
|
|
, randomDelay
|
|
|
|
|
|
|
|
-DockerRunner.startContainerMonitor()
|
|
|
|
|
|
|
+DockerRunner.startContainerMonitor()
|