lazydocker

lazydocker

Go语言开发的Docker终端管理工具

lazydocker是一个基于Go语言的Docker和docker-compose终端界面工具,提供容器状态监控、日志查看和操作执行等功能。该项目简化了Docker管理流程,提升开发效率。支持多种安装方式,拥有活跃的开源社区支持。

lazydockerDocker终端界面容器管理Go语言Github开源项目
<div align="center"> <sup>特别感谢:</sup> <br> <br> <a href="https://www.warp.dev/?utm_source=github&utm_medium=referral&utm_campaign=lazydocker_20231023"> <div> <img src="https://yellow-cdn.veclightyear.com/835a84d5/f2ec0d8d-a957-4e05-9cb3-c5ec3cca4762.png" width="230" alt="Warp"> </div> <b>Warp是一个基于Rust的现代终端,内置AI功能,可以帮助您和您的团队更快地构建优秀的软件。</b> <div> <sup>访问warp.dev了解更多信息。</sup> </div> </a> <br> <hr> <a href="https://www.subble.com"> <div> <img src="https://yellow-cdn.veclightyear.com/835a84d5/ccc5c7e5-7e9c-4792-88af-2c4280a62b35.svg" width="230" alt="Subble"> </div> <b>我(Jesse)共同创立了Subble,通过帮助您管理公司的软件订阅来节省时间和金钱。快来看看吧!</b> </a> <br> <hr> </div> <p align="center"> <img src="https://yellow-cdn.veclightyear.com/835a84d5/cb8546de-f974-4a6a-88db-18999ed8e400.png"> </p>

一个简单的终端UI,适用于docker和docker-compose,使用Go语言和gocui库编写。

CI Go Report Card GolangCI GoDoc GitHub repo size GitHub Releases GitHub tag homebrew

Gif

演示

赞助商

