github.com/dpiddy/docker@v1.12.2-rc1/man/docker-events.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-events - Get real time events from the server
     6  
     7  # SYNOPSIS
     8  **docker events**
     9  [**--help**]
    10  [**-f**|**--filter**[=*[]*]]
    11  [**--since**[=*SINCE*]]
    12  [**--until**[=*UNTIL*]]
    13  
    14  
    15  # DESCRIPTION
    16  Get event information from the Docker daemon. Information can include historical
    17  information and real-time information.
    18  
    19  Docker containers will report the following events:
    20  
    21      attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update
    22  
    23  Docker images report the following events:
    24  
    25      delete, import, load, pull, push, save, tag, untag
    26  
    27  Docker volumes report the following events:
    28  
    29      create, mount, unmount, destroy
    30  
    31  Docker networks report the following events:
    32  
    33      create, connect, disconnect, destroy
    34  
    35  # OPTIONS
    36  **--help**
    37    Print usage statement
    38  
    39  **-f**, **--filter**=[]
    40     Provide filter values (i.e., 'event=stop')
    41  
    42  **--since**=""
    43     Show all events created since timestamp
    44  
    45  **--until**=""
    46     Stream events until this timestamp
    47  
    48  The `--since` and `--until` parameters can be Unix timestamps, date formatted
    49  timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
    50  relative to the client machine's time. If you do not provide the `--since` option,
    51  the command returns only new and/or live events.  Supported formats for date
    52  formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
    53  `2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
    54  timezone on the client will be used if you do not provide either a `Z` or a
    55  `+-00:00` timezone offset at the end of the timestamp.  When providing Unix
    56  timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
    57  that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
    58  seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
    59  fraction of a second no more than nine digits long.
    60  
    61  # EXAMPLES
    62  
    63  ## Listening for Docker events
    64  
    65  After running docker events a container 786d698004576 is started and stopped
    66  (The container name has been shortened in the output below):
    67  
    68      # docker events
    69      2015-01-28T20:21:31.000000000-08:00 59211849bc10: (from whenry/testimage:latest) start
    70      2015-01-28T20:21:31.000000000-08:00 59211849bc10: (from whenry/testimage:latest) die
    71      2015-01-28T20:21:32.000000000-08:00 59211849bc10: (from whenry/testimage:latest) stop
    72  
    73  ## Listening for events since a given date
    74  Again the output container IDs have been shortened for the purposes of this document:
    75  
    76      # docker events --since '2015-01-28'
    77      2015-01-28T20:25:38.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) create
    78      2015-01-28T20:25:38.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) start
    79      2015-01-28T20:25:39.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) create
    80      2015-01-28T20:25:39.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) start
    81      2015-01-28T20:25:40.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) die
    82      2015-01-28T20:25:42.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) stop
    83      2015-01-28T20:25:45.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) start
    84      2015-01-28T20:25:45.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) die
    85      2015-01-28T20:25:46.000000000-08:00 c21f6c22ba27: (from whenry/testimage:latest) stop
    86  
    87  The following example outputs all events that were generated in the last 3 minutes,
    88  relative to the current time on the client machine:
    89  
    90      # docker events --since '3m'
    91      2015-05-12T11:51:30.999999999Z07:00  4386fb97867d: (from ubuntu-1:14.04) die
    92      2015-05-12T15:52:12.999999999Z07:00  4386fb97867d: (from ubuntu-1:14.04) stop
    93      2015-05-12T15:53:45.999999999Z07:00  7805c1d35632: (from redis:2.8) die
    94      2015-05-12T15:54:03.999999999Z07:00  7805c1d35632: (from redis:2.8) stop
    95  
    96  If you do not provide the --since option, the command returns only new and/or
    97  live events.
    98  
    99  # HISTORY
   100  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
   101  based on docker.com source material and internal work.
   102  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
   103  June 2015, updated by Brian Goff <cpuguy83@gmail.com>
   104  October 2015, updated by Mike Brown <mikebrow@gmail.com>