[misc] move the image check prior to the base image override

This commit is contained in:
Jakob Ackermann 2020-07-01 10:01:25 +01:00
parent aa02df7b81
commit f703b2ca41

View file

@ -86,11 +86,6 @@ module.exports = DockerRunner = {
;({ image } = Settings.clsi.docker)
}
if (Settings.texliveImageNameOveride != null) {
const img = image.split('/')
image = `${Settings.texliveImageNameOveride}/${img[2]}`
}
if (
Settings.clsi.docker.allowedImages &&
!Settings.clsi.docker.allowedImages.includes(image)
@ -98,6 +93,11 @@ module.exports = DockerRunner = {
return callback(new Error('image not allowed'))
}
if (Settings.texliveImageNameOveride != null) {
const img = image.split('/')
image = `${Settings.texliveImageNameOveride}/${img[2]}`
}
const options = DockerRunner._getContainerOptions(
command,
image,