<p align="center"> 本项目的维护得益于所有<a href="https://github.com/jesseduffield/lazydocker/graphs/contributors">贡献者</a>和<a href="https://github.com/sponsors/jesseduffield">赞助商</a>。如果您想赞助这个项目并在下方显示您的头像或公司logo,请<a href="https://github.com/sponsors/jesseduffield">点击这里</a>。💙 </p> <p align="center"> <!-- 赞助商 --><a href="https://github.com/intabulas"><img src="https://yellow-cdn.veclightyear.com/835a84d5/eed95362-bfdd-4727-92e7-cccb6026866d.png" width="60px" alt="Mark Lussier" /></a><a href="https://github.com/peppy"><img src="https://yellow-cdn.veclightyear.com/835a84d5/bc3a309e-bff2-4702-aa3a-e23279020649.png" width="60px" alt="Dean Herbert" /></a><a href="https://github.com/piot"><img src="https://yellow-cdn.veclightyear.com/835a84d5/639cc362-04e8-452c-8201-927afc76eb30.png" width="60px" alt="Peter Bjorklund" /></a><a href="https://github.com/rgwood"><img src="https://yellow-cdn.veclightyear.com/835a84d5/3d1fa556-9c88-4527-aa0b-26e540543256.png" width="60px" alt="Reilly Wood" /></a><a href="https://github.com/oliverguenther"><img src="https://yellow-cdn.veclightyear.com/835a84d5/7d2bea41-60db-4acf-8d1b-f4cbaef40078.png" width="60px" alt="Oliver Günther" /></a><a href="https://github.com/pawanjay176"><img src="https://yellow-cdn.veclightyear.com/835a84d5/3810e4a9-277b-4768-9a4a-9e9b34789bfa.png" width="60px" alt="Pawan Dhananjay" /></a><a href="https://github.com/bdach"><img src="https://yellow-cdn.veclightyear.com/835a84d5/faf9992a-e99e-4d77-be42-2c9791419860.png" width="60px" alt="Bartłomiej Dach" /></a><a href="https://github.com/davidklsn"><img src="https://yellow-cdn.veclightyear.com/835a84d5/d322ed8f-1a72-4390-8237-2fbd56a98895.png" width="60px" alt="David Karlsson" /></a><a href="https://github.com/carstengehling"><img src="https://yellow-cdn.veclightyear.com/835a84d5/4c97a22d-0a3d-49bd-a0d8-39dca3886fdb.png" width="60px" alt="Carsten Gehling" /></a><a href="https://github.com/ceuk"><img src="https://yellow-cdn.veclightyear.com/835a84d5/bef49a2a-cac6-4f8a-8482-107b3c1e9e9e.png" width="60px" alt="CEUK" /></a><a href="https://github.com/akospwc"><img src="https://yellow-cdn.veclightyear.com/835a84d5/a131cd20-cdf4-478b-b60a-b598962d8900.png" width="60px" alt="Akos Putz" /></a><a href="https://github.com/Xetera"><img src="https://yellow-cdn.veclightyear.com/835a84d5/32245a8d-a8bb-427b-a7a5-d2a5aababc0d.png" width="60px" alt="Xetera" /></a><a href="https://github.com/HoldenLucas"><img src="https://yellow-cdn.veclightyear.com/835a84d5/83a4ca90-c5a5-44b2-86cd-16b58a54a034.png" width="60px" alt="Holden Lucas" /></a><a href="https://github.com/nartc"><img src="https://yellow-cdn.veclightyear.com/835a84d5/f039e6fd-309c-48a1-b6e8-2604f342b434.png" width="60px" alt="Chau Tran" /></a><a href="https://github.com/matejcik"><img src="https://yellow-cdn.veclightyear.com/835a84d5/f2a77b34-8ed3-4cf1-9143-3580125d77fb.png" width="60px" alt="matejcik" /></a><a href="https://github.com/lucatume"><img src="https://yellow-cdn.veclightyear.com/835a84d5/c21457ea-7856-49ee-8d77-63f3ed277398.png" width="60px" alt="theAverageDev (Luca Tumedei)" /></a><a href="https://github.com/IvanZuy"><img src="https://yellow-cdn.veclightyear.com/835a84d5/e8550407-e488-4172-8ba4-ea06ffa46e41.png" width="60px" alt="Ivan Zaitsev" /></a><a href="https://github.com/nicholascloud"><img src="https://yellow-cdn.veclightyear.com/835a84d5/260165b0-0cde-43ef-92ed-ae778d2ce465.png" width="60px" alt="Nicholas Cloud" /></a><a href="https://github.com/PhotonQuantum"><img src="https://yellow-cdn.veclightyear.com/835a84d5/43e6445b-057f-41e2-b9fa-d48d60640815.png" width="60px" alt="LightQuantum" /></a><a href="https://github.com/GitSquared"><img src="https://yellow-cdn.veclightyear.com/835a84d5/e1899120-d652-46ef-b18f-d08f3569bf7c.png" width="60px" alt="Gabriel Saillard" /></a><a href="https://github.com/ava1ar"><img src="https://yellow-cdn.veclightyear.com/835a84d5/9bc77ac1-1823-4a2a-83b2-c253a899f460.png" width="60px" alt="Aliaksandr Stelmachonak" /></a><a href="https://github.com/minidfx"><img src="https://yellow-cdn.veclightyear.com/835a84d5/0b36d7a0-fd46-484a-9738-33f524e042c3.png" width="60px" alt="Burgy Benjamin" /></a><a href="https://github.com/JoeKlemmer"><img src="https://yellow-cdn.veclightyear.com/835a84d5/fc7e9219-c2ac-4923-8d71-c9283619fe10.png" width="60px" alt="Joe Klemmer" /></a><a href="https://github.com/tobi"><img src="https://yellow-cdn.veclightyear.com/835a84d5/54ea9a42-8dbd-48fe-b970-e036522558d4.png" width="60px" alt="Tobias Lütke" /></a><a href="https://github.com/benbfortis"><img src="https://yellow-cdn.veclightyear.com/835a84d5/86567398-7a19-4de2-b4df-a67f24b278aa.png" width="60px" alt="Ben Beaumont" /></a><a href="https://github.com/jakewarren"><img src="https://yellow-cdn.veclightyear.com/835a84d5/60549dd7-85ea-47d0-be97-fe71abb3fc11.png" width="60px" alt="" /></a><a href="https://github.com/tgpholly"><img src="https://yellow-cdn.veclightyear.com/835a84d5/eccee832-9c69-4c23-9880-6cf3040e38b5.png" width="60px" alt="Holly" /></a><a href="https://github.com/jisantuc"><img src="https://yellow-cdn.veclightyear.com/835a84d5/e3e3c09f-60da-4f3b-8c21-55d8d6afeac2.png" width="60px" alt="James Santucci" /></a><a href="https://github.com/bitprophet"><img src="https://yellow-cdn.veclightyear.com/835a84d5/0d3c596e-916f-4845-9347-2ef07bc573ed.png" width="60px" alt="Jeff Forcier" /></a><a href="https://github.com/tayleighr"><img src="https://yellow-cdn.veclightyear.com/835a84d5/a7caf555-9790-422b-b206-17f8272434a7.png" width="60px" alt="" /></a><a href="https://github.com/Novakov"><img src="https://yellow-cdn.veclightyear.com/835a84d5/85c3fd8b-5f51-49dd-b0a4-5fe0e3b5ab81.png" width="60px" alt="Maciej T. Nowak" /></a><a href="https://github.com/farzadmf"><img src="https://yellow-cdn.veclightyear.com/835a84d5/f8d140bc-7c00-42b9-a8dd-a7ba2a696c97.png" width="60px" alt="Farzad Majidfayyaz" /></a><a href="https://github.com/nekhaevskiy"><img src="https://yellow-cdn.veclightyear.com/835a84d5/2f6821ec-fb9b-460a-96a8-7c685f285128.png" width="60px" alt="Yury" /></a><a href="https://github.com/reivilibre"><img src="https://yellow-cdn.veclightyear.com/835a84d5/e4378673-a48d-438f-8562-80a72a6f9c8c.png" width="60px" alt="" /></a><a href="https://github.com/andreaskurth"><img src="https://yellow-cdn.veclightyear.com/835a84d5/f4022fb9-8ee3-446c-900f-d5626c86013c.png" width="60px" alt="Andreas Kurth" /></a><a href="https://github.com/BSteffaniak"><img src="https://yellow-cdn.veclightyear.com/835a84d5/b84e1f48-cf55-41c0-a0a7-108d11011d38.png" width="60px" alt="Braden Steffaniak" /></a><a href="https://github.com/jordan-gillard"><img src="https://yellow-cdn.veclightyear.com/835a84d5/bffb1274-8e14-48d3-be9e-c7167de102ad.png" width="60px" alt="Jordan Gillard" /></a><a href="https://github.com/smangels"><img src="https://yellow-cdn.veclightyear.com/835a84d5/98daef03-f7f1-4a0f-91c3-139668f2a033.png" width="60px" alt="Sebastian" /></a><a href="https://github.com/George-Spanos"><img src="https://yellow-cdn.veclightyear.com/835a84d5/ef829d9b-3f91-4480-a639-9305dcecd9fd.png" width="60px" alt="George Spanos" /></a><a href="https://github.com/frantisekstanko"><img src="https://yellow-cdn.veclightyear.com/835a84d5/d300dc87-80bc-4ae4-aad0-1dfba900a8a3.png" width="60px" alt="Frantisek Stanko" /></a><a href="https://github.com/amslezak"><img src="https://yellow-cdn.veclightyear.com/835a84d5/e02065f1-2f82-4fb2-badb-d3d587d0693e.png" width="60px" alt="Andy Slezak" /></a><a href="https://github.com/mkock"><img src="https://yellow-cdn.veclightyear.com/835a84d5/4ed8c879-2860-45d5-9fa5-333f4107ac87.png" width="60px" alt="Martin Kock" /></a><a href="https://github.com/illarionvk"><img src="https://yellow-cdn.veclightyear.com/835a84d5/65c4b300-d2d4-4c99-9e8c-d2f9a826cc40.png" width="60px" alt="Illarion Koperski" /></a><a href="https://github.com/WhiteBlackGoose"><img src="https://yellow-cdn.veclightyear.com/835a84d5/2412b003-25b9-4930-83a9-d12674eb2940.png" width="60px" alt="" /></a><a href="https://github.com/jessealama"><img src="https://yellow-cdn.veclightyear.com/835a84d5/46b160a6-e03b-4484-aa27-f9990e91f731.png" width="60px" alt="Jesse Alama" /></a><a href="https://github.com/codacy"><img src="https://yellow-cdn.veclightyear.com/835a84d5/58ec8cbb-4c0e-4923-b434-c4d05b51c6ad.png" width="60px" alt="Codacy" /></a><a href="https://github.com/colbr"><img src="https://yellow-cdn.veclightyear.com/835a84d5/96f7f96f-5a96-4f1b-8dd4-16af4bd6e899.png" width="60px" alt="Brett" /></a><a href="https://github.com/heijmans"><img src="https://yellow-cdn.veclightyear.com/835a84d5/eb9ef7f0-ff0f-46df-8c2e-388bc0583b8c.png" width="60px" alt="Jan Heijmans" /></a><a href="https://github.com/Vesther"><img src="https://yellow-cdn.veclightyear.com/835a84d5/7869ef83-6f48-4d19-a919-ff832158cd6a.png" width="60px" alt="Kevin Nowald" /></a><a href="https://github.com/sempruijs"><img src="https://yellow-cdn.veclightyear.com/835a84d5/0d539431-92b8-4343-969e-35440c2ab053.png" width="60px" alt="sem pruijs" /></a><a href="https://github.com/omarluq"><img src="https://yellow-cdn.veclightyear.com/835a84d5/92c90263-146b-47b6-ae0f-c9f1a18249c2.png" width="60px" alt="Omar Luq " /></a><a href="https://github.com/ethanjli"><img src="https://yellow-cdn.veclightyear.com/835a84d5/b6bd2597-ee6c-454f-a715-49348852d312.png" width="60px" alt="Ethan Li" /></a><a href="https://github.com/phubaba"><img src="https://yellow-cdn.veclightyear.com/835a84d5/d8820770-a022-46ae-89b7-c5b8fb88b634.png" width="60px" alt="" /></a><a href="https://github.com/fomrat"><img src="https://yellow-cdn.veclightyear.com/835a84d5/737cc0ed-86b5-4283-a0c8-5482b7c72ebd.png" width="60px" alt="Brian MacAskill" /></a><a href="https://github.com/canhazcodez"><img src="https://yellow-cdn.veclightyear.com/835a84d5/50a1f9a1-ea9c-46e9-b9be-30458da0dba5.png" width="60px" alt="Maxi" /></a><a href="https://github.com/nikbrunner"><img src="https://yellow-cdn.veclightyear.com/835a84d5/c787fb4e-dcd5-496f-aa56-f8c281de8451.png" width="60px" alt="nbr" /></a><a href="https://github.com/neunkasulle"><img src="https://yellow-cdn.veclightyear.com/835a84d5/8804dfaa-9a62-4f1b-9f7d-e662de76dba0.png" width="60px" alt="Jan Zenkner" /></a><a href="https://github.com/ahkohd"><img src="https://yellow-cdn.veclightyear.com/835a84d5/f10342ce-ba17-48ea-a815-31a22c978861.png" width="60px" alt="Victor Aremu" /></a><a href="https://github.com/RVxLab"><img src="https://yellow-cdn.veclightyear.com/835a84d5/4e8f1b32-0aad-40c3-9960-6db97eb1c5ad.png" width="60px" alt="" /></a><a href="https://github.com/igor-ramazanov"><img src="https://yellow-cdn.veclightyear.com/835a84d5/7002cd82-e6b5-44c5-b04e-f5b9f24e4472.png" width="60px" alt="Igor Ramazanov" /></a><a href="https://github.com/glotchimo"><img src="https://yellow-cdn.veclightyear.com/835a84d5/23f6b213-078c-40a0-8e40-41ac570ee7ed.png" width="60px" alt="Elliott Maguire" /></a><a href="https://github.com/n8nio"><img src="https://yellow-cdn.veclightyear.com/835a84d5/0a3cca00-b38a-4694-ac68-7356ba69e7b8.png" width="60px" alt="n8n - 工作流自动化" /></a><a href="https://github.com/kaleballmon"><img src="https://yellow-cdn.veclightyear.com/835a84d5/84ab54a4-c08b-424d-b271-e05fba7d7f5b.png" width="60px" alt="kaleb allmon" /></a><a href="https://github.com/joshuadavidthomas"><img src="https://yellow-cdn.veclightyear.com/835a84d5/371ad342-1d81-452e-86ef-e7fccced0c0a.png" width="60px" alt="Josh Thomas" /></a><a href="https://github.com/josephjacks"><img src="https://yellow-cdn.veclightyear.com/835a84d5/b5caaae5-69af-44ca-a4cb-179afaa17a6a.png" width="60px" alt="JJ" /></a><a href="https://github.com/FrederickGeek8"><img src="https://yellow-cdn.veclightyear.com/835a84d5/20a4b69f-e29f-4bec-a79f-72dd7c5d6579.png" width="60px" alt="Frederick Morlock" /></a><a href="https://github.com/agrippanux"><img src="https://yellow-cdn.veclightyear.com/835a84d5/ba40b45c-13f8-408c-b2f9-8d12674d2647.png" width="60px" alt="Darren Craine" /></a><a href="https://github.com/ezdac"><img src="https://yellow-cdn.veclightyear.com/835a84d5/bfc2442f-388b-4bda-a6cd-3d81dc79527e.png" width="60px" alt="Maximilian Langenfeld" /></a><a href="https://github.com/sarzhann"><img src="https://yellow-cdn.veclightyear.com/835a84d5/339611e6-11a4-4033-a59a-f5a9e69a5f13.png" width="60px" alt="Nurzhan" /></a><a href="https://github.com/dbuls"><img src="https://yellow-cdn.veclightyear.com/835a84d5/77e4fa27-575f-4813-a686-e2795dd54370.png" width="60px" alt="Davis Buls" /></a><a href="https://github.com/MGreek"><img src="https://yellow-cdn.veclightyear.com/835a84d5/589f0ca2-cb08-4745-8cb1-40e512146d2f.png" width="60px" alt="Grec Marc" /></a><a href="https://github.com/sainu"><img src="https://yellow-cdn.veclightyear.com/835a84d5/e67729ce-8f7b-4667-8120-9c3b979cbcf8.png" width="60px" alt="sainu" /></a><a href="https://github.com/mguellsegarra"><img src="https://yellow-cdn.veclightyear.com/835a84d5/9f497246-2791-4f16-b027-4121a6105420.png" width="60px" alt="Marc Güell Segarra" /></a><a href="https://github.com/lppassos"><img src="https://yellow-cdn.veclightyear.com/835a84d5/77efd3f8-51a1-46c0-87d5-8716b299d44b.png" width="60px" alt="" /></a><a href="https://github.com/chrisolsen"><img src="https://yellow-cdn.veclightyear.com/835a84d5/5a0fa7c0-bb74-4c34-b535-30c5a0b90f56.png" width="60px" alt="克里斯·奥尔森" /></a><a href="https://github.com/vladimir-popov"><img src="https://yellow-cdn.veclightyear.com/835a84d5/6e196718-506e-43f0-96bc-58483b7412b4.png" width="60px" alt="弗拉基米尔·波波夫" /></a><a href="https://github.com/neilcode"><img src="https://yellow-cdn.veclightyear.com/835a84d5/2973413a-7298-41fd-a3a8-8df00613379a.png" width="60px" alt="尼尔·兰伯特" /></a><a href="https://github.com/shaungarwood"><img src="https://yellow-cdn.veclightyear.com/835a84d5/c9c27d10-eb7e-48a2-ac18-8120d29465d0.png" width="60px" alt="肖恩·加伍德" /></a><a href="https://github.com/dhh"><img src="https://yellow-cdn.veclightyear.com/835a84d5/a7fcdcc3-8c6b-4936-bd61-2ad74c1024f8.png" width="60px" alt="大卫·海涅迈尔·汉森" /></a><a href="https://github.com/wayanjimmy"><img src="https://yellow-cdn.veclightyear.com/835a84d5/4fcc43cb-5780-4016-8c67-47b9b486e5d2.png" width="60px" alt="瓦扬·吉米" /></a><!-- 赞助商 --> </p> ## 梗概

