docker-webui

command module
v0.0.0-...-e933087 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2017 License: MIT Imports: 9 Imported by: 0

README

Docker Web-UI

Supported tags and respective Dockerfile links:
・latest (production/Dockerfile)

Description

A web user-interface for docker.
(日本語はこちら)

Features

handling docker containers

  • search containers (by status, labels, query strings)
  • inspect, top, stats, logs, diff, rename, commit
  • start, stop, restart, kill, rm
  • search its image

tailing containers' logs

  • filter target containers by labels
  • monitoring logs (10~200 lines each) every specified seconds

watch containers' statistics

  • filter target containers by labels
  • display CPU & memory on running containers by charts
  • details on the bottom table

watch specified container's logs & stats

  • monitoring logs (10~200 lines each) every specified seconds
  • you can check CPUs & memorys at the same time

handling docker images

  • search images (by labels, query strings)
  • docker pull a new image
  • docker pull the same image again
  • inspect, history, tag, rmi

Usage

1. Run the application

as a docker-compose service

monit:
  image: pottava/docker-webui
  ports:
    - "9000:9000"
  volumes:
    - "${DOCKER_CERT_PATH}:/etc/docker-compose/cert"
  environment:
    - DOCKER_HOST
    - DOCKER_CERT_PATH=/etc/docker-compose/cert
    - APP_LABEL_OVERRIDE_NAMES=com.docker.compose.service
    - APP_LABEL_FILTERS=com.docker.compose.service

or as a simple docker container

$ docker run -p 9000:9000 --rm -v /var/run/docker.sock:/var/run/docker.sock pottava/docker-webui
$ docker run -p 9000:9000 --rm -e DOCKER_HOST -e DOCKER_CERT_PATH=/etc/docker-compose/cert -v $DOCKER_CERT_PATH:/etc/docker-compose/cert pottava/docker-webui

or as a go binary

$ go get github.com/pottava/docker-webui
$ docker-webui

2. Access to the following URL

http://localhost:9000/

Startup Options

You can set environment variables or use config.json to configure the application.

Option (config.json) Environment Variables Description Default
Name APP_NAME name of this application 'docker web-ui'
Port APP_PORT port the app is listening on 9000
  CONFIG_FILE_PATH path of config.json '/etc/docker-webui/config.json'
ViewOnly APP_VIEW_ONLY if you set true, you cannot change docker state false
LogLevel APP_LOG_LEVEL 1:fatal, 2:err, 3:warn, 4:info, 5:debug, 6:trace 4
LabelOverrideNames APP_LABEL_OVERRIDE_NAMES override containers name by its label value
LabelFilters APP_LABEL_FILTERS labels for filtering containers & images ['all']
DockerEndpoints DOCKER_HOST docker API endpoints (tcp or socket) [unix:///var/run/docker.sock]
DockerCertPath DOCKER_CERT_PATH set certifications' absolute path on the host ['']
DockerPullBeginTimeout DOCKER_PULL_BEGIN_TIMEOUT timeout of docker pull to start 3 * time.Minute
DockerPullTimeout DOCKER_PULL_TIMEOUT timeout of docker pull 2 * time.Hour
DockerStatTimeout DOCKER_STAT_TIMEOUT timeout of docker stat 5 * time.Second
DockerStartTimeout DOCKER_START_TIMEOUT timeout of docker start 10 * time.Second
DockerStopTimeout DOCKER_STOP_TIMEOUT timeout of docker stop 10 * time.Second
DockerRestartTimeout DOCKER_RESTART_TIMEOUT timeout of docker restart 10 * time.Second
DockerKillTimeout DOCKER_KILL_TIMEOUT timeout of docker kill 10 * time.Second
DockerRmTimeout DOCKER_RM_TIMEOUT timeout of docker rm 5 * time.Minute
DockerCommitTimeout DOCKER_COMMIT_TIMEOUT timeout of docker commit 30 * time.Second
StaticFileHost APP_STATIC_FILE_HOST host name which provides static files
StaticFilePath APP_STATIC_FILE_PATH static file path on the host '$GOPATH + /src/github.com/pottava/docker-webui/app'
PathPrefix APP_PATH_PREFIX URL Path prefix for path based routing
PreventSelfStop APP_PREVENT_SELF_STOP prevent to stop this app itself if you set true true
HiddenContainers APP_HIDDEN_CONTAINERS hide specified containers if you like []

Contribution

  1. Fork (https://github.com/pottava/docker-webui/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Create new Pull Request

Code released under the MIT license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
config
Package config defines application's configurations
Package config defines application's configurations
controllers
Package controllers implements functions to route user requests
Package controllers implements functions to route user requests
http
Package http provides a convenient way to impliment http servers
Package http provides a convenient way to impliment http servers
logs
Package logs defines log helper functions
Package logs defines log helper functions
misc
Package misc defines miscellaneous useful functions
Package misc defines miscellaneous useful functions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL