Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remaining v2 -> v3 changes in docs and configuration #4250

Open
12 tasks
thaJeztah opened this issue Jan 11, 2024 · 6 comments
Open
12 tasks

Fix remaining v2 -> v3 changes in docs and configuration #4250

thaJeztah opened this issue Jan 11, 2024 · 6 comments
Labels
area/config Related to registry config documentation

Comments

@thaJeztah
Copy link
Member

thaJeztah commented Jan 11, 2024

Description

I noticed some things that we need to address before v3.0.0 w.r.t. configuration or the official image, and documentation; this is just a quick list, but there may be more;

@thaJeztah thaJeztah added documentation area/config Related to registry config labels Jan 11, 2024
@thaJeztah thaJeztah added this to the Registry/3.0.0 milestone Jan 11, 2024
@thaJeztah
Copy link
Member Author

cc @milosgajdos @dvdksn @Jamstah

@milosgajdos
Copy link
Member

milosgajdos commented Jan 13, 2024

🫠 I wonder if we should create v3-stable Mileston in GH to track there

@Jamstah
Copy link
Collaborator

Jamstah commented Jan 15, 2024

🫠 I wonder if we should create v3-stable Mileston in GH to track there

I think we can just reuse the 3.0.0 milestone

@milosgajdos
Copy link
Member

update the location of the configuration file (/etc/docker/registry/config.yaml)

I suggest we go with /etc/distribution/config.yaml

can we have some / do we need some fallback for the old location? (symlink, or ideally; binary checking both?)

I don't think it's worth it; as long as it's picked up by ENTRYPOINT we are good; the default config is there to make the first experience with docker run registry seamless; besides, I would not be overthinking this with some elaborate symlinking

is there a default location that the registry uses? if so, can we remove the ENTRYPOINT and let the registry use the default location (if present)?

Alas, no. Registry simply picks it up as the first arg to its subcommand (serve, gc):

var ServeCmd = &cobra.Command{
Use: "serve <config>",
Short: "`serve` stores and distributes Docker images",
Long: "`serve` stores and distributes Docker images.",
Run: func(cmd *cobra.Command, args []string) {
// setup context
ctx := dcontext.WithVersion(dcontext.Background(), version.Version())
config, err := resolveConfiguration(args)
if err != nil {
fmt.Fprintf(os.Stderr, "configuration error: %v\n", err)
// nolint:errcheck
cmd.Usage()
os.Exit(1)
}

I would keep it as is, personally. We could be clever but I wouldn't. Not for this release, anyway.
Also we do support REGISTRY_CONFIGURATION_PATH that lets you provide ur own config path which can be used if the config arg is omitted:

if len(args) > 0 {
configurationPath = args[0]
} else if os.Getenv("REGISTRY_CONFIGURATION_PATH") != "" {
configurationPath = os.Getenv("REGISTRY_CONFIGURATION_PATH")
}

verify if the example is still correct for v3 (is version 0.1 still accurate?)

Yep, still works for me on the v3 build; as I mentioned above it's deliberately kept simple.

do we have a canonical "default" config file in the main repository that we can use instead?

I don't think we have a "canonical"/"default", but we have a couple of example config files here: https://github.com/distribution/distribution/tree/e0a54de7fc1dd9046f1d6449cc615af209003cbb/cmd/registry and more elaborate ones we use in testing here: https://github.com/distribution/distribution/tree/e0a54de7fc1dd9046f1d6449cc615af209003cbb/tests

or; does the registry have an option to output the default config (similar to containerd's containerd config default, which dumps the default config file)?

Nope, but that'd be pretty cool and should be hard to implement actually 🤔

or; does the registry have an option to output the default config (similar to containerd's containerd config default, which dumps the default config file)?

Nope and I wouldn't do this anyway.

are any of the options specified different from built-in defaults?
if none are different from the default, can we remove the configuration file entirely?

there is no such thing as defaults per see at the moment. Reworking the existing code into using some sort of selected defaults would be maybe a chunky piece of work...maybe not; hard to tell but right now we read all config opts from the config file. I wouldn't do it for this release. Maybe next.

Some of these suggestions are super interesting and we should do them for v4.

@milosgajdos milosgajdos removed this from the Registry/3.0.0 milestone May 17, 2024
@ajschmidt8
Copy link

Any thoughts on when v3 will be released?

@milosgajdos
Copy link
Member

No exact ETA but wed like to get a Beta out soon, first!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config Related to registry config documentation
Projects
None yet
Development

No branches or pull requests

4 participants