小吐槽来了:某些东西不工作了?也许是某个服务宕机了。docker-compose ps。没错,就是那个仍有bug的微服务。没问题,我只需重启它:docker-compose restart。好了,现在再试一次。哦等等,问题依然存在。嗯。docker-compose ps。看来服务刚启动就立即停止了。如果我一直在读取日志流的话,可能早就知道了,但其他服务的日志太杂乱了。我可以用docker compose logs --follow myservice只获取那个服务的日志,但每次服务宕机时这个命令也会终止,所以我每次重启服务时都得重新运行这个命令。另一种选择是运行docker-compose up myservice,这样如果服务宕机了,我可以在那个终端窗口再次up它,但现在即使我不再关心它的日志,这个服务也会占用一个终端窗口。我猜当我想收回终端空间时可以用ctrl+P,Q,但是...等等,这不知为何不起作用。我该用ctrl+C吗?我记不清这是关闭前台进程还是杀死实际服务。

真是让人头疼!

记住docker命令很难。记住别名稍微容易一些。在多个终端窗口中跟踪容器几乎是不可能的。如果你能在一个终端窗口中获得所需的所有信息,每个常用命令只需按一个键就能执行(还能添加自定义命令),那该多好。Lazydocker的目标就是让这个梦想成真。

要求

  • Docker >= 1.13 (API >= 1.25)
  • Docker-Compose >= 1.23.2 (可选)

