{"id":216347,"date":"2021-05-03T09:26:18","date_gmt":"2021-05-03T01:26:18","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=216347"},"modified":"2021-04-25T09:26:45","modified_gmt":"2021-04-25T01:26:45","slug":"attack-investigation","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/attack-investigation.html","title":{"rendered":"Docker \u670d\u52a1\u7ec8\u7aef UI \u7ba1\u7406\u5de5\u5177"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u57fa\u4e8e\u7ec8\u7aef\u7684 UI \u7ba1\u7406\u5de5\u5177\uff0c\u4e3b\u8981\u9002\u7528\u4e8e\u5bf9 docker \u548c docker-compose \u5bb9\u5668\u4ee5\u53ca\u670d\u52a1\u7684\u7ba1\u7406\u548c\u4fbf\u6377\u4f7f\u7528\uff0c\u7075\u611f\u6765\u81ea\u4e8e gocui \u5e76\u4f7f\u7528 Go \u8bed\u8a00\u6539\u5199\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"
\n\u8f7b\u5ea6\u7528\u6237\u4f7f\u7528\u5c1a\u53ef\uff0c\u53ef\u4e0d\u8981\u628a\u5b83\u5f53\u505a\u662f\u4e00\u4e2a\u4e13\u4e1a\u7684\u7ba1\u7406\u5de5\u5177\uff0c\u54c8\u54c8\u54c8<\/p>\n

\u67e5\u770bdocker\u6216docker-compose\u5bb9\u5668\u73af\u5883\u7684\u72b6\u6001\u4e00\u76ee\u4e86\u7136<\/p>\n

\u67e5\u770bcontainer\/service\u7684\u65e5\u5fd7<\/p>\n

\u67e5\u770b\u5bb9\u5668\u6307\u6807\u7684ascii\u56fe\u8868\uff0c\u5982CPU\/\u5185\u5b58\u7b49<\/p>\n

\u81ea\u5b9a\u4e49\u8fd9\u4e9b\u56fe\u8868\u4ee5\u6d4b\u91cf\u60a8\u60f3\u8981\u7684\u51e0\u4e4e\u4efb\u4f55\u6307\u6807<\/p>\n

\u76f4\u63a5\u8fdb\u5165\u5230container\/service\u4e0a<\/p>\n

\u91cd\u65b0\u542f\u52a8\/\u5220\u9664\/\u91cd\u5efacontainers\/services<\/p>\n

\u67e5\u770b\u7ed9\u5b9a\u56fe\u50cf\u7684\u7956\u5148\u56fe\u5c42<\/p>\n

\u4fee\u526a\u5360\u7528\u78c1\u76d8\u7a7a\u95f4\u7684\u5bb9\u5668\/\u6620\u50cf\u6216\u5377<\/p>\n

2.\u5b89\u88c5\u65b9\u5f0f<\/strong><\/div>\n
\u5b89\u88c5\u4e5f\u5f88\u65b9\u4fbf<\/strong><\/span><\/div>\n

Homebrew<\/p>\n

\r\n# Homebrew\r\nbrew tap jesseduffield\/lazydocker\r\nbrew install lazydocker\r\n<\/pre>\n

Linux\/OSX<\/p>\n

\r\n# Binary Release (Linux\/OSX)\r\ncurl https:\/\/raw.githubusercontent.com\/jesseduffield\/ \\\r\n    lazydocker\/master\/scripts\/install_update_linux.sh | bash<\/pre>\n

Go<\/p>\n

\r\n# Go\r\n# Required Go version >= 1.8\r\ngo get github.com\/jesseduffield\/lazydocker<\/pre>\n

Zsh<\/p>\n

\r\n# zsh config\r\necho \"alias lzd='lazydocker'\" >> ~\/.zshrc<\/pre>\n

Docker<\/p>\n

\r\n# docker build -t lazydocker .\r\n# docker run -it lazydocker:latest \/bin\/sh -l\r\n\r\nFROM golang:alpine\r\nWORKDIR \/go\/src\/github.com\/jesseduffield\/lazydocker\/\r\nCOPY .\/ .\r\nRUN CGO_ENABLED=0 GOOS=linux go build\r\n\r\nFROM alpine:latest\r\nRUN apk add -U git xdg-utils\r\nWORKDIR \/go\/src\/github.com\/jesseduffield\/lazydocker\/\r\nCOPY --from=0 \/go\/src\/github.com\/jesseduffield\/lazydocker \/go\/src\/github.com\/jesseduffield\/lazydocker\r\nCOPY --from=0 \/go\/src\/github.com\/jesseduffield\/lazydocker\/lazydocker \/bin\/\r\nRUN echo \"alias gg=lazydocker\" >> ~\/.profile<\/pre>\n
3. \u952e\u76d8\u7ed1\u5b9a<\/strong><\/div>\n
\u5feb\u6377\u952e\u4f7f\u7528\u8d77\u6765\u66f4\u65b9\u4fbf<\/strong><\/span><\/div>\n

Project<\/p>\n

e: edit lazydocker config\r\n  o: open lazydocker config\r\n  [: previous tab\r\n  ]: next tab\r\n  m: view logs\r\n  enter: focus main panel<\/pre>\n

Containers<\/p>\n

\r\n  [: previous tab\r\n  ]: next tab\r\n  d: remove\r\n  e: Hide\/Show stopped containers\r\n  s: stop\r\n  r: restart\r\n  a: attach\r\n  D: prune exited containers\r\n  m: view logs\r\n  c: run predefined custom command\r\n  enter: focus main panel<\/pre>\n

Services<\/p>\n

\r\n  d: remove containers\r\n  s: stop\r\n  r: restart\r\n  a: attach\r\n  m: view logs\r\n  [: previous tab\r\n  ]: next tab\r\n  R: view restart options\r\n  c: run predefined custom command\r\n  enter: focus main panel<\/pre>\n

Images<\/p>\n

\r\n  [: previous tab\r\n  ]: next tab\r\n  d: remove image\r\n  D: prune unused images\r\n  enter: focus main panel<\/pre>\n

Volumes<\/p>\n

\r\n  [: previous tab\r\n  ]: next tab\r\n  d: remove volume\r\n  D: prune unused volumes\r\n  enter: focus main panel<\/pre>\n

Main<\/p>\n

esc: return<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u8f7b\u5ea6\u7528\u6237\u4f7f\u7528\u5c1a\u53ef\uff0c\u53ef\u4e0d\u8981\u628a\u5b83\u5f53\u505a\u662f\u4e00\u4e2a\u4e13\u4e1a\u7684\u7ba1\u7406\u5de5\u5177\uff0c\u54c8\u54c8\u54c8 \u67e5\u770bdocker\u6216docker-compose\u5bb9 […]<\/p>\n","protected":false},"author":1469,"featured_media":216353,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-216347","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/216347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1469"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=216347"}],"version-history":[{"count":13,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/216347\/revisions"}],"predecessor-version":[{"id":216902,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/216347\/revisions\/216902"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/216353"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=216347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=216347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=216347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}