Revert "Also allow docker in containers spawned by an authorized app"
This reverts commit 4f336a05fc.
This is not required by an app yet. Besides, it breaks tests
This commit is contained in:
@@ -14,7 +14,6 @@ exports = module.exports = {
|
||||
deleteContainers: deleteContainers,
|
||||
createSubcontainer: createSubcontainer,
|
||||
getContainerIdByIp: getContainerIdByIp,
|
||||
getAppIdByContainerIp: getAppIdByContainerIp,
|
||||
inspect: inspect,
|
||||
inspectByName: inspect,
|
||||
execContainer: execContainer
|
||||
@@ -385,24 +384,6 @@ function getContainerIdByIp(ip, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function getAppIdByContainerIp(ip, callback) {
|
||||
assert.strictEqual(typeof ip, 'string');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
getContainerIdByIp(ip, function (error, containerId) {
|
||||
if (error) return callback(error);
|
||||
|
||||
inspect(containerId, function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
var appId = result.Config.Labels.appId;
|
||||
if (!appId) return callback(new Error('No app associated with this ip'));
|
||||
|
||||
callback(null, appId);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function inspect(containerId, callback) {
|
||||
assert.strictEqual(typeof containerId, 'string');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
Reference in New Issue
Block a user