{"id":1455,"date":"2021-08-11T07:22:00","date_gmt":"2021-08-11T10:22:00","guid":{"rendered":"https:\/\/www.erudio.com.br\/blog\/?p=1455"},"modified":"2021-07-28T10:42:18","modified_gmt":"2021-07-28T13:42:18","slug":"os-principais-comandos-usados-na-gestao-de-volumes-e-redes-docker","status":"publish","type":"post","link":"https:\/\/www.erudio.com.br\/blog\/os-principais-comandos-usados-na-gestao-de-volumes-e-redes-docker\/","title":{"rendered":"Os Principais Comandos Usados na Gest\u00e3o de Volumes e Redes Docker"},"content":{"rendered":"<p>Fala pessoal beleza!<br \/>\nNesse post daremos seq\u00fc\u00eancia \u00e0 s\u00e9rie de posts sobre comandos Docker conheceremos os principais comandos usados na gest\u00e3o de Volumes e Redes Docker.<\/p>\n<h1 style=\"margin-top:0cm;margin-right:0cm;margin-bottom:22.5pt;margin-left:0cm;text-align:justify;text-indent:0cm;line-height:107%;font-size:21px;font-family:&quot;Calibri Light&quot;,sans-serif;color:#2E74B5;font-weight:normal;background:white;\"><strong><span style=\"font-size:24px;line-height:107%;color:#444444;\">Comandos Usados na Gest\u00e3o de Volumes Docker<\/span><\/strong><\/h1>\n<p style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:justify;text-indent:0cm;line-height:107%;font-size:16px;font-family:Open Sans;\">&nbsp;<\/p>\n<p style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:justify;text-indent:0cm;line-height:107%;font-size:16px;font-family:Open Sans;\"><span style=\"color:#ED7D31;\">docker<\/span> <span style=\"line-height:107%;color:#032F62;background:white;\">volume &nbsp;ls&nbsp;<\/span><span style=\"font-family:Wingdings;\">\u00e0<\/span> Lista todos os volumes Docker;<\/p>\n<ol style=\"list-style-type: circle;\">\n<li>N\u00e3o existia um comando equivalente em vers\u00f5es anteriores do Docker e normalmente improvis\u00e1vamos com o comando:\n<ul style=\"list-style-type: square;\">\n<li><span style=\"color:#ED7D31;\">docker<\/span> <span style=\"line-height:107%;color:#032F62;font-size:12.0pt;color:#032F62;background:white;\">inspect<\/span> <span style=\"color:#C00000;\">-f&nbsp;<\/span><span style=\"line-height:107%;font-size:16px;\">&#8216;{{ .Mounts }}&#8217;<\/span><span style=\"color:#C00000;\">&nbsp;CONTAINER_ID<\/span> <span style=\"font-family:Wingdings;\"><span style=\";\">\u00e0<\/span><\/span> Na pr\u00e1tica a gente filtrava por todos os pontos de montagem do cont\u00eainer e retornava a lista.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:108.0pt;text-align:left;text-indent:0cm;line-height:107%;font-size:16px;font-family:Open Sans;\">&nbsp;<\/p>\n<p style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:left;text-indent:0cm;line-height:107%;font-size:16px;font-family:Open Sans;\"><span style=\"color:#ED7D31;\">docker<\/span> <span style=\"line-height:107%;color:#032F62;background:white;\">volume &nbsp;prune<\/span><span style=\"line-height:107%;background:white;\">&nbsp;<\/span><span style=\"font-family:Wingdings;\">\u00e0<\/span> Remove todos os volumes&nbsp;<em>Docker&nbsp;<\/em>que n\u00e3o est\u00e3o em uso;<\/p>\n<div style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:justify;text-indent:35.4pt;line-height:107%;font-size:16px;font-family:Open Sans;\">\n<ol style=\"margin-bottom:0cm;list-style-type: circle;\">\n<li style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:justify;text-indent:35.4pt;line-height:107%;font-size:16px;font-family:Open Sans;\">N\u00e3o existia um comando equivalente em vers\u00f5es anteriores do Docker.<\/li>\n<\/ol>\n<\/div>\n<p style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:left;text-indent:0cm;line-height:107%;font-size:16px;font-family:Open Sans;\">&nbsp;<\/p>\n<h1 style=\"margin-top:0cm;margin-right:0cm;margin-bottom:22.5pt;margin-left:0cm;text-align:justify;text-indent:0cm;line-height:107%;font-size:21px;font-family:&quot;Calibri Light&quot;,sans-serif;color:#2E74B5;font-weight:normal;background:white;\"><strong><span style=\"font-size:24px;line-height:107%;color:#444444;\">Comandos Usados na Gest\u00e3o de Redes Docker<\/span><\/strong><\/h1>\n<p style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:left;text-indent:0cm;line-height:107%;font-size:16px;font-family:Open Sans;\">&nbsp;<\/p>\n<p style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:justify;text-indent:0cm;line-height:107%;font-size:16px;font-family:Open Sans;\"><span style=\"color:#ED7D31;\">docker<\/span> <span style=\"line-height:107%;color:#032F62;background:white;\">network ls&nbsp;<\/span><span style=\"font-family:Wingdings;\">\u00e0<\/span> Lista todas as redes <em>Docker<\/em>;<\/p>\n<ol style=\"list-style-type: circle;\">\n<li>N\u00e3o existia um comando equivalente em vers\u00f5es anteriores do Docker e normalmente improvis\u00e1vamos com o comando:\n<ul style=\"list-style-type: square;\">\n<li><span style=\"color:#ED7D31;\">docker<\/span> <span style=\"line-height:107%;color:#032F62;\">inspect<\/span> <span style=\"color:#C00000;\">-f&nbsp;<\/span><span style=\"line-height:107%;font-family:&quot;Times New Roman&quot;;font-size:12.0pt;color:#658B00;\">&#8216;{{ .NetworkSettings}}&#8217;<\/span><span style=\"color:#C00000;\">&nbsp;CONTAINER_ID<\/span> <span style=\"font-family:Wingdings;\"><span style=\";\">\u00e0<\/span><\/span> Na pr\u00e1tica a gente filtrava por todos as configura\u00e7\u00f5es de rede e retornava a lista. N\u00e3o era perfeito mas atendia;<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:left;text-indent:0cm;line-height:107%;font-size:16px;font-family:Open Sans;\">&nbsp;<\/p>\n<p style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:left;text-indent:0cm;line-height:107%;font-size:16px;font-family:Open Sans;\"><span style=\"color:#ED7D31;\">docker<\/span> <span style=\"line-height:107%;color:#032F62;background:white;\">network prune<\/span><span style=\"line-height:107%;background:white;\">&nbsp;<\/span><span style=\"font-family:Wingdings;\">\u00e0<\/span> Remove todas&nbsp;as redes <em>Docker&nbsp;<\/em>que n\u00e3o est\u00e3o em uso;<\/p>\n<div style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:justify;text-indent:35.4pt;line-height:107%;font-size:16px;font-family:Open Sans;\">\n<ol style=\"margin-bottom:0cm;list-style-type: circle;\">\n<li style=\"margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;text-align:justify;text-indent:35.4pt;line-height:107%;font-size:16px;font-family:Open Sans;\">N\u00e3o existia um comando equivalente em vers\u00f5es anteriores do Docker.<\/li>\n<\/ol>\n<\/div>\n<p>E <strong><em>se voc\u00ea quer se tornar<\/em><\/strong> um verdadeiro <em><strong>ninja Docker<\/strong><\/em> e conhecer mais sobre <strong>Docker<\/strong> e <strong>Docker Compose<\/strong> eu recomendo <a href=\"https:\/\/pub.erudio.com.br\/guia-docker\"><strong><em>baixar o meu e-Book gratuito<\/em><\/strong> <strong>Docker um guia R\u00e1pido<\/strong><\/a> e dar uma conferida numa playlist sobre o tema <strong><a href=\"https:\/\/www.youtube.com\/c\/ErudioTraining\/videos\">no meu canal no Youtube<\/a><\/strong>.<\/p>\n<p><a href=\"https:\/\/pub.erudio.com.br\/guia-docker\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.erudio.com.br\/blog\/wp-content\/uploads\/2021\/06\/banner_inscricao_model3.png\" alt=\"Baixe o Guia Docker gr\u00e1tis\"><br \/>\n<\/a><\/p>\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\">\n<div class=\"wp-block-embed__wrapper\">\n\t\t<iframe loading=\"lazy\" title=\"Docker para Iniciantes: Minicurso Gratuito Completo!\" width=\"648\" height=\"365\" src=\"https:\/\/www.youtube.com\/embed\/videoseries?list=PL18bbNo7xuh84zAeNjNejyzd1GASt8Q9x\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"\"><br \/>\n<\/iframe><\/div>\n<\/figure>\n<p>Bom por esse post \u00e9 isso a gente se v\u00ea no pr\u00f3ximo post!!!<\/p>\n<h2>Treinamentos relacionados com este post<\/h2>\n<p><a href=\"https:\/\/pub.erudio.com.br\/kr\/blog_docker\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img decoding=\"async\" style=\"max-width: 100%;\" title=\"Docker do 0 \u00e0 Maestria: Cont\u00eaineres Desmistificados mais 3 B\u00d4NUS\" src=\"https:\/\/raw.githubusercontent.com\/leandrocgsi\/blog-images\/main\/09-docker.png\" \/><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/pub.erudio.com.br\/kr\/blog_docker_para_aws\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" title=\"Docker para Amazon AWS Implante Apps Java e .NET com Travis CI\" src=\"https:\/\/raw.githubusercontent.com\/leandrocgsi\/blog-images\/main\/10-docker-to-aws.png\" \/><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/pub.erudio.com.br\/kr\/blog_rest_spring_java\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" title=\"REST API's RESTFul do 0 \u00e0  AWS com Spring Boot 3, Java e Docker\" src=\"https:\/\/raw.githubusercontent.com\/leandrocgsi\/blog-images\/main\/07-rest-spring-java.png\" \/><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/pub.erudio.com.br\/kr\/blog_rest_asp_net\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" title=\"REST API's RESTFul do 0 \u00e0 Azure com ASP.NET Core 5 e Docker\" src=\"https:\/\/raw.githubusercontent.com\/leandrocgsi\/blog-images\/main\/01-rest-asp.png\" \/><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/pub.erudio.com.br\/kr\/blog_rest_spring_kotlin\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" title=\"REST API's RESTFul do 0 \u00e0 AWS com Spring Boot 3, Kotlin e Docker\" src=\"https:\/\/raw.githubusercontent.com\/leandrocgsi\/blog-images\/main\/18-rest-spring-kotlin.png\" \/><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/pub.erudio.com.br\/kr\/blog_microservices_java\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" title=\"Microservices do 0 com Spring Cloud, Spring Boot e Docker\" src=\"https:\/\/raw.githubusercontent.com\/leandrocgsi\/blog-images\/main\/14-microservices-java.png\" \/><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/pub.erudio.com.br\/kr\/blog_microservices-dotnet\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" title=\"Arquitetura de Microsservi\u00e7os do 0 com ASP.NET, .NET 6 e C#\" src=\"https:\/\/raw.githubusercontent.com\/leandrocgsi\/blog-images\/main\/15-microservices-dotnet.png\" \/><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/pub.erudio.com.br\/kr\/blog_ms_kotlin\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" title=\"Microsservi\u00e7os do 0 com Spring Cloud, Kotlin e Docker\" src=\"https:\/\/raw.githubusercontent.com\/leandrocgsi\/blog-images\/main\/22-ms-kotlin.png\" \/><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/pub.erudio.com.br\/kr\/blog_kotlin\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" title=\"Kotlin para DEVs Java: Aprenda a Linguagem Padr\u00e3o do Android\" src=\"https:\/\/raw.githubusercontent.com\/leandrocgsi\/blog-images\/main\/20-kotlin.png\" \/><br \/>\n<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fala pessoal beleza! Nesse post daremos seq\u00fc\u00eancia \u00e0 s\u00e9rie de posts sobre comandos Docker conheceremos os principais comandos usados na gest\u00e3o de Volumes e Redes Docker. Comandos Usados na Gest\u00e3o de Volumes Docker &nbsp; docker volume &nbsp;ls&nbsp;\u00e0 Lista todos os volumes Docker; N\u00e3o existia um comando equivalente em vers\u00f5es anteriores do Docker e normalmente improvis\u00e1vamos [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1224,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[268,261,27,260,262,271,270],"tags":[265,151,263,264,272,273],"_links":{"self":[{"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/posts\/1455"}],"collection":[{"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/comments?post=1455"}],"version-history":[{"count":3,"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/posts\/1455\/revisions"}],"predecessor-version":[{"id":1462,"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/posts\/1455\/revisions\/1462"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/media\/1224"}],"wp:attachment":[{"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/media?parent=1455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/categories?post=1455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.erudio.com.br\/blog\/wp-json\/wp\/v2\/tags?post=1455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}