安装

Homebrew

通常可以在Homebrew核心仓库中找到lazydocker配方,但我们建议你使用我们的配方以获得更频繁的更新。它也适用于Linux。

使用Tap:

brew install jesseduffield/lazydocker/lazydocker

使用Core:

brew install lazydocker

Scoop (Windows)

你可以使用scoop安装lazydocker

scoop install lazydocker

Chocolatey (Windows)

你可以使用Chocolatey安装lazydocker

choco install lazydocker

asdf-vm

你可以使用asdf-vm安装asdf-lazydocker插件

设置(仅一次)

asdf plugin add lazydocker https://github.com/comdotlinux/asdf-lazydocker.git

安装/升级

asdf list all lazydocker asdf install lazydocker latest asdf global lazydocker latest

二进制发布版(Linux/OSX/Windows)

你可以从发布页面手动下载二进制发布版。

自动安装/更新,别忘了始终验证你通过管道传输到bash的内容:

curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash

该脚本默认将下载的二进制文件安装到$HOME/.local/bin目录,但可以通过设置DIR环境变量来更改。

Go

需要Go版本 >= 1.19

go install github.com/jesseduffield/lazydocker@latest

需要Go版本 >= 1.8, <= 1.17

go get github.com/jesseduffield/lazydocker

