From be236f9d0941aff39d13da6f8e25817ab7cc8cd7 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Mon, 14 May 2018 21:40:50 +0200 Subject: [PATCH] fix(api): fix default group for endpoint declared via -H --- api/cmd/portainer/main.go | 7 ++++--- gruntfile.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/api/cmd/portainer/main.go b/api/cmd/portainer/main.go index 0e30cf276..63563d596 100644 --- a/api/cmd/portainer/main.go +++ b/api/cmd/portainer/main.go @@ -256,9 +256,10 @@ func main() { } if len(endpoints) == 0 { endpoint := &portainer.Endpoint{ - Name: "primary", - URL: *flags.Endpoint, - Type: portainer.DockerEnvironment, + Name: "primary", + URL: *flags.Endpoint, + GroupID: portainer.EndpointGroupID(1), + Type: portainer.DockerEnvironment, TLSConfig: portainer.TLSConfiguration{ TLS: *flags.TLSVerify, TLSSkipVerify: *flags.TLSSkipVerify, diff --git a/gruntfile.js b/gruntfile.js index a3b79f67f..b5f0e5574 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -269,7 +269,7 @@ function shell_buildBinary(p, a) { function shell_run(arch) { return [ 'docker rm -f portainer', - 'docker run -d -p 9000:9000 -v $(pwd)/dist:/app -v /tmp/portainer:/data -v /var/run/docker.sock:/var/run/docker.sock:z --name portainer portainer/base /app/portainer-linux-' + arch + ' --no-analytics' + 'docker run -d -p 9000:9000 -v $(pwd)/dist:/app -v /tmp/portainer:/data -v /var/run/docker.sock:/var/run/docker.sock:z --name portainer portainer/base /app/portainer-linux-' + arch + ' --no-analytics -H unix:///var/run/docker.sock' ].join(';'); }