From 9ca2aa9bbd9ae9d3adbbc2481d1cd1b71438f2ac Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Tue, 21 Jun 2016 12:27:32 +1200 Subject: [PATCH] refactor(dockerui): replace -s flag with -swarm --- README.md | 7 ++++--- dockerui.go | 2 +- gruntFile.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 42a937257..bda4ee10c 100644 --- a/README.md +++ b/README.md @@ -26,15 +26,16 @@ By default UI For Docker connects to the Docker daemon with`/var/run/docker.sock You can use the `-e` flag to change this socket: # Connect to a tcp socket: - $ docker run -d -p 9000:9000 --privileged cloudinovasi/cloudinovasi-ui -e http://127.0.0.1:2375 + $ docker run -d -p 9000:9000 cloudinovasi/cloudinovasi-ui -e http://127.0.0.1:2375 ### Swarm support -You can access a specific view for you Swarm cluster by defining the `-s` option: +You can access a specific view for you Swarm cluster by defining the `-swarm` flag: # Connect to a tcp socket and enable Swarm: - $ docker run -d -p 9000:9000 --privileged cloudinovasi/cloudinovasi-ui -e http://: -s + $ docker run -d -p 9000:9000 cloudinovasi/cloudinovasi-ui -e http://: -swarm +*NOTE*: At the moment, only *Swarm 1.2.0* is supported. ### Change address/port UI For Docker is served on UI For Docker listens on port 9000 by default. If you run UI For Docker inside a container then you can bind the container's internal port to any external address and port: diff --git a/dockerui.go b/dockerui.go index fd20836b7..6d51a16a0 100644 --- a/dockerui.go +++ b/dockerui.go @@ -21,7 +21,7 @@ var ( endpoint = flag.String("e", "/var/run/docker.sock", "Dockerd endpoint") addr = flag.String("p", ":9000", "Address and port to serve UI For Docker") assets = flag.String("a", ".", "Path to the assets") - swarm = flag.Bool("s", false, "Swarm mode") + swarm = flag.Bool("swarm", false, "Swarm mode") authKey []byte authKeyFile = "authKey.dat" ) diff --git a/gruntFile.js b/gruntFile.js index 429f2d957..51df529df 100644 --- a/gruntFile.js +++ b/gruntFile.js @@ -267,7 +267,7 @@ module.exports = function (grunt) { command: [ 'docker stop ui-for-docker', 'docker rm ui-for-docker', - 'docker run --privileged -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --name ui-for-docker ui-for-docker -s' + 'docker run --privileged -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --name ui-for-docker ui-for-docker -swarm' ].join(';') }, cleanImages: {