Arch Linux AUR

你可以通过运行以下命令使用AUR安装lazydocker:

yay -S lazydocker

Docker

Docker拉取次数 Docker星标 Docker自动化

  1. <details><summary>如果你使用ARM设备,请点击此处</summary><p>
    • 如果你使用ARM 32位 v6架构

      docker build -t lazyteam/lazydocker \ --build-arg BASE_IMAGE_BUILDER=arm32v6/golang \ --build-arg GOARCH=arm \ --build-arg GOARM=6 \ https://github.com/jesseduffield/lazydocker.git
    • 如果你使用ARM 32位 v7架构

      docker build -t lazyteam/lazydocker \ --build-arg BASE_IMAGE_BUILDER=arm32v7/golang \ --build-arg GOARCH=arm \ --build-arg GOARM=7 \ https://github.com/jesseduffield/lazydocker.git
    • 如果你使用ARM 64位 v8架构

      docker build -t lazyteam/lazydocker \ --build-arg BASE_IMAGE_BUILDER=arm64v8/golang \ --build-arg GOARCH=arm64 \ https://github.com/jesseduffield/lazydocker.git
    </p></details>
  2. 运行容器

    docker run --rm -it -v \ /var/run/docker.sock:/var/run/docker.sock \ -v /yourpath:/.config/jesseduffield/lazydocker \ lazyteam/lazydocker
    • 别忘了将/yourpath更改为你创建用于存储lazydocker配置的实际路径

    • 你也可以使用这个docker-compose.yml

    • 你可能想创建一个别名,例如:

      echo "alias lzd='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v /yourpath/config:/.config/jesseduffield/lazydocker lazyteam/lazydocker'" >> ~/.zshrc

