Homelab Troubleshooting

Tips on running a Linux server and docker.

User Tools

Site Tools


docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker [2021/08/28 11:03] alexk7110docker [2022/05/28 18:32] (current) alexk7110
Line 17: Line 17:
 docker system df docker system df
 </code> </code>
-==== List all containers ====+==== List all containers, running or stopped ====
 <code bash> <code bash>
 docker ps -a docker ps -a
Line 26: Line 26:
   {{.Networks}}\t{{.Ports}}\t{{.Size}}"   {{.Networks}}\t{{.Ports}}\t{{.Size}}"
 </code> </code>
-==== Follow a container'log ====+==== Follow the log of your app ====
 <code bash> <code bash>
 docker logs -f container_name docker logs -f container_name
 </code> </code>
-==== Information on a network ==== +
-<code bash> +
-docker network inspect network_name   +
-</code>+
 ==== Information on a container ==== ==== Information on a container ====
 <code bash> <code bash>
Line 47: Line 44:
 <code bash> <code bash>
 docker network prune docker network prune
 +</code>
 +==== Get network information ====
 +<code bash>
 +docker network inspect network_name  
 </code> </code>
 ---- ----
Line 85: Line 86:
 You only need to reference the first 4 characters of the ID for it to work. You only need to reference the first 4 characters of the ID for it to work.
  
----- 
 ---- ----
 ==== Change the default log policy ==== ==== Change the default log policy ====
Line 109: Line 109:
 This will keep 10Gb of log files, so adjust accordingly This will keep 10Gb of log files, so adjust accordingly
  
-Then restart Docker and you’ll be good to go.+Then restart Docker with ''sudo systemctl restart docker.service'' and you’ll be good to go.
  
 ---- ----
docker.1630137782.txt.gz · Last modified: 2021/08/28 11:03 by alexk7110