From 9da08bc792b85c63bf239084da4c7b31859d5938 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 22 Jan 2020 09:17:41 +1300 Subject: [PATCH] refactor(endpoint-creation): remove unneeded port (#3467) * refactor(endpoint-creation): remove unneeded port * refactor(endpoint-creation): remove from clipboard --- app/portainer/views/endpoints/edit/endpoint.html | 2 -- app/portainer/views/endpoints/edit/endpointController.js | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/portainer/views/endpoints/edit/endpoint.html b/app/portainer/views/endpoints/edit/endpoint.html index c8792066e..81f840a1c 100644 --- a/app/portainer/views/endpoints/edit/endpoint.html +++ b/app/portainer/views/endpoints/edit/endpoint.html @@ -45,7 +45,6 @@ -e EDGE_ID={{ randomEdgeID }} \ -e EDGE_KEY={{ endpoint.EdgeKey }} \ -e CAP_HOST_MANAGEMENT=1 \ - -p 8000:80 \ -v portainer_agent_data:/data \ --name portainer_edge_agent \ portainer/agent @@ -66,7 +65,6 @@ -e EDGE_KEY={{ endpoint.EdgeKey }} \ -e CAP_HOST_MANAGEMENT=1 \ --mode global \ - --publish mode=host,published=8000,target=80 \ --constraint 'node.platform.os == linux' \ --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \ --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes \ diff --git a/app/portainer/views/endpoints/edit/endpointController.js b/app/portainer/views/endpoints/edit/endpointController.js index 0309c197f..aa023d509 100644 --- a/app/portainer/views/endpoints/edit/endpointController.js +++ b/app/portainer/views/endpoints/edit/endpointController.js @@ -22,9 +22,9 @@ function ($q, $scope, $state, $transition$, $filter, clipboard, EndpointService, $scope.copyEdgeAgentDeploymentCommand = function() { if ($scope.state.deploymentTab === 0) { - clipboard.copyText('docker run -d -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes -v /:/host --restart always -e EDGE=1 -e EDGE_ID=' + $scope.randomEdgeID + ' -e EDGE_KEY=' + $scope.endpoint.EdgeKey +' -e CAP_HOST_MANAGEMENT=1 -p 8000:80 -v portainer_agent_data:/data --name portainer_edge_agent portainer/agent'); + clipboard.copyText('docker run -d -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes -v /:/host --restart always -e EDGE=1 -e EDGE_ID=' + $scope.randomEdgeID + ' -e EDGE_KEY=' + $scope.endpoint.EdgeKey +' -e CAP_HOST_MANAGEMENT=1 -v portainer_agent_data:/data --name portainer_edge_agent portainer/agent'); } else { - clipboard.copyText('docker network create --driver overlay portainer_agent_network; docker service create --name portainer_edge_agent --network portainer_agent_network -e AGENT_CLUSTER_ADDR=tasks.portainer_edge_agent -e EDGE=1 -e EDGE_ID=' + $scope.randomEdgeID + ' -e EDGE_KEY=' + $scope.endpoint.EdgeKey +' -e CAP_HOST_MANAGEMENT=1 --mode global --publish mode=host,published=8000,target=80 --constraint \'node.platform.os == linux\' --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volume --mount type=bind,src=//,dst=/host --mount type=volume,src=portainer_agent_data,dst=/data portainer/agent'); + clipboard.copyText('docker network create --driver overlay portainer_agent_network; docker service create --name portainer_edge_agent --network portainer_agent_network -e AGENT_CLUSTER_ADDR=tasks.portainer_edge_agent -e EDGE=1 -e EDGE_ID=' + $scope.randomEdgeID + ' -e EDGE_KEY=' + $scope.endpoint.EdgeKey +' -e CAP_HOST_MANAGEMENT=1 --mode global --constraint \'node.platform.os == linux\' --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volume --mount type=bind,src=//,dst=/host --mount type=volume,src=portainer_agent_data,dst=/data portainer/agent'); } $('#copyNotificationDeploymentCommand').show().fadeOut(2500); };