-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashly.yml
158 lines (151 loc) · 5.22 KB
/
bashly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: dq
help: A wrapper around Docker and jq that allows you to filter running Docker containers.
version: 1.1.0
commands:
- name: filter
help: Run a free-form jq filter against your local running Docker containers.
args:
- name: filter
help: The filter to apply to docker inspect's JSON output.
flags:
- long: --debug
help: Use to \`set -x\` for Bash. Useful for troubleshooting commands.
examples:
- dq filter '. | length'
- dq filter '.[].Name[1:]'
- name: older-than
help: |
Return a list of containers older than the given relative time.
catch_all:
label: Date String
help: A GNU date-compatible relative time string.
flags:
- long: --debug
help: Use to \`set -x\` for Bash. Useful for troubleshooting commands.
- long: --only-return
arg: return
default: json
required: false
allowed:
- ips
- names
- ids
- json
help: Return the supported values instead of matching JSON.
- long: --network
arg: network
default: bridge
help: |
Return IP addresses associated with the specified Docker network. This only works when returning ips with the --only-return flag.
examples:
- dq older-than 4 months --only-return ips --network pebkac
- dq older-than 34 seconds
- dq older-than 2 fortnights --only-return ids
- name: newer-than
help: |
Return a list of containers older than the given relative time.
catch_all:
label: Date String
help: A GNU date-compatible relative time string.
flags:
- long: --debug
help: Use to \`set -x\` for Bash. Useful for troubleshooting commands.
- long: --only-return
arg: return
default: json
required: false
allowed:
- ips
- names
- ids
- json
help: Return the supported values instead of matching JSON.
- long: --network
short: -n
arg: network
default: bridge
help: |
Return IP addresses associated with the specified Docker network. This only works when returning ips with the --only-return flag.
examples:
- dq newer-than 4 months --only-return ips --network pebkac
- dq newer-than 34 seconds
- dq newer-than 2 fortnights --only-return ids
- name: find-by-ip-address
help: Return a list of containers assigned the given IP address.
args:
- name: ip
required: true
help: The IP address associated with the desired container.
flags:
- long: --debug
help: Use to \`set -x\` for Bash. Useful for troubleshooting commands.
- long: --only-return
arg: return
default: json
required: false
allowed:
- names
- ids
- json
help: Return the supported values instead of matching JSON.
- long: --network
arg: network
default: bridge
help: Return IP addresses associated with the specified Docker network.
examples:
- dq find-by-ip-address 172.17.0.2
- dq find-by-ip-address 172.17.0.2 --only-return names --network foo
- dq find-by-ip-address 172.17.0.2 --only-return ids
- name: names-only
help: Returns a list of names associated with all running containers.
flags:
- long: --debug
help: Use to \`set -x\` for Bash. Useful for troubleshooting commands.
- name: ip-addresses-only
help: Returns a list of IP addresses associated with the specified network.
flags:
- long: --debug
help: Use to \`set -x\` for Bash. Useful for troubleshooting commands.
- long: --network
arg: network
default: bridge
help: Return IP addresses associated with the specified Docker network.
examples:
- dq ip-addresses-only --network foo
- name: env
help: |
Returns a block of sourceable environmental variables associated with the specified container.
If no filters are specified, this command will return a distinct list of variables from all running containers.
flags:
- long: --debug
help: Use to \`set -x\` for Bash. Useful for troubleshooting commands.
- long: --return-as
arg: return
default: block
required: false
allowed:
- block
- flags
help: Return in the format of the supported values.
- long: --name
arg: name
help: Return a block of variables associated with the given container name.
repeatable: true
- long: --id
arg: id
help: Return a block of variables associated with the given container id.
repeatable: true
- long: --ip-address
arg: ip
help: Return a block of variables associated with the given IP address.
repeatable: true
- long: --network
arg: network
default: bridge
help: |
Return IP addresses associated with the specified Docker network. This only works when filtering while using the --ip-address flag.
examples:
- dq env
- dq env --name merpflakes
- dq env --id 9ae93171... --id 60d1114e... --id ade9aa44...
- dq env --ip 172.17.0.2