diff --git a/app/coffee/DockerRunner.coffee b/app/coffee/DockerRunner.coffee index 8323d6c..635243f 100644 --- a/app/coffee/DockerRunner.coffee +++ b/app/coffee/DockerRunner.coffee @@ -108,9 +108,6 @@ module.exports = DockerRunner = _getContainerOptions: (command, image, volumes, timeout, environment) -> timeoutInSeconds = timeout / 1000 - if Settings.path?.synctexBinHostPath? - volumes[Settings.path.synctexBinHostPath] = "/opt/synctex:ro" - dockerVolumes = {} for hostVol, dockerVol of volumes dockerVolumes[dockerVol] = {} @@ -118,7 +115,6 @@ module.exports = DockerRunner = if volumes[hostVol].slice(-3).indexOf(":r") == -1 volumes[hostVol] = "#{dockerVol}:rw" - # merge settings and environment parameter env = {} for src in [Settings.clsi.docker.env, environment or {}] @@ -144,8 +140,13 @@ module.exports = DockerRunner = "Ulimits": [{'Name': 'cpu', 'Soft': timeoutInSeconds+5, 'Hard': timeoutInSeconds+10}] "CapDrop": "ALL" "SecurityOpt": ["no-new-privileges"] + if Settings.clsi.docker.seccomp_profile? options.HostConfig.SecurityOpt.push "seccomp=#{Settings.clsi.docker.seccomp_profile}" + + if Settings.path?.synctexBinHostPath? + options["HostConfig"]["Binds"].push("#{Settings.path.synctexBinHostPath}:/opt/synctex:ro") + logger.log options:options, "options for running docker container" return options diff --git a/bin/install_texlive_gce.sh b/bin/install_texlive_gce.sh index 2ea5f99..85ab709 100755 --- a/bin/install_texlive_gce.sh +++ b/bin/install_texlive_gce.sh @@ -9,6 +9,7 @@ fi docker login -u '_token' -p $ACCESS_TOKEN https://gcr.io docker pull --all-tags gcr.io/henry-terraform-admin/texlive-full #TODO NEED TO MAKE THIS AN ENV VAR cp /app/bin/synctex /app/bin/synctex-mount/synctex + echo "Finished downloading texlive-full images"