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

master is now named main #1477

Merged
merged 1 commit into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body:
repository. If there is a duplicate, please close your issue and add a comment
to the existing issue instead.

Please also see [the FAQs and Troubleshooting](https://github.com/containerd/nerdctl/blob/master/docs/faq.md).
Please also see [the FAQs and Troubleshooting](https://github.com/containerd/nerdctl/blob/main/docs/faq.md).

- type: textarea
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ghcr-image-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Container Image Build

on:
push:
branches: [ master, main ]
branches: [ main ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: test
on:
push:
branches:
- master
- main
- 'release/**'
pull_request:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Trivial:

## Similar tools

- [`ctr`](https://github.com/containerd/containerd/tree/master/cmd/ctr): incompatible with Docker CLI, and not friendly to users.
- [`ctr`](https://github.com/containerd/containerd/tree/main/cmd/ctr): incompatible with Docker CLI, and not friendly to users.
Notably, `ctr` lacks the equivalents of the following nerdctl commands:
- `nerdctl run -p <PORT>`
- `nerdctl run --restart=always --net=bridge`
Expand All @@ -194,9 +194,9 @@ Trivial:
## Developer guide
nerdctl is a containerd **non-core** sub-project, licensed under the [Apache 2.0 license](./LICENSE).
As a containerd non-core sub-project, you will find the:
* [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md),
* [Project governance](https://github.com/containerd/project/blob/main/GOVERNANCE.md),
* [Maintainers](./MAINTAINERS),
* and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md)
* and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md)

information in our [`containerd/project`](https://github.com/containerd/project) repository.

Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func newClient(cmd *cobra.Command, opts ...containerd.ClientOpt) (*containerd.Cl
func newClientWithPlatform(cmd *cobra.Command, platform string, clientOpts ...containerd.ClientOpt) (*containerd.Client, context.Context, context.CancelFunc, error) {
if platform != "" {
if canExec, canExecErr := platformutil.CanExecProbably(platform); !canExec {
warn := fmt.Sprintf("Platform %q seems incompatible with the host platform %q. If you see \"exec format error\", see https://github.com/containerd/nerdctl/blob/master/docs/multi-platform.md",
warn := fmt.Sprintf("Platform %q seems incompatible with the host platform %q. If you see \"exec format error\", see https://github.com/containerd/nerdctl/blob/main/docs/multi-platform.md",
platform, platforms.DefaultString())
if canExecErr != nil {
logrus.WithError(canExecErr).Warn(warn)
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func newCreateCommand() *cobra.Command {
longHelp += "WARNING: `nerdctl create` is experimental on Windows and currently broken (https://github.com/containerd/nerdctl/issues/28)"
case "freebsd":
longHelp += "\n"
longHelp += "WARNING: `nerdctl create` is experimental on FreeBSD and currently requires `--net=none` (https://github.com/containerd/nerdctl/blob/master/docs/freebsd.md)"
longHelp += "WARNING: `nerdctl create` is experimental on FreeBSD and currently requires `--net=none` (https://github.com/containerd/nerdctl/blob/main/docs/freebsd.md)"
}
var createCommand = &cobra.Command{
Use: "create [flags] IMAGE [COMMAND] [ARG...]",
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/image_encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Example:
nerdctl push example.com/foo:encrypted

To run the encrypted image, put the private key file (mykey.pem) to /etc/containerd/ocicrypt/keys (rootful) or ~/.config/containerd/ocicrypt/keys (rootless).
containerd before v1.4 requires extra configuration steps, see https://github.com/containerd/nerdctl/blob/master/docs/ocicrypt.md
containerd before v1.4 requires extra configuration steps, see https://github.com/containerd/nerdctl/blob/main/docs/ocicrypt.md

CAUTION: This command only encrypts image layers, but does NOT encrypt container configuration such as 'Env' and 'Cmd'.
To see non-encrypted information, run 'nerdctl image inspect --mode=native --platform=PLATFORM example.com/foo:encrypted' .
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/ipfs_registry_serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func ipfsRegistryServeAction(cmd *cobra.Command, args []string) error {
} else {
ipfsClient, err = httpapi.NewLocalApi()
if err != nil {
return fmt.Errorf("error encountered, '%w', Please setup ipfs daemon, see https://github.com/containerd/nerdctl/blob/master/docs/ipfs.md", err)
return fmt.Errorf("error encountered, '%w', Please setup ipfs daemon, see https://github.com/containerd/nerdctl/blob/main/docs/ipfs.md", err)
}
}
h, err := ipfs.NewRegistry(ipfsClient, ipfs.RegistryOptions{
Expand Down
10 changes: 5 additions & 5 deletions cmd/nerdctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ func initRootCmdFlags(rootCmd *cobra.Command, tomlPath string) (*pflag.FlagSet,
rootCmd.PersistentFlags().Bool("insecure-registry", cfg.InsecureRegistry, "skips verifying HTTPS certs, and allows falling back to plain HTTP")
// hosts-dir is defined as StringSlice, not StringArray, to allow specifying "--hosts-dir=/etc/containerd/certs.d,/etc/docker/certs.d"
rootCmd.PersistentFlags().StringSlice("hosts-dir", cfg.HostsDir, "A directory that contains <HOST:PORT>/hosts.toml (containerd style) or <HOST:PORT>/{ca.cert, cert.pem, key.pem} (docker style)")
// Experimental enable experimental feature, see in https://github.com/containerd/nerdctl/blob/master/docs/experimental.md
AddPersistentBoolFlag(rootCmd, "experimental", nil, nil, cfg.Experimental, "NERDCTL_EXPERIMENTAL", "Control experimental: https://github.com/containerd/nerdctl/blob/master/docs/experimental.md")
// Experimental enable experimental feature, see in https://github.com/containerd/nerdctl/blob/main/docs/experimental.md
AddPersistentBoolFlag(rootCmd, "experimental", nil, nil, cfg.Experimental, "NERDCTL_EXPERIMENTAL", "Control experimental: https://github.com/containerd/nerdctl/blob/main/docs/experimental.md")
return aliasToBeInherited, nil
}

Expand Down Expand Up @@ -440,7 +440,7 @@ func AddStringFlag(cmd *cobra.Command, name string, aliases []string, value stri
}

// AddPersistentStringFlag is similar to AddStringFlag but persistent.
// See https://github.com/spf13/cobra/blob/master/user_guide.md#persistent-flags to learn what is "persistent".
// See https://github.com/spf13/cobra/blob/main/user_guide.md#persistent-flags to learn what is "persistent".
func AddPersistentStringFlag(cmd *cobra.Command, name string, aliases, localAliases, persistentAliases []string, aliasToBeInherited *pflag.FlagSet, value string, env, usage string) {
if env != "" {
usage = fmt.Sprintf("%s [$%s]", usage, env)
Expand Down Expand Up @@ -491,7 +491,7 @@ func AddPersistentStringFlag(cmd *cobra.Command, name string, aliases, localAlia
}

// AddPersistentBoolFlag is similar to AddBoolFlag but persistent.
// See https://github.com/spf13/cobra/blob/master/user_guide.md#persistent-flags to learn what is "persistent".
// See https://github.com/spf13/cobra/blob/main/user_guide.md#persistent-flags to learn what is "persistent".
func AddPersistentBoolFlag(cmd *cobra.Command, name string, aliases, nonPersistentAliases []string, value bool, env, usage string) {
if env != "" {
usage = fmt.Sprintf("%s [$%s]", usage, env)
Expand Down Expand Up @@ -528,7 +528,7 @@ func AddPersistentBoolFlag(cmd *cobra.Command, name string, aliases, nonPersiste
}

// AddPersistentStringArrayFlag is similar to cmd.Flags().StringArray but supports aliases and env var and persistent.
// See https://github.com/spf13/cobra/blob/master/user_guide.md#persistent-flags to learn what is "persistent".
// See https://github.com/spf13/cobra/blob/main/user_guide.md#persistent-flags to learn what is "persistent".
func AddPersistentStringArrayFlag(cmd *cobra.Command, name string, aliases, nonPersistentAliases []string, value []string, env string, usage string) {
if env != "" {
usage = fmt.Sprintf("%s [$%s]", usage, env)
Expand Down
2 changes: 1 addition & 1 deletion cmd/nerdctl/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func newRunCommand() *cobra.Command {
longHelp += "WARNING: `nerdctl run` is experimental on Windows and currently broken (https://github.com/containerd/nerdctl/issues/28)"
case "freebsd":
longHelp += "\n"
longHelp += "WARNING: `nerdctl run` is experimental on FreeBSD and currently requires `--net=none` (https://github.com/containerd/nerdctl/blob/master/docs/freebsd.md)"
longHelp += "WARNING: `nerdctl run` is experimental on FreeBSD and currently requires `--net=none` (https://github.com/containerd/nerdctl/blob/main/docs/freebsd.md)"
}
var runCommand = &cobra.Command{
Use: "run [flags] IMAGE [COMMAND] [ARG...]",
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Note that competing with Docker is _not_ the goal of nerdctl. Those cutting-edge

### How is nerdctl different from `ctr` and `crictl` ?

[`ctr`](https://github.com/containerd/containerd/tree/master/cmd/ctr) is a debugging utility bundled with containerd.
[`ctr`](https://github.com/containerd/containerd/tree/main/cmd/ctr) is a debugging utility bundled with containerd.

ctr is incompatible with Docker CLI, and not friendly to users.

Expand Down
2 changes: 1 addition & 1 deletion docs/rootless.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ $ export CONTAINERD_SNAPSHOTTER=stargz
$ nerdctl run -it --rm ghcr.io/stargz-containers/alpine:3.10.2-esgz
```

See https://github.com/containerd/stargz-snapshotter/blob/master/docs/pre-converted-images.md for the image list.
See https://github.com/containerd/stargz-snapshotter/blob/main/docs/pre-converted-images.md for the image list.

## bypass4netns
| :zap: Requirement | nerdctl >= 0.17 |
Expand Down
2 changes: 1 addition & 1 deletion docs/stargz.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ See https://github.com/containerd/stargz-snapshotter to learn further informatio
# nerdctl --snapshotter=stargz run -it --rm ghcr.io/stargz-containers/fedora:30-esgz
```

For the list of pre-converted Stargz images, see https://github.com/containerd/stargz-snapshotter/blob/master/docs/pre-converted-images.md
For the list of pre-converted Stargz images, see https://github.com/containerd/stargz-snapshotter/blob/main/docs/pre-converted-images.md

### Benchmark result (Dec 9, 2020)
For running `python3 -c print("hi")`, eStargz with Stargz Snapshotter is 3-4 times faster than the legacy OCI with overlayfs snapshotter.
Expand Down