Complete the command to start real-time monitoring of Docker events.
docker [1]The docker events command shows real-time events from the Docker server.
Complete the command to filter Docker events by container ID.
docker events --filter 'container=[1]'
The --filter 'container=container_id' option filters events for a specific container.
Fix the error in the command to show Docker events for the last 10 seconds.
docker events --since [1]The --since option accepts a duration like 10s for 10 seconds.
Fill both blanks to filter Docker events by event type and since a specific time.
docker events --filter 'event=[1]' --since [2]
Use --filter 'event=start' to see start events and --since 5m to limit to last 5 minutes.
Fill all three blanks to create a dictionary comprehension that maps container IDs to event types for events since 1 hour.
events_dict = [1]: [2] for [3] in events if event['time'] > '1h ago'
This comprehension creates a dictionary with container IDs as keys and event types as values, iterating over each event.