docui is a simple TUI Client for docker. Supported OS is Linux/Mac only.
Also, it supports UNIX domain socket, TCP, http/https.
You have to install golang and set $GOPATH and $GOBIN to ~/.bashrc.
brew intall golang
If you use Linuxbrew
on Linux, you can install via the command above.
yum install golang
apt install golang
dnf install golang
# add the following to ~/.bashrc
export GOPATH=/to/your/path
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN
resource ~/.bashrc
If you don't have docker installed, please see docker official install guide for installion instructions.
https://www.docker.com/get-started
brew install git
If you use Linuxbrew
on Linux, you can install via the above command.
yum install git
apt install git
dnf install git
This project uses Go Modules. Please use Go version 1.11.4 or higher.
Use go get or git clone:
$ go get -d github.com/skanehira/docui
$ cd $GOPATH/src/github.com/skanehira/docui
$ GO111MODULE=on go install
$ git clone https://github.com/skanehira/docui.git
$ cd docui/
$ GO111MODULE=on go install
Make sure your PATH includes the $GOPATH/bin directory so your commands can be easily used:
export PATH=$PATH:$GOPATH/bin
Use git pull:
$ git pull
$ GO111MODULE=on go install
If you want to use docui on docker.
$ docker run --rm -itv /var/run/docker.sock:/var/run/docker.sock skanehira/docui
If you want to customize image.
$ make docker-build
Refer to the keybinding for panel operations. I will explain the items of each panel here.
- Name Please enter the docker image name you want to pull. If you want to specify the version, please input as below.
mysql:5.7
Please enter the image name on the Docker Hub you want to search.
This operation works like docker search
Please enter the file path to save the selected image. It must be absolute path or relative path.
Please enter the path of the image you want to import. It must be absolute path or relative path.
Please enter the path of the image you want to load. It must be absolute path or relative path.
-
Name Container name.
-
HostPort Port of container to be mapping.
-
Port Port of the host OS to be mapped.
-
VolumeType Specify VolumeType bind or volume.
-
HostVolume If VolumeType is bind, path of the host OS that you want to mount. It's must be absolute path. It's similar to docker command
docker -v /to/host/path:/to/container/path
.
If VolumeType is volume, specify the docker volume.
It's similar to docker command docker -v docekr/volume:/to/container/path
.
-
Volume Path of the container that you want to mount. It must be an absolute path.
-
Image Selected image id.
-
Attach If you want to attach container, please Enter.
-
User If you want to attach container, please input user name.
-
Env The environment variable setting value can be defined by variables like
$PATH
. In that case, we will obtain the value from the OS environment variable. If you want to add multiple environment variables, please input as below.
GOPATH=~/go,GOBIN=~/go/bin,PATH=$PATH
- Cmd If you want to add command arguments, please input as below.
/bin/bash,hello
Please enter the file path to save the selected container. It must be an absolute or a relative path.
-
Container Selected container id.
-
Repository Please enter the image name of the committed container.
-
Tag If tag is empty, latest will be used.
-
Name Specify volume name.
-
Driver Specify volume driver name.
-
Labels Set metadata for a volume. If you want to specify multiple labels, please enter as below.
OS=Linux TYPE=nfs
- Options Set driver specific options. If you want to specify multiple options, please enter as below.
type=nfs o=addr=192.168.1.1,rw device=:/path/to/dir
Support custom endpoint:
$ docui -h
Usage of docui:
-api string
api version (default "1.39")
-ca string
ca.pem file path
-cert string
cert.pem file path
-endpoint string
Docker endpoint (default "unix:///var/run/docker.sock")
-key string
key.pem file path
-log string
log file path
-log-level string
log level (default "info")
Or set environment variables:
DOCKER_HOST
DOCKER_TLS_VERIFY
DOCKER_CERT_PATH
These environment variables take precedence over command-line options.