对于开发,你可以使用以下命令构建镜像:

git clone https://github.com/jesseduffield/lazydocker.git cd lazydocker docker build -t lazyteam/lazydocker \ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg VERSION=`git describe --abbrev=0 --tag` \ .

如果遇到与Docker捆绑二进制文件的兼容性问题,请尝试使用构建参数--build-arg DOCKER_VERSION="v$(docker -v | cut -d" " -f3 | rev | cut -c 2- | rev)"重新构建镜像,以确保捆绑的docker二进制文件与主机docker二进制文件版本匹配。

使用方法

在终端中调用lazydocker。我个人经常使用它,所以我为它创建了一个别名,如下所示:

echo "alias lzd='lazydocker'" >> ~/.zshrc

(你可以将.zshrc替换为你正在使用的任何rc文件)

酷炫功能

所有操作都只需一次按键(或一次点击!支持鼠标操作):

  • 一目了然地查看docker或docker-compose容器环境的状态
  • 查看容器/服务的日志
  • 查看容器指标的ASCII图表,让你不仅感觉像个开发者,看起来也像个开发者
  • 自定义这些图表以测量几乎任何你想要的指标
  • 连接到容器/服务
  • 重启/删除/重建容器/服务
  • 查看给定镜像的祖先层
  • 清理占用磁盘空间的容器、镜像或卷

