meta

what's the meta about say it ditto dot net?

User Tools

Site Tools


servers:docker

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
servers:docker [2025/08/17 12:52] – removed - external edit (Unknown date) 127.0.0.1servers:docker [2025/08/17 12:52] (current) – ↷ Page moved and renamed from docker:notes to servers:docker melo
Line 1: Line 1:
 +===== docker notes =====
  
 +==== force recreate containers ====
 +
 +<code bash>docker compose up -d --force-recreate</code>
 +
 +==== exec script inside docker container ====
 +
 +<code bash>docker exec -it container_name bash -c "sh /script_name"</code>
 +
 +==== shell inside docker container ====
 +
 +<code bash>docker exec -it container_name bash # or sh</code>
 +
 +==== logs ====
 +
 +<code bash>docker compose logs container_name</code>
 +
 +=== tail logs ===
 +
 +<code bash>docker compose logs container_name -f</code>
 +
 +==== remove orphan containers ====
 +
 +<code bash>docker compose up -d --remove-orphans</code>
 +
 +==== one-off run & exec ====
 +
 +<code bash>
 +# to get a shell
 +docker compose run --rm container_name bash
 +</code>