github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/cli/docs/reference/commandline/config_inspect.md (about) 1 --- 2 title: "config inspect" 3 description: "The config inspect command description and usage" 4 keywords: ["config, inspect"] 5 --- 6 7 # config inspect 8 9 ```Markdown 10 Usage: docker config inspect [OPTIONS] CONFIG [CONFIG...] 11 12 Display detailed information on one or more configs 13 14 Options: 15 -f, --format string Format the output using the given Go template 16 --help Print usage 17 ``` 18 19 ## Description 20 21 Inspects the specified config. 22 23 By default, this renders all results in a JSON array. If a format is specified, 24 the given template will be executed for each result. 25 26 Go's [text/template](https://golang.org/pkg/text/template/) package 27 describes all the details of the format. 28 29 For detailed information about using configs, refer to [store configuration data using Docker Configs](https://docs.docker.com/engine/swarm/configs/). 30 31 > **Note** 32 > 33 > This is a cluster management command, and must be executed on a swarm 34 > manager node. To learn about managers and workers, refer to the 35 > [Swarm mode section](https://docs.docker.com/engine/swarm/) in the 36 > documentation. 37 38 ## Examples 39 40 ### Inspect a config by name or ID 41 42 You can inspect a config, either by its *name*, or *ID* 43 44 For example, given the following config: 45 46 ```console 47 $ docker config ls 48 49 ID NAME CREATED UPDATED 50 eo7jnzguqgtpdah3cm5srfb97 my_config 3 minutes ago 3 minutes ago 51 ``` 52 53 ```console 54 $ docker config inspect config.json 55 ``` 56 57 The output is in JSON format, for example: 58 59 ```json 60 [ 61 { 62 "ID": "eo7jnzguqgtpdah3cm5srfb97", 63 "Version": { 64 "Index": 17 65 }, 66 "CreatedAt": "2017-03-24T08:15:09.735271783Z", 67 "UpdatedAt": "2017-03-24T08:15:09.735271783Z", 68 "Spec": { 69 "Name": "my_config", 70 "Labels": { 71 "env": "dev", 72 "rev": "20170324" 73 }, 74 "Data": "aGVsbG8K" 75 } 76 } 77 ] 78 ``` 79 80 ### <a name="format"></a> Format the output (--format) 81 82 You can use the --format option to obtain specific information about a 83 config. The following example command outputs the creation time of the 84 config. 85 86 ```console 87 $ docker config inspect --format='{{.CreatedAt}}' eo7jnzguqgtpdah3cm5srfb97 88 89 2017-03-24 08:15:09.735271783 +0000 UTC 90 ``` 91 92 93 ## Related commands 94 95 * [config create](config_create.md) 96 * [config ls](config_ls.md) 97 * [config rm](config_rm.md)