Docker basic commands
search cancel

Docker basic commands

book

Article ID: 184894

calendar_today

Updated On:

Products

Symantec ZTNA

Issue/Introduction

Docker basic commands - Fetching logs and deleting containers

Resolution

  1. To view all deployed containers :
           Docker ps -a
  2. To fetch logs from a running container:
           Docker logs CONTAINER_ID > log_file.txt
  3. To delete a container
    1. Find the CONTAINER_ID by using the "docker ps -a" command
    2. Run the following command with the appropriate container_id:
      ​       Sudo docker rm CONTAINER_ID