Docker 服務終端 UI 管理工具

這是一個簡單的基於終端的 UI 管理工具,主要適用於對 docker 和 docker-compose 容器以及服務的管理和便捷使用,靈感來自於 gocui 並使用 Go 語音改寫。html

Docker 服務終端 UI 管理工具

1.功能特性

輕度用戶使用尚可,可不要把它當作是一個專業的管理工具,哈哈哈linux

  • 查看docker或docker-compose容器環境的狀態一目瞭然git

  • 查看container/service的日誌github

  • 查看容器指標的ascii圖表,如CPU/內存等golang

  • 自定義這些圖表以測量您想要的幾乎任何指標docker

  • 直接進入到container/service上bash

  • 從新啓動/刪除/重建containers/servicescurl

  • 查看給定圖像的祖先圖層ide

  • 修剪佔用磁盤空間的容器/映像或卷

Docker 服務終端 UI 管理工具

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(版權歸原做者全部,侵刪)

相關文章
相關標籤/搜索