Skip to content

Commit

Permalink
[docs] Added docs for registry server subcommand + build fixes (#627)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarvesh Raj <[email protected]>
  • Loading branch information
sarveshraj authored Jan 6, 2024
1 parent 3de9f8a commit cd22af2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,16 @@ Other useful flags:
- `--dump-raw-manifest` - Dump raw manifest for the created image index.
- `--insecure-refs` - Allow the referenced images from insecure registry connections.

#### `SERVER` SUBCOMMAND OPTIONS

Starts a server which implements the [OCI API spec](https://github.com/opencontainers/distribution-spec/blob/v1.0.1/spec.md) on port 5000

USAGE: `slim registry server`

Other useful flags:

- `--with-referrer-api` - Enables the [referrers API endpoint](https://github.com/opencontainers/distribution-spec/blob/v1.1.0-rc3/spec.md#enabling-the-referrers-api) (OCI 1.1+)

## RUNNING CONTAINERIZED

The current version of Slim is able to run in containers. It will try to detect if it's running in a containerized environment, but you can also tell Slim explicitly using the `--in-container` global flag.
Expand Down
9 changes: 4 additions & 5 deletions pkg/app/master/command/registry/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,16 @@ var CLI = &cli.Command{
Name: ServerCmdName,
Usage: ServerCmdNameUsage,
Action: func(ctx *cli.Context) error {
gcvalues, err := command.GlobalFlagValues(ctx)
if err != nil {
return err
}
gcvalues := command.GlobalFlagValues(ctx)

cparams, err := ServerCommandFlagValues(ctx)
if err != nil {
return err
}

xc := app.NewExecutionContext(fullCmdName(ServerCmdName), ctx.String(command.FlagConsoleFormat))
xc := app.NewExecutionContext(fullCmdName(ServerCmdName),
gcvalues.QuietCLIMode,
gcvalues.OutputFormat)
OnServerCommand(xc, gcvalues, cparams)
return nil
},
Expand Down

0 comments on commit cd22af2

Please sign in to comment.