mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
fix(container-creation): set a default runtime value (#2325)
* fix(containers): creating a container with default runtime let the docker daemon assume the correct value * refactor(containers): implementation simplification of default runtime value
This commit is contained in:
parent
ca08b2fa2a
commit
e948d606f4
2 changed files with 7 additions and 13 deletions
|
@ -544,14 +544,8 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
|
|||
|
||||
SystemService.info()
|
||||
.then(function success(data) {
|
||||
var runtimes = data.Runtimes;
|
||||
$scope.availableRuntimes = runtimes;
|
||||
if ('runc' in runtimes) {
|
||||
$scope.config.HostConfig.Runtime = 'runc';
|
||||
}
|
||||
else if (Object.keys(runtimes).length !== 0) {
|
||||
$scope.config.HostConfig.Runtime = Object.keys(runtimes)[0];
|
||||
}
|
||||
$scope.availableRuntimes = Object.keys(data.Runtimes);
|
||||
$scope.config.HostConfig.Runtime = '';
|
||||
$scope.state.sliderMaxCpu = 32;
|
||||
if (data.NCPU) {
|
||||
$scope.state.sliderMaxCpu = data.NCPU;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue