Skip to content

Commit 370a7da

Browse files
authored
Merge pull request #139 from vvoland/docs-version-csv
docs: Document `version` csv format
2 parents b814c39 + 23c3839 commit 370a7da

File tree

1 file changed

+69
-2
lines changed

1 file changed

+69
-2
lines changed

README.md

+69-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ ___
3131
* [Define custom `limactl start` arguments (macOS)](#define-custom-limactl-start-arguments-macos)
3232
* [Customizing](#customizing)
3333
* [inputs](#inputs)
34+
* [inputs.version](#inputsversion)
3435
* [outputs](#outputs)
3536
* [Contributing](#contributing)
3637
* [License](#license)
@@ -114,14 +115,80 @@ The following inputs can be used as `step.with` keys
114115

115116
| Name | Type | Default | Description |
116117
|-----------------|--------|-----------------------|-----------------------------------------------------------------------------------------------------------------------------|
117-
| `version` | String | `latest` | Docker CE version (e.g., `v24.0.6`). |
118-
| `channel` | String | `stable` | Docker CE [channel](https://download.docker.com/linux/static/) (e.g, `stable`, `edge` or `test`). |
118+
| `version` | String | `latest` | Docker version to use. See [inputs.version](#inputs.version). |
119+
| `channel` | String | `stable` | Docker CE [channel](https://download.docker.com/linux/static/) (`stable` or `test`). Only applicable to `type=archive` |
119120
| `daemon-config` | String | | [Docker daemon JSON configuration](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file) |
120121
| `tcp-port` | Number | | TCP port to expose the Docker API locally |
121122
| `context` | String | `setup-docker-action` | Docker context name. |
122123
| `set-host` | Bool | `false` | Set `DOCKER_HOST` environment variable to docker socket path. |
123124
| `rootless` | Bool | `false` | Start daemon in rootless mode |
124125

126+
### inputs.version
127+
128+
By default, the latest stable version of Docker is fetched from download.docker.com.
129+
130+
You can specify a specific version number (e.g. `v27.4.0`).
131+
Which is a shorthand for the full comma separated value:
132+
133+
`type=archive,channel=stable,version=v27.4.0`
134+
135+
You can also use this full csv format instead.
136+
137+
Currently supported source types are:
138+
- `archive`
139+
- `image`
140+
141+
#### `type=archive`
142+
| Key | Default | Description |
143+
|-----------|------------|--------------------------------------------------------------------------------------|
144+
| `type` | `archive` | The source type of the Docker binaries. Possible values are `archive` and `image`. |
145+
| `channel` | `stable` | The download.docker.com channel (`stable` or `test`). |
146+
| `version` | `latest` | The Docker version to use. |
147+
148+
Examples:
149+
```yaml
150+
# last stable released version
151+
version: latest
152+
version: type=archive # same as above
153+
version: version=latest # same as above
154+
version: type=archive,version=latest # same as above
155+
```
156+
157+
```yaml
158+
# v27.3.0-rc.1 from test channel
159+
version: type=archive,version=27.3.0-rc.1,channel=test
160+
```
161+
162+
#### `type=image`
163+
164+
Other possible source type is `image` which will pull the Docker binaries from the `moby/moby-bin` and
165+
`dockereng/cli-bin` Docker Hub repositories.
166+
The advantage of using this source type is that these images are built by the Moby and Docker CI pipelines
167+
for each branch and PR, so you can use the `tag` input to install a specific version or branch (e.g. `master`).
168+
169+
| Key | Default | Description |
170+
|-----------|------------|--------------------------------------------------------------------------------------|
171+
| `tag` | `latest` | The image tag to use. |
172+
173+
See https://hub.docker.com/r/moby/moby-bin/tags and https://hub.docker.com/r/dockereng/cli-bin/tags for available tags.
174+
175+
Examples:
176+
```yaml
177+
# install last stable released version from bin images
178+
version: type=image
179+
version: type=image,tag=latest # same as above
180+
```
181+
182+
```yaml
183+
# a cutting-edge version from the `master` branch
184+
version: type=image,tag=master
185+
```
186+
187+
```yaml
188+
# install v27.4.0 from bin images
189+
version: type=image,tag=27.4.0
190+
```
191+
125192
### outputs
126193
127194
The following outputs are available

0 commit comments

Comments
 (0)