manifest: add runtimeDirs

This commit is contained in:
Girish Ramakrishnan
2022-10-24 22:34:06 +02:00
parent 17c7cc5ec7
commit d8eb8d23bb
3 changed files with 16 additions and 12 deletions

View File

@@ -315,6 +315,13 @@ async function createSubcontainer(app, name, cmd, options) {
const mounts = await getMounts(app);
const addonEnv = await services.getEnvironment(app);
const runtimeVolumes = {
'/tmp': {},
'/run': {}
};
if (app.manifest.runtimeDirs) {
app.manifest.runtimeDirs.forEach(dir => runtimeVolumes[dir] = {});
}
let containerOptions = {
name: name, // for referencing containers
@@ -323,10 +330,7 @@ async function createSubcontainer(app, name, cmd, options) {
Cmd: (isAppContainer && app.debugMode && app.debugMode.cmd) ? app.debugMode.cmd : cmd,
Env: stdEnv.concat(addonEnv).concat(portEnv).concat(appEnv).concat(secondaryDomainsEnv),
ExposedPorts: isAppContainer ? exposedPorts : { },
Volumes: { // see also ReadonlyRootfs
'/tmp': {},
'/run': {}
},
Volumes: runtimeVolumes,
Labels: {
'fqdn': app.fqdn,
'appId': app.id,