Skip to content

Commit 13a0456

Browse files
authored
Add some documentation about registries.conf (#564)
2 parents 4f36b69 + 665b1cb commit 13a0456

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Then on your `pom.xml`
6868

6969
## Authentication
7070

71-
Using default existing login existing credentials (e.g. `~/.docker/config.json`)
71+
Using default existing login existing credentials (e.g. `~/.docker/config.json`) or `$XDG_RUNTIME_DIR/containers/auth.json` (no support for repository prefix yet)
7272

7373
```java
7474
Registry registry = Registry.builder().defaults().build();
@@ -80,6 +80,33 @@ Using username and password
8080
Registry registry = Registry.builder().defaults("username", "password").build();
8181
```
8282

83+
## Registries configuration
84+
85+
Since version `0.4.0` ORAS Java SDK partially support the `registries.conf` (https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md)
86+
87+
For example
88+
89+
```toml
90+
# Use registry for unqualified images
91+
short-name-mode = "enforcing" # Default if not set. Unsafe if `disabled` and multiple unqualified-search-registries are set
92+
unqualified-search-registries = ["docker.io"]
93+
94+
# Rewrite a location with prefix
95+
[[registry]]
96+
prefix = "docker.io/bitnami"
97+
location = "docker.io/bitnamilegacy"
98+
99+
# Block a registry/repository via prefix
100+
[[registry]]
101+
prefix = "gcr.io"
102+
blocked = true
103+
104+
# Set registry unsecure
105+
[[registry]]
106+
location = "localhost:5000"
107+
insecure = true
108+
```
109+
83110
### Push an Artifact
84111

85112
```java

0 commit comments

Comments
 (0)