贡献

还有很多工作要做!请查看贡献指南。 对于贡献者讨论不适合在此仓库中讨论的事项,请加入Discord频道

<a href="https://discord.gg/ehwFt2t4wt"><img src='https://yellow-cdn.veclightyear.com/835a84d5/47cdbbeb-a6b4-41df-a62b-7b1fe0dcf68a.png' width='75'></a>

捐赠

如果你想支持lazydocker的开发,可以考虑赞助我(github正在匹配所有捐赠,一对一持续12个月)

社交

如果你想了解我(Jesse)在开发方面的近况,可以在Twitter上关注我,或在Twitch上观看我的编程直播

常见问题

如何编辑我的配置?

打开lazydocker,点击左上角的"project"面板,然后按"o"(如果你的编辑器是vim,则按"e")。查看配置文档

如何让主面板中的文本自动换行?

未来我希望将这设为默认,但目前自动换行会导致一些CPU问题。如果你想启用自动换行,请使用gui.wrapMainPanel: true

如何选择文本?

由于我们支持鼠标事件,你需要在拖动鼠标时按住Option键,以表明你是在尝试选择文本而不是点击某个东西。或者,你可以通过gui.ignoreMouseEvents配置值禁用鼠标事件。

Mac用户:其他选项请参见Issue #190

为什么我看不到容器的日志?

默认情况下,我们只显示最近一小时的日志,以避免给机器造成过大压力。这可能是你首次启动lazydocker时看不到日志的原因。可以在配置的commandTemplates中修改这一设置。

如果你在Docker容器中运行lazydocker,这是一个已知的bug,你无法看到日志或CPU使用情况。

替代方案

  • docui - Skanehira抢先一步制作了docker终端UI,所以一定要看看那个仓库!我认为这两个仓库可以和谐共存:lazydocker更侧重于管理现有容器/服务,而docui更侧重于创建和配置它们。
  • Portainer - Portainer试图解决同样的问题,但它通过浏览器而不是终端访问。它还支持docker swarm。
  • 查看Awesome Docker列表以了解与Docker一起使用的类似工具。

编辑推荐精选

蛙蛙写作

蛙蛙写作

AI小说写作助手,一站式润色、改写、扩写

蛙蛙写作—国内先进的AI写作平台,涵盖小说、学术、社交媒体等多场景。提供续写、改写、润色等功能,助力创作者高效优化写作流程。界面简洁,功能全面,适合各类写作者提升内容品质和工作效率。

AI辅助写作AI工具蛙蛙写作AI写作工具学术助手办公助手营销助手AI助手
Trae

Trae

字节跳动发布的AI编程神器IDE

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
问小白

问小白

全能AI智能助手,随时解答生活与工作的多样问题

问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。

热门AI助手AI对话AI工具聊天机器人
Transly

Transly

实时语音翻译/同声传译工具

Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。

讯飞智文

讯飞智文

一键生成PPT和Word,让学习生活更轻松

讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。

AI办公办公工具AI工具讯飞智文AI在线生成PPTAI撰写助手多语种文档生成AI自动配图热门
讯飞星火

讯飞星火

深度推理能力全新升级,全面对标OpenAI o1

科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。

热门AI开发模型训练AI工具讯飞星火大模型智能问答内容创作多语种支持智慧生活
Spark-TTS

Spark-TTS

一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型

Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。

咔片PPT

咔片PPT

AI助力,做PPT更简单!

咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。

讯飞绘文

讯飞绘文

选题、配图、成文,一站式创作,让内容运营更高效

讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。

热门AI辅助写作AI工具讯飞绘文内容运营AI创作个性化文章多平台分发AI助手
材料星

材料星

专业的AI公文写作平台,公文写作神器

AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。

下拉加载更多