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] – [Use the first 4 letters of a container hash to reference it] 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 108: 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.1630137803.txt.gz · Last modified: 2021/08/28 11:03 by alexk7110