зеркало из https://github.com/docker/node-sdk.git
Syncing with compose-cli : can specify env vars and auto-remove option when running containers
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
Родитель
3280a8151d
Коммит
0a6c3e5e85
|
@ -59,6 +59,7 @@ message HostConfig {
|
|||
uint64 cpu_reservation = 3;
|
||||
uint64 cpu_limit = 4;
|
||||
string restart_policy = 5;
|
||||
bool auto_remove = 6;
|
||||
}
|
||||
|
||||
message InspectRequest {
|
||||
|
@ -110,7 +111,8 @@ message RunRequest {
|
|||
uint64 cpu_limit = 7;
|
||||
string restart_policy_condition = 8;
|
||||
repeated string command = 9;
|
||||
repeated string environment = 10;
|
||||
repeated string environment = 10;
|
||||
bool auto_remove = 11;
|
||||
}
|
||||
|
||||
message RunResponse {
|
||||
|
|
|
@ -127,6 +127,9 @@ export class HostConfig extends jspb.Message {
|
|||
getRestartPolicy(): string;
|
||||
setRestartPolicy(value: string): HostConfig;
|
||||
|
||||
getAutoRemove(): boolean;
|
||||
setAutoRemove(value: boolean): HostConfig;
|
||||
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): HostConfig.AsObject;
|
||||
|
@ -145,6 +148,7 @@ export namespace HostConfig {
|
|||
cpuReservation: number,
|
||||
cpuLimit: number,
|
||||
restartPolicy: string,
|
||||
autoRemove: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -397,6 +401,9 @@ export class RunRequest extends jspb.Message {
|
|||
setEnvironmentList(value: Array<string>): RunRequest;
|
||||
addEnvironment(value: string, index?: number): string;
|
||||
|
||||
getAutoRemove(): boolean;
|
||||
setAutoRemove(value: boolean): RunRequest;
|
||||
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): RunRequest.AsObject;
|
||||
|
@ -421,6 +428,7 @@ export namespace RunRequest {
|
|||
restartPolicyCondition: string,
|
||||
commandList: Array<string>,
|
||||
environmentList: Array<string>,
|
||||
autoRemove: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1260,7 +1260,8 @@ proto.com.docker.api.protos.containers.v1.HostConfig.toObject = function(include
|
|||
memoryLimit: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
||||
cpuReservation: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
||||
cpuLimit: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
||||
restartPolicy: jspb.Message.getFieldWithDefault(msg, 5, "")
|
||||
restartPolicy: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
||||
autoRemove: jspb.Message.getBooleanFieldWithDefault(msg, 6, false)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
|
@ -1317,6 +1318,10 @@ proto.com.docker.api.protos.containers.v1.HostConfig.deserializeBinaryFromReader
|
|||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setRestartPolicy(value);
|
||||
break;
|
||||
case 6:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setAutoRemove(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
|
@ -1381,6 +1386,13 @@ proto.com.docker.api.protos.containers.v1.HostConfig.serializeBinaryToWriter = f
|
|||
f
|
||||
);
|
||||
}
|
||||
f = message.getAutoRemove();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
6,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -1474,6 +1486,24 @@ proto.com.docker.api.protos.containers.v1.HostConfig.prototype.setRestartPolicy
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool auto_remove = 6;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.com.docker.api.protos.containers.v1.HostConfig.prototype.getAutoRemove = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.com.docker.api.protos.containers.v1.HostConfig} returns this
|
||||
*/
|
||||
proto.com.docker.api.protos.containers.v1.HostConfig.prototype.setAutoRemove = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 6, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -2818,7 +2848,8 @@ proto.com.docker.api.protos.containers.v1.RunRequest.toObject = function(include
|
|||
cpuLimit: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
||||
restartPolicyCondition: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
||||
commandList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f,
|
||||
environmentList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f
|
||||
environmentList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f,
|
||||
autoRemove: jspb.Message.getBooleanFieldWithDefault(msg, 11, false)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
|
@ -2898,6 +2929,10 @@ proto.com.docker.api.protos.containers.v1.RunRequest.deserializeBinaryFromReader
|
|||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addEnvironment(value);
|
||||
break;
|
||||
case 11:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setAutoRemove(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
|
@ -2995,6 +3030,13 @@ proto.com.docker.api.protos.containers.v1.RunRequest.serializeBinaryToWriter = f
|
|||
f
|
||||
);
|
||||
}
|
||||
f = message.getAutoRemove();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
11,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -3259,6 +3301,24 @@ proto.com.docker.api.protos.containers.v1.RunRequest.prototype.clearEnvironmentL
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool auto_remove = 11;
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.getAutoRemove = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
* @return {!proto.com.docker.api.protos.containers.v1.RunRequest} returns this
|
||||
*/
|
||||
proto.com.docker.api.protos.containers.v1.RunRequest.prototype.setAutoRemove = function(value) {
|
||||
return jspb.Message.setProto3BooleanField(this, 11, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче