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

feat(api): Add npipe support (#2018)

This commit is contained in:
Olli Janatuinen 2018-07-20 12:02:06 +03:00 committed by Anthony Lapenna
parent 0368c4e937
commit 4129550d44
17 changed files with 133 additions and 43 deletions

View file

@ -57,7 +57,7 @@ function EndpointServiceFactory($q, Endpoints, FileUploadService) {
service.createLocalEndpoint = function() {
var deferred = $q.defer();
FileUploadService.createEndpoint('local', 1, 'unix:///var/run/docker.sock', '', 1, [], false)
FileUploadService.createEndpoint('local', 1, '', '', 1, [], false)
.then(function success(response) {
deferred.resolve(response.data);
})

View file

@ -67,7 +67,7 @@ function ($q, $scope, $state, $transition$, $filter, EndpointService, GroupServi
})
.then(function success(data) {
var endpoint = data.endpoint;
if (endpoint.URL.indexOf('unix://') === 0) {
if (endpoint.URL.indexOf('unix://') === 0 || endpoint.URL.indexOf('npipe://') === 0) {
$scope.endpointType = 'local';
} else {
$scope.endpointType = 'remote';

View file

@ -77,11 +77,20 @@
<div class="col-sm-12">
<span class="small">
<p class="text-primary">
Manage the Docker environment where Portainer is running using the Unix filesystem socket.
Manage the Docker environment where Portainer is running.
</p>
<p class="text-muted">
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px;"></i>
Ensure that you have started the Portainer container with the following Docker flag: <code>-v "/var/run/docker.sock:/var/run/docker.sock"</code>.
Ensure that you have started the Portainer container with the following Docker flag:
</p>
<p class="text-muted">
<code>-v "/var/run/docker.sock:/var/run/docker.sock"</code> (Linux).
</p>
<p class="text-muted">
or
</p>
<p class="text-muted">
<code>-v \\.\pipe\docker_engine:\\.\pipe\docker_engine</code> (Windows).
</p>
</span>
</div>

View file

@ -30,7 +30,7 @@ function ($scope, $state, EndpointService, StateManager, Notifications) {
$scope.createLocalEndpoint = function() {
var name = 'local';
var URL = 'unix:///var/run/docker.sock';
var URL = '';
var endpoint;
$scope.state.actionInProgress = true;