1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 21:35:23 +02:00

feat(image-build): add the ability to build images (#1672)

This commit is contained in:
Anthony Lapenna 2018-02-28 07:19:06 +01:00 committed by GitHub
parent e065bd4a47
commit 81de2a5afb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 607 additions and 15 deletions

18
app/docker/rest/build.js Normal file
View file

@ -0,0 +1,18 @@
angular.module('portainer.docker')
.factory('Build', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function BuildFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
'use strict';
return $resource(API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/build', {
endpointId: EndpointProvider.endpointID
},
{
buildImage: {
method: 'POST', ignoreLoadingBar: true,
transformResponse: jsonObjectsToArrayHandler, isArray: true,
headers: { 'Content-Type': 'application/x-tar' }
},
buildImageOverride: {
method: 'POST', ignoreLoadingBar: true,
transformResponse: jsonObjectsToArrayHandler, isArray: true
}
});
}]);

10
app/docker/rest/commit.js Normal file
View file

@ -0,0 +1,10 @@
angular.module('portainer.docker')
.factory('Commit', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function CommitFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
'use strict';
return $resource(API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/commit', {
endpointId: EndpointProvider.endpointID
},
{
commitContainer: {method: 'POST', params: {container: '@id', repo: '@repo', tag: '@tag'}, ignoreLoadingBar: true}
});
}]);

View file

@ -1,10 +0,0 @@
angular.module('portainer.docker')
.factory('ContainerCommit', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function ContainerCommitFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
'use strict';
return $resource(API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/commit', {
endpointId: EndpointProvider.endpointID
},
{
commit: {method: 'POST', params: {container: '@id', repo: '@repo', tag: '@tag'}, ignoreLoadingBar: true}
});
}]);