Docker 服務(wù)終端 UI 管理工具

這是一個(gè)簡單的基于終端的 UI 管理工具,主要適用于對 docker 和 docker-compose 容器以及服務(wù)的管理和便捷使用,靈感來自于 gocui 并使用 Go 語言改寫。

1.功能特性
輕度用戶使用尚可,可不要把它當(dāng)做是一個(gè)專業(yè)的管理工具,哈哈哈
查看docker或docker-compose容器環(huán)境的狀態(tài)一目了然
查看container/service的日志
查看容器指標(biāo)的ascii圖表,如CPU/內(nèi)存等
自定義這些圖表以測量您想要的幾乎任何指標(biāo)
直接進(jìn)入到container/service上
重新啟動/刪除/重建containers/services
查看給定圖像的祖先圖層
修剪占用磁盤空間的容器/映像或卷

2.安裝方式
安裝也很方便
Homebrew
# Homebrew
brew tap jesseduffield/lazydocker
brew install lazydocker
Linux/OSX
# Binary Release (Linux/OSX)
curl https://raw.githubusercontent.com/jesseduffield/ \
lazydocker/master/scripts/install_update_linux.sh | bash
Go
# Go
# Required Go version >= 1.8
go get github.com/jesseduffield/lazydocker
Zsh
# zsh config
echo "alias lzd='lazydocker'" >> ~/.zshrc
Docker
# docker build -t lazydocker .
# docker run -it lazydocker:latest /bin/sh -l
FROM golang:alpine
WORKDIR /go/src/github.com/jesseduffield/lazydocker/
COPY ./ .
RUN CGO_ENABLED=0 GOOS=linux go build
FROM alpine:latest
RUN apk add -U git xdg-utils
WORKDIR /go/src/github.com/jesseduffield/lazydocker/
COPY --from=0 /go/src/github.com/jesseduffield/lazydocker /go/src/github.com/jesseduffield/lazydocker
COPY --from=0 /go/src/github.com/jesseduffield/lazydocker/lazydocker /bin/
RUN echo "alias gg=lazydocker" >> ~/.profile
3. 鍵盤綁定
快捷鍵使用起來更方便
Project
e: edit lazydocker config
o: open lazydocker config
[: previous tab
]: next tab
m: view logs
enter: focus main panel
Containers
[: previous tab
]: next tab
d: remove
e: Hide/Show stopped containers
s: stop
r: restart
a: attach
D: prune exited containers
m: view logs
c: run predefined custom command
enter: focus main panel
Services
d: remove containers
s: stop
r: restart
a: attach
m: view logs
[: previous tab
]: next tab
R: view restart options
c: run predefined custom command
enter: focus main panel
Images
[: previous tab
]: next tab
d: remove image
D: prune unused images
enter: focus main panel
Volumes
[: previous tab
]: next tab
d: remove volume
D: prune unused volumes
enter: focus main panel
Main
esc: return
作者: Escape
鏈接: https://escapelife.github.io/posts/505ebc76.html
文章轉(zhuǎn)自: 民工哥技術(shù)之路

評論
圖片
表情
