mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-14 16:43:30 +00:00
Merge pull request #263 from overleaf/bg-add-option-for-apparmor-profile
add option for apparmor profile
This commit is contained in:
commit
6a3da482c4
2 changed files with 15 additions and 0 deletions
|
@ -270,6 +270,12 @@ const DockerRunner = {
|
|||
)
|
||||
}
|
||||
|
||||
if (Settings.clsi.docker.apparmor_profile != null) {
|
||||
options.HostConfig.SecurityOpt.push(
|
||||
`apparmor=${Settings.clsi.docker.apparmor_profile}`
|
||||
)
|
||||
}
|
||||
|
||||
if (Settings.clsi.docker.runtime) {
|
||||
options.HostConfig.Runtime = Settings.clsi.docker.runtime
|
||||
}
|
||||
|
|
|
@ -143,6 +143,15 @@ if (process.env.DOCKER_RUNNER) {
|
|||
process.exit(1)
|
||||
}
|
||||
|
||||
if (process.env.APPARMOR_PROFILE) {
|
||||
try {
|
||||
module.exports.clsi.docker.apparmor_profile = process.env.APPARMOR_PROFILE
|
||||
} catch (error) {
|
||||
console.error(error, 'could not apply apparmor profile setting')
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.ALLOWED_IMAGES) {
|
||||
try {
|
||||
module.exports.clsi.docker.allowedImages =
|
||||
|
|
Loading…
Add table
Reference in a new issue