Skip to content

Useful Docker Commands

desimaniac edited this page Jun 4, 2019 · 86 revisions

Docker Commands

Stop all docker containers

docker stop $(docker ps -a -q)

Start all docker containers

docker start $(docker ps -a -q)

Start all but one container (e.g. All docker containers except Watchtower)

docker start  $(comm -13 <(docker ps -a -q --filter="name=watchtower" | sort) <(docker ps -a -q | sort))

Remove all docker containers - once they are stopped (be careful)

docker rm $(docker ps -a -q)

Forcefully, Remove all docker containers (be careful)

docker rm -f $(docker ps -a -q)

Restart only the running containers

/opt/scripts/docker/restart_containers.sh

Docker Logs

Find the container name: docker ps -a

Live log (from the beginning of the log):

docker logs -follow <container_name>

Live log (from the last 10 lines of the log):

docker logs --follow --tail 100 <container_name>

Live log (from the last 10 lines of the log) - abbreviated:

docker logs -f --tail 100 <container_name>

Removing Docker Containers

Don't want a certain docker container? You can remove it with the follow steps.

Note: Certain docker containers are essential to Cloudbox (e.g. nginx-proxy, letsencrypt).

Via Command line:

  • Get a list of docker container's installed: docker ps -a
  • Remove the one you don't want (where <name> is replaced with the docker container's name): docker stop <name> && docker rm <name>

Via Portainer:

  • https://portainer.yourdomain.com
  • "Containers" --> make your selection --> "Remove"

Misc

Let's Encrypt

To display information on existing certificates:

docker exec letsencrypt /app/cert_status

To force renew certificates that need to be renewed:

docker exec letsencrypt /app/signal_le_service

To force renew all certifications:

docker exec letsencrypt /app/force_renew

Watchtower

Tool to automaticaly update Docker images and containers.

Note: We recommend you manually update the docker images and containers via their Ansible tags. Updating Docker containers with Watchtower has been known to cause data corruption. So use at your own risk.

docker start watchtower && docker logs -f watchtower

Wait 15 secs for it to finish updating all images except rutorrent (it ignores).. then:

docker stop watchtower

If no updates, stop anyway.

Home

Basics

  1. Introduction
  2. Cloudbox Install Types
  3. Cloudbox Paths
  4. Accessing Cloudbox Apps

Prerequisites

  1. Overview
  2. Presumptions
  3. Server
  4. Domain Name
  5. Cloudflare
  6. Cloud Storage
  7. Plex / Emby - Account
  8. Usenet vs. BitTorrent

Install Cloudbox

Cloudbox
  1. Overview
  2. Dependencies
  3. Ansible Vault
  4. Settings
  5. Preinstall
  6. SSH
  7. Rclone
  8. Cloudbox
  9. Application Setup
    1. NZBGet
    2. ruTorrent
    3. NZBHydra2
    4. Jackett
    5. Plex Media Server
    6. Plex Autoscan
    7. Sonarr
    8. Radarr
    9. Lidarr
    10. PlexPy (Tautulli)
    11. Ombi
    12. Portainer
    13. Organizr

Install Mediabox / Feederbox

Feederbox (do this first)
  1. Overview
  2. Dependencies
  3. Ansible Vault
  4. Settings
  5. Preinstall
  6. SSH
  7. Rclone
  8. Feederbox
  9. Application Setup
    1. NZBGet
    2. ruTorrent
    3. NZBHydra2
    4. Jackett
    5. Sonarr
    6. Radarr
    7. Lidarr
    8. Portainer
    9. Organizr

Mediabox
  1. Overview
  2. Dependencies
  3. Ansible Vault
  4. Settings
  5. Preinstall
  6. SSH
  7. Rclone
  8. Mediabox
  9. Application Setup
    1. Feeder Mount
    2. Plex Media Server
    3. Plex Autoscan
    4. PlexPy (Tautulli)
    5. Ombi

Recommended Reading

Backup and Restore

More Information

Advanced Configuration

Experimental

Extras

Docs coming soon for ...

  • Radarr4K
  • Sonarr4K

Misc Guides

Reference

Troubleshooting

Links

Community Project

Clone this wiki locally
You can’t perform that action at this time.