summaryrefslogtreecommitdiffstats
path: root/cmd/crane/doc/crane_index_filter.md
blob: bda1f8d7a52eb54f41262105b0dd1d3c293a091e (plain)
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
## crane index filter

Modifies a remote index by filtering based on platform.

```
crane index filter [flags]
```

### Examples

```
  # Filter out weird platforms from ubuntu, copy result to example.com/ubuntu
  crane index filter ubuntu --platform linux/amd64 --platform linux/arm64 -t example.com/ubuntu

  # Filter out any non-linux platforms, push to example.com/hello-world
  crane index filter hello-world --platform linux -t example.com/hello-world

  # Same as above, but in-place
  crane index filter example.com/hello-world:some-tag --platform linux
```

### Options

```
  -h, --help                   help for filter
      --platform platform(s)   Specifies the platform(s) to keep from base in the form os/arch[/variant][:osversion][,<platform>] (e.g. linux/amd64).
  -t, --tag string             Tag to apply to resulting image
```

### Options inherited from parent commands

```
      --allow-nondistributable-artifacts   Allow pushing non-distributable (foreign) layers
      --insecure                           Allow image references to be fetched without TLS
  -v, --verbose                            Enable debug logs
```

### SEE ALSO

* [crane index](crane_index.md)	 - Modify an image index.