Removing Docker containers on the master host

Occasionally, stopping the Control Center service leaves Docker containers in the local repository. Perform this procedure on the Control Center master host to ensure no containers remain.
  1. Gain access to the Control Center host, through the console interface of your hypervisor, or through a remote shell utility such as PuTTY.
  2. Log in as the root user.
  3. Use the Down Arrow key to select Root Shell, and then press Enter.
    The menu is replaced by a command prompt similar to the following example:
    [root@resmgr ~]#
  4. Stop the Control Center service.
    systemctl stop serviced
  5. Ensure that no containers remain in the local repository.
    1. Display the identifiers of all containers, running and exited.
      docker ps -qa
      • If the command returns no result, stop. This procedure is complete.
      • If the command returns a result, perform the following substeps.
    2. Remove all remaining containers.
      docker ps -qa | xargs --no-run-if-empty docker rm -fv
    3. Display the identifiers of all containers, running and exited.
      docker ps -qa
      • If the command returns no result, stop. This procedure is complete.
      • If the command returns a result, perform the remaining substeps.
    4. Disable the automatic startup of serviced.
      systemctl disable serviced
    5. Reboot the host.
      reboot
    6. Log in to the master host as root, or as a user with superuser privileges.
    7. Enable the automatic startup of serviced.
      systemctl enable serviced
To return to the Appliance Administration menu, enter the exit command.