mirror of https://github.com/portainer/portainer
fix(container-creation): do not stop container creation if unable to pull image
parent
2a28921984
commit
1e5207517d
|
@ -129,14 +129,7 @@ function ($scope, $state, $stateParams, $filter, Config, Info, Container, Contai
|
||||||
// TODO: centralize, already present in templatesController
|
// TODO: centralize, already present in templatesController
|
||||||
function pullImageAndCreateContainer(config) {
|
function pullImageAndCreateContainer(config) {
|
||||||
Image.create($scope.imageConfig, function (data) {
|
Image.create($scope.imageConfig, function (data) {
|
||||||
var err = data.length > 0 && data[data.length - 1].hasOwnProperty('error');
|
|
||||||
if (err) {
|
|
||||||
var detail = data[data.length - 1];
|
|
||||||
$('#createContainerSpinner').hide();
|
|
||||||
Messages.error('Error', {}, detail.error);
|
|
||||||
} else {
|
|
||||||
createContainer(config);
|
createContainer(config);
|
||||||
}
|
|
||||||
}, function (e) {
|
}, function (e) {
|
||||||
$('#createContainerSpinner').hide();
|
$('#createContainerSpinner').hide();
|
||||||
Messages.error('Failure', e, 'Unable to pull image');
|
Messages.error('Failure', e, 'Unable to pull image');
|
||||||
|
|
Loading…
Reference in New Issue