nsc registry policy set
registry policy set configures the image expiration policy for your workspace's
Namespace Container Registry. By default, images
stored in nscr.io never expire; once an image expires it can no longer be accessed and the
underlying blobs are automatically deleted.
With no --repository flag, the command updates the default policy that applies to every
repository without a repository-specific override. Pass --repository to instead set (or
override) the policy for that specific repository.
Usage
nsc registry policy set [--default_expiration <duration>] [--no-expiration] [--repository <repository>]Example
$ nsc registry policy set --default_expiration=168h
Default configuration has been updated to expire images after 168h0m0s.
$ nsc registry policy set --repository my-app --default_expiration=24h
Policy for repository "my-app" has been updated to expire images after 24h0m0s.
$ nsc registry policy set --no-expiration
Default configuration has been updated to never expire images.Options
--default_expiration <duration>
The expiration duration applied to new images (e.g., 168h for 7 days). Needs to be at least 4
hours.
--no-expiration
Set images to never expire. This overrides any previously configured expiration duration for the
target policy (the default policy, or the repository given via --repository).
--repository <repository>
Set the policy for a specific repository. If not specified, sets the default policy that applies to all repositories without a repository-specific override.