make /var/log readonly
Expect apps to redirect logs of stdout/stderr Part of #503
This commit is contained in:
+4
-2
@@ -235,11 +235,13 @@ function createContainer(app, callback) {
|
||||
ExposedPorts: exposedPorts,
|
||||
Volumes: { // see also ReadonlyRootfs
|
||||
'/tmp': {},
|
||||
'/run': {},
|
||||
'/var/log': {}
|
||||
'/run': {}
|
||||
}
|
||||
};
|
||||
|
||||
// older versions wanted a writable /var/log
|
||||
if (semver.lte(targetBoxVersion(app.manifest), '0.0.71')) containerOptions.Volumes['/var/log'] = {};
|
||||
|
||||
debugApp(app, 'Creating container for %s', app.manifest.dockerImage);
|
||||
|
||||
docker.createContainer(containerOptions, function (error, container) {
|
||||
|
||||
Reference in New Issue
Block a user