Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refactor(global): rename uifd to portainer
  • Loading branch information
deviantony committed Sep 4, 2016
1 parent 364756d commit 537ee24
Show file tree
Hide file tree
Showing 36 changed files with 104 additions and 111 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -7,4 +7,4 @@ bower_components
*.iml *.iml
dist dist
dist/* dist/*
ui-for-docker-checksum.txt portainer-checksum.txt
2 changes: 1 addition & 1 deletion .godir
@@ -1 +1 @@
dockerui portainer
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -6,4 +6,4 @@ VOLUME /data


EXPOSE 9000 EXPOSE 9000


ENTRYPOINT ["/ui-for-docker"] ENTRYPOINT ["/portainer"]
4 changes: 2 additions & 2 deletions LICENSE
@@ -1,4 +1,4 @@
Cloudinovasi-ui: Copyright (c) 2016 Cloudinovasi Portainer: Copyright (c) 2016 CloudInovasi


Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
Expand All @@ -16,7 +16,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.


UI For Docker: Copyright (c) 2013-2016 Michael Crosby (crosbymichael.com), Kevan Ahlquist (kevanahlquist.com), Anthony Lapenna (anthonylapenna at cloudinovasi dot id) UI For Docker: Copyright (c) 2013-2016 Michael Crosby (crosbymichael.com), Kevan Ahlquist (kevanahlquist.com), Anthony Lapenna (anthonylapenna at cloudinovasi dot id)


Expand Down
2 changes: 1 addition & 1 deletion Procfile
@@ -1 +1 @@
web: dockerui -p ":$PORT" -e "$DOCKER_ENDPOINT" web: portainer -p ":$PORT" -e "$DOCKER_ENDPOINT"
59 changes: 26 additions & 33 deletions README.md
@@ -1,16 +1,9 @@
# Cloudinovasi UI for Docker # Portainer


A fork of the amazing UI for Docker by Michael Crosby and Kevan Ahlquist (https://github.com/kevana/ui-for-docker) using the rdash-angular theme (https://github.com/rdash/rdash-angular). Portainer is a web interface for the Docker Remote API.


![Dashboard](/dashboard.png) ![Dashboard](/dashboard.png)


UI For Docker is a web interface for the Docker Remote API. The goal is to provide a pure client side implementation so it is effortless to connect and manage docker.

## Goals

* Minimal dependencies - I really want to keep this project a pure html/js app.
* Consistency - The web UI should be consistent with the commands found on the docker CLI.

## Supported Docker versions ## Supported Docker versions


The following Docker versions are supported: The following Docker versions are supported:
Expand All @@ -22,28 +15,28 @@ The following Docker versions are supported:


### Quickstart ### Quickstart


1. Run: `docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock cloudinovasi/cloudinovasi-ui` 1. Run: `docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock cloudinovasi/portainer`


2. Open your browser to `http://<dockerd host ip>:9000` 2. Open your browser to `http://<dockerd host ip>:9000`


Bind mounting the Unix socket into the UI For Docker container is much more secure than exposing your docker daemon over TCP. Bind mounting the Unix socket into the Portainer container is much more secure than exposing your docker daemon over TCP.


The `--privileged` flag is required for hosts using SELinux. The `--privileged` flag is required for hosts using SELinux.


### Specify socket to connect to Docker daemon ### Specify socket to connect to Docker daemon


By default UI For Docker connects to the Docker daemon with`/var/run/docker.sock`. For this to work you need to bind mount the unix socket into the container with `-v /var/run/docker.sock:/var/run/docker.sock`. By default Portainer connects to the Docker daemon with`/var/run/docker.sock`. For this to work you need to bind mount the unix socket into the container with `-v /var/run/docker.sock:/var/run/docker.sock`.


You can use the `--host`, `-H` flags to change this socket: You can use the `--host`, `-H` flags to change this socket:


``` ```
# Connect to a tcp socket: # Connect to a tcp socket:
$ docker run -d -p 9000:9000 cloudinovasi/cloudinovasi-ui -H tcp://127.0.0.1:2375 $ docker run -d -p 9000:9000 cloudinovasi/portainer -H tcp://127.0.0.1:2375
``` ```


``` ```
# Connect to another unix socket: # Connect to another unix socket:
$ docker run -d -p 9000:9000 cloudinovasi/cloudinovasi-ui -H unix:///path/to/docker.sock $ docker run -d -p 9000:9000 cloudinovasi/portainer -H unix:///path/to/docker.sock
``` ```


### Swarm support ### Swarm support
Expand All @@ -54,17 +47,17 @@ You can access a specific view for you Swarm cluster by defining the `--swarm` f


``` ```
# Connect to a tcp socket and enable Swarm: # Connect to a tcp socket and enable Swarm:
$ docker run -d -p 9000:9000 cloudinovasi/cloudinovasi-ui -H tcp://<SWARM_HOST>:<SWARM_PORT> --swarm $ docker run -d -p 9000:9000 cloudinovasi/portainer -H tcp://<SWARM_HOST>:<SWARM_PORT> --swarm
``` ```


*NOTE*: Due to Swarm not exposing information in a machine readable way, the app is bound to a specific version of Swarm at the moment. *NOTE*: Due to Swarm not exposing information in a machine readable way, the app is bound to a specific version of Swarm at the moment.


### Change address/port UI For Docker is served on ### Change address/port Portainer 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: Portainer listens on port 9000 by default. If you run Portainer inside a container then you can bind the container's internal port to any external address and port:


``` ```
# Expose UI For Docker on 10.20.30.1:80 # Expose Portainer on 10.20.30.1:80
$ docker run -d -p 10.20.30.1:80:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock cloudinovasi/cloudinovasi-ui $ docker run -d -p 10.20.30.1:80:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock cloudinovasi/portainer
``` ```


### Access a Docker engine protected via TLS ### Access a Docker engine protected via TLS
Expand All @@ -74,13 +67,13 @@ Ensure that you have access to the CA, the cert and the public key used to acces
These files will need to be named `ca.pem`, `cert.pem` and `key.pem` respectively. Store them somewhere on your disk and mount a volume containing these files inside the UI container: These files will need to be named `ca.pem`, `cert.pem` and `key.pem` respectively. Store them somewhere on your disk and mount a volume containing these files inside the UI container:


``` ```
$ docker run -d -p 9000:9000 cloudinovasi/cloudinovasi-ui -v /path/to/certs:/certs -H https://my-docker-host.domain:2376 --tlsverify $ docker run -d -p 9000:9000 cloudinovasi/portainer -v /path/to/certs:/certs -H https://my-docker-host.domain:2376 --tlsverify
``` ```


You can also use the `--tlscacert`, `--tlscert` and `--tlskey` flags if you want to change the default path to the CA, certificate and key file respectively: You can also use the `--tlscacert`, `--tlscert` and `--tlskey` flags if you want to change the default path to the CA, certificate and key file respectively:


``` ```
$ docker run -d -p 9000:9000 cloudinovasi/cloudinovasi-ui -v /path/to/certs:/certs -H https://my-docker-host.domain:2376 --tlsverify --tlscacert /certs/myCa.pem --tlscert /certs/myCert.pem --tlskey /certs/myKey.pem $ docker run -d -p 9000:9000 cloudinovasi/portainer -v /path/to/certs:/certs -H https://my-docker-host.domain:2376 --tlsverify --tlscacert /certs/myCa.pem --tlscert /certs/myCert.pem --tlskey /certs/myKey.pem
``` ```


*Note*: Replace `/path/to/certs` to the path to the certificate files on your disk. *Note*: Replace `/path/to/certs` to the path to the certificate files on your disk.
Expand All @@ -92,10 +85,10 @@ You can use the `--logo` flag to specify an URL to your own logo.
For example, using the Docker logo: For example, using the Docker logo:


``` ```
$ docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock cloudinovasi/cloudinovasi-ui --logo "https://www.docker.com/sites/all/themes/docker/assets/images/brand-full.svg" $ docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock cloudinovasi/portainer --logo "https://www.docker.com/sites/all/themes/docker/assets/images/brand-full.svg"
``` ```


The custom logo will replace the CloudInovasi logo in the UI. The custom logo will replace the Portainer logo in the UI.


### Hide containers with specific labels ### Hide containers with specific labels


Expand All @@ -110,38 +103,38 @@ $ docker run -d --label owner=acme nginx
You can hide it in the view by starting the ui with: You can hide it in the view by starting the ui with:


``` ```
$ docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock cloudinovasi/cloudinovasi-ui -l owner=acme $ docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock cloudinovasi/portainer -l owner=acme
``` ```


### Reverse proxy configuration ### Reverse proxy configuration


Has been tested with Nginx 1.11. Has been tested with Nginx 1.11.


Use the following configuration to host the UI at `myhost.mydomain.com/dockerui`: Use the following configuration to host the UI at `myhost.mydomain.com/portainer`:


```nginx ```nginx
upstream cloudinovasi-ui { upstream portainer {
server ADDRESS:PORT; server ADDRESS:PORT;
} }
server { server {
listen 80; listen 80;
location /dockerui/ { location /portainer/ {
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Connection ""; proxy_set_header Connection "";
proxy_pass http://cloudinovasi-ui/; proxy_pass http://portainer/;
} }
location /dockerui/ws/ { location /portainer/ws/ {
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_pass http://cloudinovasi-ui/ws/; proxy_pass http://portainer/ws/;
} }
} }
``` ```


Replace `ADDRESS:PORT` with the CloudInovasi UI container details. Replace `ADDRESS:PORT` with the Portainer container details.


### Host your own apps ### Host your own apps


Expand All @@ -153,10 +146,10 @@ For more information about hosting your own template definition and the format,


### Available options ### Available options


The following options are available for the `ui-for-docker` binary: The following options are available for the `portainer` binary:


* `--host`, `-H`: Docker daemon endpoint (default: `"unix:///var/run/docker.sock"`) * `--host`, `-H`: Docker daemon endpoint (default: `"unix:///var/run/docker.sock"`)
* `--bind`, `-p`: Address and port to serve UI For Docker (default: `":9000"`) * `--bind`, `-p`: Address and port to serve Portainer (default: `":9000"`)
* `--data`, `-d`: Path to the data folder (default: `"."`) * `--data`, `-d`: Path to the data folder (default: `"."`)
* `--assets`, `-a`: Path to the assets (default: `"."`) * `--assets`, `-a`: Path to the assets (default: `"."`)
* `--swarm`, `-s`: Swarm cluster support (default: `false`) * `--swarm`, `-s`: Swarm cluster support (default: `false`)
Expand Down
4 changes: 2 additions & 2 deletions api/main.go
@@ -1,4 +1,4 @@
package main // import "github.com/cloudinovasi/ui-for-docker" package main // import "github.com/cloudinovasi/portainer"


import ( import (
"gopkg.in/alecthomas/kingpin.v2" "gopkg.in/alecthomas/kingpin.v2"
Expand All @@ -9,7 +9,7 @@ func main() {
kingpin.Version("1.7.0") kingpin.Version("1.7.0")
var ( var (
endpoint = kingpin.Flag("host", "Dockerd endpoint").Default("unix:///var/run/docker.sock").Short('H').String() endpoint = kingpin.Flag("host", "Dockerd endpoint").Default("unix:///var/run/docker.sock").Short('H').String()
addr = kingpin.Flag("bind", "Address and port to serve UI For Docker").Default(":9000").Short('p').String() addr = kingpin.Flag("bind", "Address and port to serve Portainer").Default(":9000").Short('p').String()
assets = kingpin.Flag("assets", "Path to the assets").Default(".").Short('a').String() assets = kingpin.Flag("assets", "Path to the assets").Default(".").Short('a').String()
data = kingpin.Flag("data", "Path to the data").Default(".").Short('d').String() data = kingpin.Flag("data", "Path to the data").Default(".").Short('d').String()
tlsverify = kingpin.Flag("tlsverify", "TLS support").Default("false").Bool() tlsverify = kingpin.Flag("tlsverify", "TLS support").Default("false").Bool()
Expand Down
10 changes: 5 additions & 5 deletions app/app.js
@@ -1,13 +1,13 @@
angular.module('uifordocker', [ angular.module('portainer', [
'uifordocker.templates', 'portainer.templates',
'ui.bootstrap', 'ui.bootstrap',
'ui.router', 'ui.router',
'ui.select', 'ui.select',
'ngCookies', 'ngCookies',
'ngSanitize', 'ngSanitize',
'uifordocker.services', 'portainer.services',
'uifordocker.helpers', 'portainer.helpers',
'uifordocker.filters', 'portainer.filters',
'dashboard', 'dashboard',
'container', 'container',
'containerConsole', 'containerConsole',
Expand Down
2 changes: 1 addition & 1 deletion app/directives/header-content.js
@@ -1,5 +1,5 @@
angular angular
.module('uifordocker') .module('portainer')
.directive('rdHeaderContent', function rdHeaderContent() { .directive('rdHeaderContent', function rdHeaderContent() {
var directive = { var directive = {
requires: '^rdHeader', requires: '^rdHeader',
Expand Down
2 changes: 1 addition & 1 deletion app/directives/header-title.js
@@ -1,5 +1,5 @@
angular angular
.module('uifordocker') .module('portainer')
.directive('rdHeaderTitle', function rdHeaderTitle() { .directive('rdHeaderTitle', function rdHeaderTitle() {
var directive = { var directive = {
requires: '^rdHeader', requires: '^rdHeader',
Expand Down
2 changes: 1 addition & 1 deletion app/directives/header.js
@@ -1,5 +1,5 @@
angular angular
.module('uifordocker') .module('portainer')
.directive('rdHeader', function rdHeader() { .directive('rdHeader', function rdHeader() {
var directive = { var directive = {
scope: { scope: {
Expand Down
2 changes: 1 addition & 1 deletion app/directives/loading.js
@@ -1,5 +1,5 @@
angular angular
.module('uifordocker') .module('portainer')
.directive('rdLoading', function rdLoading() { .directive('rdLoading', function rdLoading() {
var directive = { var directive = {
restrict: 'AE', restrict: 'AE',
Expand Down
2 changes: 1 addition & 1 deletion app/directives/widget-body.js
@@ -1,5 +1,5 @@
angular angular
.module('uifordocker') .module('portainer')
.directive('rdWidgetBody', function rdWidgetBody() { .directive('rdWidgetBody', function rdWidgetBody() {
var directive = { var directive = {
requires: '^rdWidget', requires: '^rdWidget',
Expand Down
2 changes: 1 addition & 1 deletion app/directives/widget-footer.js
@@ -1,5 +1,5 @@
angular angular
.module('uifordocker') .module('portainer')
.directive('rdWidgetFooter', function rdWidgetFooter() { .directive('rdWidgetFooter', function rdWidgetFooter() {
var directive = { var directive = {
requires: '^rdWidget', requires: '^rdWidget',
Expand Down
2 changes: 1 addition & 1 deletion app/directives/widget-header.js
@@ -1,5 +1,5 @@
angular angular
.module('uifordocker') .module('portainer')
.directive('rdWidgetHeader', function rdWidgetTitle() { .directive('rdWidgetHeader', function rdWidgetTitle() {
var directive = { var directive = {
requires: '^rdWidget', requires: '^rdWidget',
Expand Down
2 changes: 1 addition & 1 deletion app/directives/widget-taskbar.js
@@ -1,5 +1,5 @@
angular angular
.module('uifordocker') .module('portainer')
.directive('rdWidgetTaskbar', function rdWidgetTaskbar() { .directive('rdWidgetTaskbar', function rdWidgetTaskbar() {
var directive = { var directive = {
requires: '^rdWidget', requires: '^rdWidget',
Expand Down
2 changes: 1 addition & 1 deletion app/directives/widget.js
@@ -1,5 +1,5 @@
angular angular
.module('uifordocker') .module('portainer')
.directive('rdWidget', function rdWidget() { .directive('rdWidget', function rdWidget() {
var directive = { var directive = {
scope: { scope: {
Expand Down
2 changes: 1 addition & 1 deletion app/shared/filters.js
@@ -1,4 +1,4 @@
angular.module('uifordocker.filters', []) angular.module('portainer.filters', [])
.filter('truncate', function () { .filter('truncate', function () {
'use strict'; 'use strict';
return function (text, length, end) { return function (text, length, end) {
Expand Down
2 changes: 1 addition & 1 deletion app/shared/helpers.js
@@ -1,4 +1,4 @@
angular.module('uifordocker.helpers', []) angular.module('portainer.helpers', [])
.factory('ImageHelper', [function ImageHelperFactory() { .factory('ImageHelper', [function ImageHelperFactory() {
'use strict'; 'use strict';
return { return {
Expand Down
2 changes: 1 addition & 1 deletion app/shared/services.js
@@ -1,4 +1,4 @@
angular.module('uifordocker.services', ['ngResource', 'ngSanitize']) angular.module('portainer.services', ['ngResource', 'ngSanitize'])
.factory('Container', ['$resource', 'Settings', function ContainerFactory($resource, Settings) { .factory('Container', ['$resource', 'Settings', function ContainerFactory($resource, Settings) {
'use strict'; 'use strict';
// Resource for interacting with the docker containers // Resource for interacting with the docker containers
Expand Down
Binary file modified assets/images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions bower.json
@@ -1,18 +1,18 @@
{ {
"name": "uifordocker", "name": "portainer",
"version": "1.7.0", "version": "1.7.0",
"homepage": "https://github.com/kevana/ui-for-docker", "homepage": "https://github.com/cloud-inovasi/portainer",
"authors": [ "authors": [
"Michael Crosby <crosbymichael@gmail.com>",
"Kevan Ahlquist <ahlquistkd@gmail.com>",
"Anthony Lapenna <anthony.lapenna@cloudinovasi.id>" "Anthony Lapenna <anthony.lapenna@cloudinovasi.id>"
], ],
"description": "A web interface for the Docker Remote API.", "description": "A web interface for the Docker Remote API.",
"keywords": [ "keywords": [
"uifordocker",
"dockerui",
"docker", "docker",
"api" "ui",
"api",
"portainer",
"uifordocker",
"dockerui"
], ],
"license": "MIT", "license": "MIT",
"ignore": [ "ignore": [
Expand Down
6 changes: 3 additions & 3 deletions examples/nginx-basic-auth/default.conf
@@ -1,5 +1,5 @@
upstream dockerui { upstream portainer {
server dockerui:9000; server portainer:9000;
} }


server { server {
Expand All @@ -12,6 +12,6 @@ server {


proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Connection ""; proxy_set_header Connection "";
proxy_pass http://dockerui; proxy_pass http://portainer;
} }
} }
6 changes: 3 additions & 3 deletions examples/nginx-basic-auth/docker-compose.yml
@@ -1,10 +1,10 @@
dockerui: portainer:
image: cloudinovasi/ui-for-docker image: cloudinovasi/portainer
command: -e http://<SWARM_HOST>:<SWARM_PORT> command: -e http://<SWARM_HOST>:<SWARM_PORT>


nginx: nginx:
build: . build: .
links: links:
- dockerui - portainer
ports: ports:
- 80:80 - 80:80

0 comments on commit 537ee24

Please sign in to comment.