Showing preview only (4,428K chars total). Download the full file or copy to clipboard to get everything.
Repository: containerd/nerdctl
Branch: main
Commit: d5bc0f0cda0a
Files: 916
Total size: 4.1 MB
Directory structure:
gitextract_yfhpsu0l/
├── .dockerignore
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yaml
│ │ ├── config.yml
│ │ └── feature_request.yaml
│ ├── dependabot.yml
│ └── workflows/
│ ├── ghcr-image-build-and-publish.yml
│ ├── job-build.yml
│ ├── job-lint-go.yml
│ ├── job-lint-other.yml
│ ├── job-lint-project.yml
│ ├── job-test-dependencies.yml
│ ├── job-test-in-container.yml
│ ├── job-test-in-host.yml
│ ├── job-test-in-lima.yml
│ ├── job-test-in-vagrant.yml
│ ├── job-test-unit.yml
│ ├── release.yml
│ ├── workflow-flaky.yml
│ ├── workflow-lint.yml
│ ├── workflow-test.yml
│ └── workflow-tigron.yml
├── .gitignore
├── .golangci.yml
├── .yamllint
├── BUILDING.md
├── Dockerfile
├── Dockerfile.d/
│ ├── SHA256SUMS.d/
│ │ ├── SHA256SUMS
│ │ ├── buildg-v0.5.3
│ │ ├── buildkit-v0.26.3
│ │ ├── cni-plugins-v1.9.0
│ │ ├── containerd-fuse-overlayfs-v2.1.7
│ │ ├── fuse-overlayfs-v1.16
│ │ ├── rootlesskit-v1.1.1
│ │ ├── rootlesskit-v2.3.6
│ │ ├── slirp4netns-v1.3.3
│ │ ├── stargz-snapshotter-v0.18.1
│ │ └── tini-v0.19.0
│ ├── etc_buildkit_buildkitd.toml
│ ├── etc_containerd_config.toml
│ ├── etc_systemd_system_user@.service.d_delegate.conf
│ ├── home_rootless_.config_systemd_user_containerd.service.d_port-slirp4netns.conf
│ ├── test-integration-buildkit-nerdctl-test.service
│ ├── test-integration-etc_containerd-stargz-grpc_config.toml
│ ├── test-integration-etc_containerd_config.toml
│ ├── test-integration-ipfs-offline.service
│ ├── test-integration-rootless.sh
│ └── test-integration-soci-snapshotter.service
├── EMERITUS.md
├── LICENSE
├── MAINTAINERS
├── MAINTAINERS_GUIDE.md
├── Makefile
├── NOTICE
├── README.md
├── SECURITY.md
├── Vagrantfile.freebsd
├── cmd/
│ └── nerdctl/
│ ├── apparmor/
│ │ ├── apparmor_inspect_linux.go
│ │ ├── apparmor_linux.go
│ │ ├── apparmor_linux_test.go
│ │ ├── apparmor_list_linux.go
│ │ ├── apparmor_load_linux.go
│ │ └── apparmor_unload_linux.go
│ ├── builder/
│ │ ├── builder.go
│ │ ├── builder_build.go
│ │ ├── builder_build_oci_layout_test.go
│ │ ├── builder_build_test.go
│ │ ├── builder_builder_test.go
│ │ └── builder_test.go
│ ├── checkpoint/
│ │ ├── checkpoint.go
│ │ ├── checkpoint_create.go
│ │ ├── checkpoint_create_linux_test.go
│ │ ├── checkpoint_list.go
│ │ ├── checkpoint_list_linux_test.go
│ │ ├── checkpoint_remove.go
│ │ ├── checkpoint_remove_linux_test.go
│ │ └── checkpoint_test.go
│ ├── completion/
│ │ ├── completion.go
│ │ ├── completion_linux.go
│ │ ├── completion_test.go
│ │ ├── completion_unix.go
│ │ ├── completion_unix_nolinux.go
│ │ └── completion_windows.go
│ ├── compose/
│ │ ├── compose.go
│ │ ├── compose_build.go
│ │ ├── compose_build_linux_test.go
│ │ ├── compose_config.go
│ │ ├── compose_config_test.go
│ │ ├── compose_cp.go
│ │ ├── compose_cp_linux_test.go
│ │ ├── compose_create.go
│ │ ├── compose_create_linux_test.go
│ │ ├── compose_down.go
│ │ ├── compose_down_linux_test.go
│ │ ├── compose_exec.go
│ │ ├── compose_exec_linux_test.go
│ │ ├── compose_images.go
│ │ ├── compose_images_linux_test.go
│ │ ├── compose_kill.go
│ │ ├── compose_kill_linux_test.go
│ │ ├── compose_logs.go
│ │ ├── compose_pause.go
│ │ ├── compose_pause_linux_test.go
│ │ ├── compose_port.go
│ │ ├── compose_port_linux_test.go
│ │ ├── compose_ps.go
│ │ ├── compose_ps_linux_test.go
│ │ ├── compose_pull.go
│ │ ├── compose_pull_linux_test.go
│ │ ├── compose_push.go
│ │ ├── compose_restart.go
│ │ ├── compose_restart_linux_test.go
│ │ ├── compose_rm.go
│ │ ├── compose_rm_linux_test.go
│ │ ├── compose_run.go
│ │ ├── compose_run_linux_test.go
│ │ ├── compose_start.go
│ │ ├── compose_start_linux_test.go
│ │ ├── compose_stop.go
│ │ ├── compose_stop_linux_test.go
│ │ ├── compose_test.go
│ │ ├── compose_top.go
│ │ ├── compose_top_linux_test.go
│ │ ├── compose_up.go
│ │ ├── compose_up_linux_test.go
│ │ ├── compose_up_test.go
│ │ ├── compose_version.go
│ │ └── compose_version_test.go
│ ├── container/
│ │ ├── container.go
│ │ ├── container_attach.go
│ │ ├── container_attach_linux_test.go
│ │ ├── container_commit.go
│ │ ├── container_commit_linux_test.go
│ │ ├── container_commit_test.go
│ │ ├── container_cp_acid_linux_test.go
│ │ ├── container_cp_linux.go
│ │ ├── container_cp_linux_test.go
│ │ ├── container_cp_nolinux.go
│ │ ├── container_create.go
│ │ ├── container_create_linux_test.go
│ │ ├── container_create_test.go
│ │ ├── container_diff.go
│ │ ├── container_diff_test.go
│ │ ├── container_exec.go
│ │ ├── container_exec_linux_test.go
│ │ ├── container_exec_test.go
│ │ ├── container_export.go
│ │ ├── container_export_test.go
│ │ ├── container_health_check.go
│ │ ├── container_health_check_linux_test.go
│ │ ├── container_inspect.go
│ │ ├── container_inspect_linux_test.go
│ │ ├── container_inspect_windows_test.go
│ │ ├── container_kill.go
│ │ ├── container_kill_linux_test.go
│ │ ├── container_list.go
│ │ ├── container_list_linux_test.go
│ │ ├── container_list_test.go
│ │ ├── container_list_windows_test.go
│ │ ├── container_logs.go
│ │ ├── container_logs_test.go
│ │ ├── container_pause.go
│ │ ├── container_port.go
│ │ ├── container_prune.go
│ │ ├── container_prune_linux_test.go
│ │ ├── container_remove.go
│ │ ├── container_remove_linux_test.go
│ │ ├── container_remove_test.go
│ │ ├── container_remove_windows_test.go
│ │ ├── container_rename.go
│ │ ├── container_rename_linux_test.go
│ │ ├── container_rename_windows_test.go
│ │ ├── container_restart.go
│ │ ├── container_restart_linux_test.go
│ │ ├── container_run.go
│ │ ├── container_run_cgroup_linux_test.go
│ │ ├── container_run_gpus_test.go
│ │ ├── container_run_linux.go
│ │ ├── container_run_linux_test.go
│ │ ├── container_run_log_driver_syslog_test.go
│ │ ├── container_run_mount_linux_test.go
│ │ ├── container_run_mount_windows_test.go
│ │ ├── container_run_network.go
│ │ ├── container_run_network_base_test.go
│ │ ├── container_run_network_linux_test.go
│ │ ├── container_run_network_windows_test.go
│ │ ├── container_run_nolinux.go
│ │ ├── container_run_restart_linux_test.go
│ │ ├── container_run_runtime_linux_test.go
│ │ ├── container_run_security_linux_test.go
│ │ ├── container_run_soci_linux_test.go
│ │ ├── container_run_stargz_linux_test.go
│ │ ├── container_run_systemd_linux_test.go
│ │ ├── container_run_test.go
│ │ ├── container_run_user_linux_test.go
│ │ ├── container_run_user_windows_test.go
│ │ ├── container_run_verify_linux_test.go
│ │ ├── container_run_windows_test.go
│ │ ├── container_start.go
│ │ ├── container_start_linux_test.go
│ │ ├── container_start_test.go
│ │ ├── container_stats.go
│ │ ├── container_stats_test.go
│ │ ├── container_stop.go
│ │ ├── container_stop_linux_test.go
│ │ ├── container_test.go
│ │ ├── container_top.go
│ │ ├── container_top_test.go
│ │ ├── container_unpause.go
│ │ ├── container_update.go
│ │ ├── container_update_linux_test.go
│ │ ├── container_wait.go
│ │ ├── container_wait_test.go
│ │ └── multi_platform_linux_test.go
│ ├── helpers/
│ │ ├── cobra.go
│ │ ├── consts.go
│ │ ├── flagutil.go
│ │ ├── prompt.go
│ │ ├── testing.go
│ │ └── testing_linux.go
│ ├── image/
│ │ ├── image.go
│ │ ├── image_convert.go
│ │ ├── image_convert_linux_test.go
│ │ ├── image_cryptutil.go
│ │ ├── image_decrypt.go
│ │ ├── image_encrypt.go
│ │ ├── image_encrypt_linux_test.go
│ │ ├── image_history.go
│ │ ├── image_history_test.go
│ │ ├── image_import.go
│ │ ├── image_import_linux_test.go
│ │ ├── image_inspect.go
│ │ ├── image_inspect_test.go
│ │ ├── image_list.go
│ │ ├── image_list_test.go
│ │ ├── image_load.go
│ │ ├── image_load_test.go
│ │ ├── image_prune.go
│ │ ├── image_prune_test.go
│ │ ├── image_pull.go
│ │ ├── image_pull_linux_test.go
│ │ ├── image_push.go
│ │ ├── image_push_linux_test.go
│ │ ├── image_remove.go
│ │ ├── image_remove_test.go
│ │ ├── image_save.go
│ │ ├── image_save_test.go
│ │ ├── image_tag.go
│ │ └── image_test.go
│ ├── inspect/
│ │ ├── inspect.go
│ │ └── inspect_test.go
│ ├── internal/
│ │ ├── internal.go
│ │ └── internal_oci_hook.go
│ ├── ipfs/
│ │ ├── ipfs.go
│ │ ├── ipfs_compose_linux_test.go
│ │ ├── ipfs_kubo_linux_test.go
│ │ ├── ipfs_registry.go
│ │ ├── ipfs_registry_linux_test.go
│ │ ├── ipfs_registry_serve.go
│ │ ├── ipfs_simple_linux_test.go
│ │ └── ipfs_test.go
│ ├── issues/
│ │ ├── issues_linux_test.go
│ │ └── main_linux_test.go
│ ├── login/
│ │ ├── login.go
│ │ ├── login_linux_test.go
│ │ ├── login_test.go
│ │ └── logout.go
│ ├── main.go
│ ├── main_linux.go
│ ├── main_nolinux.go
│ ├── main_test.go
│ ├── main_test_test.go
│ ├── manifest/
│ │ ├── manifest.go
│ │ ├── manifest_annotate.go
│ │ ├── manifest_annotate_linux_test.go
│ │ ├── manifest_create.go
│ │ ├── manifest_create_linux_test.go
│ │ ├── manifest_inspect.go
│ │ ├── manifest_inspect_linux_test.go
│ │ ├── manifest_push.go
│ │ ├── manifest_push_linux_test.go
│ │ ├── manifest_remove.go
│ │ ├── manifest_remove_linux_test.go
│ │ └── manifest_test.go
│ ├── namespace/
│ │ ├── namespace.go
│ │ ├── namespace_create.go
│ │ ├── namespace_inspect.go
│ │ ├── namespace_list.go
│ │ ├── namespace_remove.go
│ │ ├── namespace_test.go
│ │ └── namespace_update.go
│ ├── network/
│ │ ├── network.go
│ │ ├── network_create.go
│ │ ├── network_create_linux_test.go
│ │ ├── network_create_unix.go
│ │ ├── network_create_windows.go
│ │ ├── network_inspect.go
│ │ ├── network_inspect_test.go
│ │ ├── network_list.go
│ │ ├── network_list_linux_test.go
│ │ ├── network_prune.go
│ │ ├── network_prune_linux_test.go
│ │ ├── network_remove.go
│ │ ├── network_remove_linux_test.go
│ │ └── network_test.go
│ ├── search/
│ │ ├── search.go
│ │ ├── search_linux_test.go
│ │ └── search_test.go
│ ├── system/
│ │ ├── system.go
│ │ ├── system_events.go
│ │ ├── system_events_linux_test.go
│ │ ├── system_info.go
│ │ ├── system_info_test.go
│ │ ├── system_prune.go
│ │ ├── system_prune_linux_test.go
│ │ └── system_test.go
│ ├── version.go
│ └── volume/
│ ├── volume.go
│ ├── volume_create.go
│ ├── volume_create_test.go
│ ├── volume_inspect.go
│ ├── volume_inspect_test.go
│ ├── volume_list.go
│ ├── volume_list_test.go
│ ├── volume_namespace_test.go
│ ├── volume_prune.go
│ ├── volume_prune_linux_test.go
│ ├── volume_remove.go
│ ├── volume_remove_linux_test.go
│ └── volume_test.go
├── docs/
│ ├── build.md
│ ├── builder-debug.md
│ ├── cni.md
│ ├── command-reference.md
│ ├── compose.md
│ ├── config.md
│ ├── cosign.md
│ ├── cvmfs.md
│ ├── dev/
│ │ ├── auditing_dockerfile.md
│ │ └── store.md
│ ├── dir.md
│ ├── experimental.md
│ ├── faq.md
│ ├── freebsd.md
│ ├── gpu.md
│ ├── healthchecks.md
│ ├── ipfs.md
│ ├── multi-platform.md
│ ├── notation.md
│ ├── nydus.md
│ ├── ocicrypt.md
│ ├── overlaybd.md
│ ├── registry.md
│ ├── rootless.md
│ ├── soci.md
│ ├── stargz.md
│ └── testing/
│ ├── README.md
│ └── tools.md
├── examples/
│ ├── compose-multi-platform/
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── docker-compose.yaml
│ │ └── index.php
│ ├── compose-wordpress/
│ │ ├── README.md
│ │ ├── docker-compose.stargz.yaml
│ │ └── docker-compose.yaml
│ ├── nerdctl-as-a-library/
│ │ ├── README.md
│ │ └── run-container/
│ │ └── main.go
│ └── nerdctl-ipfs-registry-kubernetes/
│ ├── README.md
│ ├── ipfs/
│ │ ├── README.md
│ │ ├── bootstrap.yaml.sh
│ │ └── nerdctl-ipfs-registry.yaml
│ ├── ipfs-cluster/
│ │ ├── README.md
│ │ ├── bootstrap.yaml.sh
│ │ └── nerdctl-ipfs-registry.yaml
│ └── ipfs-stargz-snapshotter/
│ ├── README.md
│ ├── bootstrap.yaml.sh
│ └── nerdctl-ipfs-registry.yaml
├── extras/
│ └── rootless/
│ ├── containerd-rootless-setuptool.sh
│ └── containerd-rootless.sh
├── go.mod
├── go.sum
├── hack/
│ ├── build-integration-canary.sh
│ ├── generate-release-note.sh
│ ├── git-checkout-tag-with-hash.sh
│ ├── github/
│ │ ├── action-helpers.sh
│ │ └── gotestsum-reporter.sh
│ ├── provisioning/
│ │ ├── README.md
│ │ ├── gpg/
│ │ │ ├── docker
│ │ │ └── hashicorp
│ │ ├── kube/
│ │ │ ├── kind.sh
│ │ │ └── kind.yaml
│ │ ├── linux/
│ │ │ ├── cni.sh
│ │ │ └── containerd.sh
│ │ ├── version/
│ │ │ └── fetch.sh
│ │ └── windows/
│ │ ├── cni.sh
│ │ └── containerd.ps1
│ ├── scripts/
│ │ └── lib.sh
│ └── test-integration.sh
├── mod/
│ └── tigron/
│ ├── .golangci.yml
│ ├── .yamllint
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── expect/
│ │ ├── comparators.go
│ │ ├── comparators_test.go
│ │ ├── doc.go
│ │ ├── doc.md
│ │ └── exit.go
│ ├── go.mod
│ ├── go.sum
│ ├── hack/
│ │ ├── dev-setup-linux.sh
│ │ ├── dev-setup-macos.sh
│ │ └── headers/
│ │ ├── bash.txt
│ │ ├── dockerfile.txt
│ │ ├── go.txt
│ │ └── makefile.txt
│ ├── internal/
│ │ ├── assertive/
│ │ │ ├── assertive.go
│ │ │ ├── assertive_test.go
│ │ │ └── doc.go
│ │ ├── com/
│ │ │ ├── command.go
│ │ │ ├── command_other.go
│ │ │ ├── command_test.go
│ │ │ ├── command_windows.go
│ │ │ ├── doc.go
│ │ │ ├── package_benchmark_test.go
│ │ │ ├── package_example_test.go
│ │ │ ├── package_test.go
│ │ │ └── pipes.go
│ │ ├── doc.go
│ │ ├── exit.go
│ │ ├── formatter/
│ │ │ ├── doc.go
│ │ │ ├── formatter.go
│ │ │ └── osc8.go
│ │ ├── highk/
│ │ │ ├── doc.go
│ │ │ ├── fileleak.go
│ │ │ └── goroutines.go
│ │ ├── logger/
│ │ │ ├── doc.go
│ │ │ └── logger.go
│ │ ├── mimicry/
│ │ │ ├── doc.go
│ │ │ ├── doc.md
│ │ │ ├── mimicry.go
│ │ │ ├── print.go
│ │ │ └── stack.go
│ │ ├── mocks/
│ │ │ ├── doc.go
│ │ │ └── t.go
│ │ └── pty/
│ │ └── pty.go
│ ├── require/
│ │ ├── doc.go
│ │ ├── doc.md
│ │ ├── requirement.go
│ │ └── requirement_test.go
│ ├── test/
│ │ ├── case.go
│ │ ├── command.go
│ │ ├── config.go
│ │ ├── config_test.go
│ │ ├── consts.go
│ │ ├── data.go
│ │ ├── data_test.go
│ │ ├── doc.go
│ │ ├── expected.go
│ │ ├── funct.go
│ │ ├── helpers.go
│ │ ├── interfaces.go
│ │ ├── package_test.go
│ │ ├── test.go
│ │ └── types.go
│ ├── tig/
│ │ ├── doc.go
│ │ └── t.go
│ └── utils/
│ ├── doc.go
│ ├── testca/
│ │ └── ca.go
│ └── utilities.go
└── pkg/
├── annotations/
│ └── annotations.go
├── api/
│ └── types/
│ ├── apparmor_types.go
│ ├── builder_types.go
│ ├── checkpoint_types.go
│ ├── container_network_types.go
│ ├── container_types.go
│ ├── cri/
│ │ └── metadata_types.go
│ ├── global.go
│ ├── image_types.go
│ ├── import_types.go
│ ├── ipfs_types.go
│ ├── load_types.go
│ ├── login_types.go
│ ├── manifest_types.go
│ ├── namespace_types.go
│ ├── network_types.go
│ ├── search_types.go
│ ├── system_types.go
│ └── volume_types.go
├── apparmorutil/
│ ├── apparmorutil.go
│ └── apparmorutil_linux.go
├── buildkitutil/
│ ├── buildkitutil.go
│ ├── buildkitutil_linux.go
│ ├── buildkitutil_test.go
│ ├── buildkitutil_unix.go
│ ├── buildkitutil_unix_nolinux.go
│ ├── buildkitutil_windows.go
│ └── types.go
├── bypass4netnsutil/
│ ├── bypass.go
│ └── bypass4netnsutil.go
├── checkpointutil/
│ └── checkpointutil.go
├── cioutil/
│ ├── container_io.go
│ ├── container_io_unix.go
│ └── container_io_windows.go
├── clientutil/
│ └── client.go
├── cmd/
│ ├── apparmor/
│ │ ├── inspect_linux.go
│ │ ├── list_linux.go
│ │ ├── load_linux.go
│ │ └── unload_linux.go
│ ├── builder/
│ │ ├── build.go
│ │ ├── build_test.go
│ │ └── prune.go
│ ├── checkpoint/
│ │ ├── create.go
│ │ ├── list.go
│ │ └── remove.go
│ ├── compose/
│ │ └── compose.go
│ ├── container/
│ │ ├── attach.go
│ │ ├── commit.go
│ │ ├── cp_linux.go
│ │ ├── create.go
│ │ ├── create_userns_opts_darwin.go
│ │ ├── create_userns_opts_freebsd.go
│ │ ├── create_userns_opts_linux.go
│ │ ├── create_userns_opts_linux_test.go
│ │ ├── create_userns_opts_windows.go
│ │ ├── exec.go
│ │ ├── exec_linux.go
│ │ ├── exec_nolinux.go
│ │ ├── export.go
│ │ ├── health_check.go
│ │ ├── idmap.go
│ │ ├── inspect.go
│ │ ├── kill.go
│ │ ├── list.go
│ │ ├── list_util.go
│ │ ├── logs.go
│ │ ├── pause.go
│ │ ├── prune.go
│ │ ├── remove.go
│ │ ├── rename.go
│ │ ├── restart.go
│ │ ├── run_blkio_linux.go
│ │ ├── run_cdi.go
│ │ ├── run_cgroup_linux.go
│ │ ├── run_gpus.go
│ │ ├── run_linux.go
│ │ ├── run_mount.go
│ │ ├── run_restart.go
│ │ ├── run_runtime.go
│ │ ├── run_security_linux.go
│ │ ├── run_ulimit_linux.go
│ │ ├── run_unix_nolinux.go
│ │ ├── run_user.go
│ │ ├── run_windows.go
│ │ ├── start.go
│ │ ├── stats.go
│ │ ├── stats_linux.go
│ │ ├── stats_nolinux.go
│ │ ├── stop.go
│ │ ├── top.go
│ │ ├── top_unix.go
│ │ ├── top_windows.go
│ │ ├── unpause.go
│ │ └── wait.go
│ ├── image/
│ │ ├── convert.go
│ │ ├── crypt.go
│ │ ├── ensure.go
│ │ ├── import.go
│ │ ├── inspect.go
│ │ ├── list.go
│ │ ├── prune.go
│ │ ├── pull.go
│ │ ├── push.go
│ │ ├── remove.go
│ │ ├── save.go
│ │ └── tag.go
│ ├── ipfs/
│ │ └── registry_serve.go
│ ├── login/
│ │ ├── login.go
│ │ ├── prompt.go
│ │ ├── prompt_unix.go
│ │ └── prompt_windows.go
│ ├── logout/
│ │ └── logout.go
│ ├── manifest/
│ │ ├── annotate.go
│ │ ├── create.go
│ │ ├── inspect.go
│ │ ├── push.go
│ │ └── rm.go
│ ├── namespace/
│ │ ├── common.go
│ │ ├── create.go
│ │ ├── inspect.go
│ │ ├── list.go
│ │ ├── namespace_linux.go
│ │ ├── namespace_nolinux.go
│ │ ├── remove.go
│ │ └── update.go
│ ├── network/
│ │ ├── create.go
│ │ ├── inspect.go
│ │ ├── list.go
│ │ ├── prune.go
│ │ └── remove.go
│ ├── search/
│ │ └── search.go
│ ├── system/
│ │ ├── events.go
│ │ ├── info.go
│ │ └── prune.go
│ └── volume/
│ ├── create.go
│ ├── inspect.go
│ ├── list.go
│ ├── prune.go
│ ├── rm.go
│ └── volume.go
├── composer/
│ ├── build.go
│ ├── composer.go
│ ├── config.go
│ ├── container.go
│ ├── copy.go
│ ├── create.go
│ ├── down.go
│ ├── exec.go
│ ├── kill.go
│ ├── lock.go
│ ├── logs.go
│ ├── orphans.go
│ ├── pause.go
│ ├── pipetagger/
│ │ └── pipetagger.go
│ ├── port.go
│ ├── pull.go
│ ├── push.go
│ ├── restart.go
│ ├── rm.go
│ ├── run.go
│ ├── serviceparser/
│ │ ├── build.go
│ │ ├── build_test.go
│ │ ├── serviceparser.go
│ │ └── serviceparser_test.go
│ ├── stop.go
│ ├── up.go
│ ├── up_network.go
│ ├── up_service.go
│ └── up_volume.go
├── config/
│ └── config.go
├── consoleutil/
│ ├── consoleutil.go
│ ├── consoleutil_unix.go
│ ├── consoleutil_windows.go
│ └── detach.go
├── containerdutil/
│ ├── content.go
│ ├── helpers.go
│ ├── image_store.go
│ ├── snapshotter.go
│ └── version.go
├── containerinspector/
│ ├── containerinspector.go
│ ├── containerinspector_linux.go
│ ├── containerinspector_unix_nolinux.go
│ └── containerinspector_windows.go
├── containerutil/
│ ├── config.go
│ ├── container_network_manager.go
│ ├── container_network_manager_linux.go
│ ├── container_network_manager_other.go
│ ├── container_network_manager_test.go
│ ├── container_network_manager_windows.go
│ ├── containerutil.go
│ ├── containerutil_test.go
│ ├── cp_linux.go
│ ├── cp_resolve_linux.go
│ └── lock.go
├── defaults/
│ ├── cgroup_linux.go
│ ├── defaults_darwin.go
│ ├── defaults_freebsd.go
│ ├── defaults_linux.go
│ └── defaults_windows.go
├── dnsutil/
│ ├── dnsutil.go
│ ├── dnsutil_test.go
│ └── hostsstore/
│ ├── hosts.go
│ ├── hosts_test.go
│ ├── hostsstore.go
│ ├── updater.go
│ └── updater_test.go
├── doc.go
├── errutil/
│ ├── errors_check.go
│ └── exit_coder.go
├── eventutil/
│ └── eventutil.go
├── flagutil/
│ ├── flagutil.go
│ └── flagutil_test.go
├── formatter/
│ ├── common.go
│ ├── formatter.go
│ └── formatter_test.go
├── fs/
│ └── fs.go
├── healthcheck/
│ ├── executor.go
│ ├── health.go
│ ├── healthcheck_manager_darwin.go
│ ├── healthcheck_manager_freebsd.go
│ ├── healthcheck_manager_linux.go
│ ├── healthcheck_manager_windows.go
│ └── log.go
├── identifiers/
│ └── validate.go
├── idgen/
│ └── idgen.go
├── idutil/
│ ├── containerwalker/
│ │ └── containerwalker.go
│ └── imagewalker/
│ └── imagewalker.go
├── imageinspector/
│ └── imageinspector.go
├── imgutil/
│ ├── commit/
│ │ ├── commit.go
│ │ ├── commit_other.go
│ │ └── commit_unix.go
│ ├── converter/
│ │ ├── convert.go
│ │ ├── info.go
│ │ └── zstd.go
│ ├── dockerconfigresolver/
│ │ ├── credentialsstore.go
│ │ ├── credentialsstore_test.go
│ │ ├── defaults.go
│ │ ├── dockerconfigresolver.go
│ │ ├── hostsstore.go
│ │ ├── registryurl.go
│ │ └── registryurl_test.go
│ ├── fetch/
│ │ └── fetch.go
│ ├── filtering.go
│ ├── filtering_test.go
│ ├── imgutil.go
│ ├── imgutil_test.go
│ ├── jobs/
│ │ └── jobs.go
│ ├── load/
│ │ └── load.go
│ ├── pull/
│ │ └── pull.go
│ ├── push/
│ │ └── push.go
│ ├── snapshotter.go
│ ├── snapshotter_test.go
│ └── transfer.go
├── infoutil/
│ ├── infoutil.go
│ ├── infoutil_darwin.go
│ ├── infoutil_freebsd.go
│ ├── infoutil_linux.go
│ ├── infoutil_test.go
│ ├── infoutil_unix.go
│ ├── infoutil_unix_test.go
│ ├── infoutil_windows.go
│ ├── infoutil_windows_test.go
│ └── infoutilmock/
│ └── infoutil_mock.go
├── inspecttypes/
│ ├── dockercompat/
│ │ ├── blkio.go
│ │ ├── blkioutils_linux.go
│ │ ├── blkioutils_others.go
│ │ ├── dockercompat.go
│ │ ├── dockercompat_test.go
│ │ └── info.go
│ └── native/
│ ├── container.go
│ ├── image.go
│ ├── info.go
│ ├── namespace.go
│ ├── network.go
│ └── volume.go
├── internal/
│ └── filesystem/
│ ├── consts.go
│ ├── errors.go
│ ├── helpers.go
│ ├── lock.go
│ ├── lock_test.go
│ ├── lock_unix.go
│ ├── lock_windows.go
│ ├── os.go
│ ├── path.go
│ ├── path_test.go
│ ├── path_unix.go
│ ├── path_windows.go
│ ├── umask.go
│ ├── umask_test.go
│ ├── umask_unix.go
│ ├── umask_windows.go
│ ├── writefile_rename.go
│ ├── writefile_rollback.go
│ └── writefile_rollback_test.go
├── ipcutil/
│ ├── ipcutil.go
│ ├── ipcutil_linux.go
│ ├── ipcutil_other.go
│ └── ipcutil_windows.go
├── ipfs/
│ ├── image_ipfs.go
│ ├── image_noipfs.go
│ ├── noipfs.go
│ ├── registry.go
│ ├── registry_ipfs.go
│ └── registry_noipfs.go
├── labels/
│ ├── k8slabels/
│ │ └── k8slabels.go
│ └── labels.go
├── logging/
│ ├── cri_logger.go
│ ├── cri_logger_test.go
│ ├── detail_writer.go
│ ├── fluentd_logger.go
│ ├── fluentd_logger_test.go
│ ├── journald_logger.go
│ ├── json_logger.go
│ ├── json_logger_test.go
│ ├── jsonfile/
│ │ └── jsonfile.go
│ ├── log_viewer.go
│ ├── logging.go
│ ├── logging_test.go
│ ├── logs_other.go
│ ├── logs_windows.go
│ ├── none_logger.go
│ ├── none_logger_test.go
│ ├── syslog_logger.go
│ └── tail/
│ ├── tail.go
│ └── tail_test.go
├── manifeststore/
│ └── manifeststore.go
├── manifesttypes/
│ └── manifesttypes.go
├── manifestutil/
│ └── manifestutils.go
├── maputil/
│ ├── maputil.go
│ └── maputil_test.go
├── mountutil/
│ ├── mountutil.go
│ ├── mountutil_darwin.go
│ ├── mountutil_freebsd.go
│ ├── mountutil_linux.go
│ ├── mountutil_linux_test.go
│ ├── mountutil_test.go
│ ├── mountutil_unix.go
│ ├── mountutil_windows.go
│ ├── mountutil_windows_test.go
│ └── volumestore/
│ └── volumestore.go
├── namestore/
│ ├── namestore.go
│ └── namestore_test.go
├── netutil/
│ ├── cni_plugin.go
│ ├── cni_plugin_unix.go
│ ├── cni_plugin_windows.go
│ ├── nettype/
│ │ ├── nettype.go
│ │ └── nettype_test.go
│ ├── netutil.go
│ ├── netutil_linux_test.go
│ ├── netutil_test.go
│ ├── netutil_unix.go
│ ├── netutil_unix_test.go
│ ├── netutil_windows.go
│ ├── netutil_windows_test.go
│ ├── networkstore/
│ │ └── networkstore.go
│ ├── store.go
│ └── subnet/
│ ├── subnet.go
│ └── subnet_test.go
├── ocihook/
│ ├── ocihook.go
│ ├── ocihook_linux.go
│ ├── ocihook_nolinux.go
│ ├── rootless_linux.go
│ ├── rootless_other.go
│ └── state/
│ └── state.go
├── platformutil/
│ ├── binfmt.go
│ ├── layers.go
│ └── platformutil.go
├── portutil/
│ ├── iptable/
│ │ ├── iptables.go
│ │ ├── iptables_linux.go
│ │ └── iptables_test.go
│ ├── port_allocate_linux.go
│ ├── port_allocate_other.go
│ ├── portutil.go
│ ├── portutil_test.go
│ └── procnet/
│ ├── procnet.go
│ ├── procnet_linux.go
│ └── procnetd_test.go
├── referenceutil/
│ ├── cid_ipfs.go
│ ├── cid_noipfs.go
│ ├── referenceutil.go
│ └── referenceutil_test.go
├── reflectutil/
│ ├── reflectutil.go
│ └── reflectutil_test.go
├── resolvconf/
│ ├── resolvconf.go
│ └── resolvconf_linux_test.go
├── rootlessutil/
│ ├── child_linux.go
│ ├── parent_linux.go
│ ├── port_linux.go
│ ├── rootlessutil_linux.go
│ ├── rootlessutil_other.go
│ └── xdg_linux.go
├── signalutil/
│ ├── signals.go
│ ├── signals_linux.go
│ └── signals_other.go
├── signutil/
│ ├── cosignutil.go
│ ├── notationutil.go
│ └── signutil.go
├── snapshotterutil/
│ ├── socisource.go
│ └── sociutil.go
├── statsutil/
│ ├── stats.go
│ └── stats_linux.go
├── store/
│ ├── filestore.go
│ ├── filestore_test.go
│ └── store.go
├── strutil/
│ ├── strutil.go
│ └── strutil_test.go
├── systemutil/
│ ├── socket_unix.go
│ └── socket_windows.go
├── tabutil/
│ ├── tabutil.go
│ └── tabutil_test.go
├── tarutil/
│ └── tarutil.go
├── taskutil/
│ └── taskutil.go
├── testutil/
│ ├── compose.go
│ ├── images.yaml
│ ├── images_linux.go
│ ├── iptables/
│ │ └── iptables_linux.go
│ ├── nerdtest/
│ │ ├── ambient.go
│ │ ├── command.go
│ │ ├── hoststoml/
│ │ │ └── hoststoml.go
│ │ ├── platform/
│ │ │ ├── platform_darwin.go
│ │ │ ├── platform_freebsd.go
│ │ │ ├── platform_linux.go
│ │ │ └── platform_windows.go
│ │ ├── registry/
│ │ │ ├── cesanta.go
│ │ │ ├── common.go
│ │ │ ├── docker.go
│ │ │ └── kubo.go
│ │ ├── requirements.go
│ │ ├── requirements_other.go
│ │ ├── requirements_windows.go
│ │ ├── test.go
│ │ ├── third-party.go
│ │ ├── utilities.go
│ │ └── utilities_linux.go
│ ├── nettestutil/
│ │ └── nettestutil.go
│ ├── portlock/
│ │ └── portlock.go
│ ├── testca/
│ │ └── testca.go
│ ├── testregistry/
│ │ ├── certsd_linux.go
│ │ └── testregistry_linux.go
│ ├── testsyslog/
│ │ └── testsyslog.go
│ ├── testutil.go
│ ├── testutil_darwin.go
│ ├── testutil_freebsd.go
│ ├── testutil_linux.go
│ └── testutil_windows.go
├── transferutil/
│ └── progress.go
└── version/
└── version.go
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
# artifacts
/nerdctl
_output
*.gomodjail
# golangci-lint
/build
# vagrant
/.vagrant
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yaml
================================================
name: Bug report
description: Create a bug report to help improve nerdctl
labels: kind/unconfirmed-bug-claim
body:
- type: markdown
attributes:
value: |
If you are reporting a new issue, make sure that we do not have any duplicates
already open. You can ensure this by searching the issue list for this
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/main/docs/faq.md).
- type: textarea
attributes:
label: Description
description: |
Briefly describe the problem you are having in a few paragraphs.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce the issue
value: |
1.
2.
3.
- type: textarea
attributes:
label: Describe the results you received and expected
validations:
required: true
- type: textarea
attributes:
label: What version of nerdctl are you using?
placeholder: nerdctl version
validations:
required: true
- type: dropdown
attributes:
label: Are you using a variant of nerdctl? (e.g., Rancher Desktop)
options:
- Rancher Desktop for Windows
- Rancher Desktop for macOS
- Lima
- Colima
- Others
- type: textarea
attributes:
label: Host information
placeholder: nerdctl info
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true
contact_links:
- name: Ask a question (GitHub Discussions)
url: https://github.com/containerd/nerdctl/discussions
about: |
Please do not submit "a bug report" for asking a question.
In most cases, GitHub Discussions is the best place to ask a question.
If you are not sure whether you are going to report a bug or ask a question,
please consider asking in GitHub Discussions first.
- name: Chat with containerd/nerdctl users and developers
url: https://slack.cncf.io/
about: CNCF slack has `#containerd` and `#containerd-dev` channels
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yaml
================================================
name: Feature request
description: Suggest an idea for nerdctl
labels: kind/feature
body:
- type: textarea
attributes:
label: What is the problem you're trying to solve
description: |
A clear and concise description of what the problem is.
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like
description: |
A clear and concise description of what you'd like to happen.
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: |
Add any other context about the feature request here.
================================================
FILE: .github/dependabot.yml
================================================
# -----------------------------------------------------------------------------
# Forked from https://raw.githubusercontent.com/opencontainers/runc/2888e6e54339e52ae45710daa9e47cdb2e1926f9/.github/dependabot.yml
# Copyright The runc Authors.
# Licensed under the Apache License, Version 2.0
# -----------------------------------------------------------------------------
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Dependencies listed in go.mod
- package-ecosystem: "gomod"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
groups:
golang-x:
patterns:
- "golang.org/x/*"
moby-sys:
patterns:
- "github.com/moby/sys/*"
docker:
patterns:
- "github.com/docker/docker"
- "github.com/docker/cli"
containerd:
patterns:
- "github.com/containerd/containerd"
- "github.com/containerd/containerd/api"
stargz:
patterns:
- "github.com/containerd/stargz-snapshotter"
- "github.com/containerd/stargz-snapshotter/estargz"
- "github.com/containerd/stargz-snapshotter/ipfs"
# Dependencies listed in .github/workflows/*.yml
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# Dependencies listed in Dockerfile
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
================================================
FILE: .github/workflows/ghcr-image-build-and-publish.yml
================================================
name: image
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [main]
# Publish semver tags as releases.
tags: ['v*.*.*']
pull_request:
branches: [main]
paths-ignore:
- '**.md'
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# FIXME: setup-qemu-action is depended by `gomodjail pack`
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
secrets: |
github_token=${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/job-build.yml
================================================
# This job just builds nerdctl for the golang versions we support (as a smoke test)
name: job-build
on:
workflow_call:
inputs:
timeout:
required: true
type: number
go-version:
required: true
type: string
runner:
required: true
type: string
canary:
required: false
default: false
type: boolean
env:
GOTOOLCHAIN: local
jobs:
build-all-targets:
name: ${{ format('go {0}', inputs.canary && 'canary' || inputs.go-version ) }}
timeout-minutes: ${{ inputs.timeout }}
runs-on: "${{ inputs.runner }}"
defaults:
run:
shell: bash
env:
GO_VERSION: ${{ inputs.go-version }}
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- if: ${{ inputs.canary }}
name: "Init (canary): retrieve GO_VERSION"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
. ./hack/github/action-helpers.sh
latest_go="$(. ./hack/provisioning/version/fetch.sh; go::canary::for::go-setup)"
printf "GO_VERSION=%s\n" "$latest_go" >> "$GITHUB_ENV"
[ "$latest_go" != "" ] || \
github::log::warning "No canary go" "There is currently no canary go version to test. Steps will not run."
- if: ${{ env.GO_VERSION != '' }}
name: "Init: install go"
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- if: ${{ env.GO_VERSION != '' }}
name: "Run: make binaries"
run: |
. ./hack/github/action-helpers.sh
github::md::table::header "OS" "Arch" "Result" "Time" >> $GITHUB_STEP_SUMMARY
failure=
build(){
local goos="$1"
local goarch="${2:-amd64}"
local goarm="${3:-}"
local result
GOOS="$goos" GOARCH="$goarch" GOARM="$goarm" go build ./examples/...
github::timer::begin
GOOS="$goos" GOARCH="$goarch" GOARM="$goarm" make binaries \
&& result="$decorator_success" \
|| {
failure=true
result="$decorator_failure"
}
[ ! "$goarm" ] || goarch="$goarch/v$goarm"
github::md::table::line "$goos" "$goarch" "$result" "$(github::timer::format <(github::timer::tick))" >> $GITHUB_STEP_SUMMARY
}
# We officially support these
build linux
build linux arm64
build windows
build freebsd
# These architectures are not released, but we still verify that we can at least compile
build darwin
build linux arm 6
build linux loong64
build linux ppc64le
build linux riscv64
build linux s390x
[ ! "$failure" ] || exit 1
- if: ${{ env.GO_VERSION != '' }}
name: "Run: make binaries with custom BUILDTAGS"
run: |
set -eux
# no_ipfs: make sure it does not incur any IPFS-related dependency
go mod vendor
rm -rf vendor/github.com/ipfs vendor/github.com/multiformats
BUILDTAGS=no_ipfs make binaries
================================================
FILE: .github/workflows/job-lint-go.yml
================================================
# This job runs golangci-lint
# Note that technically, `make lint-go-all` would run the linter for all targets, and could be called once, on a single instance.
# The point of running it on a matrix instead, each GOOS separately, is to verify that the tooling itself is working on the target OS.
name: job-lint-go
on:
workflow_call:
inputs:
timeout:
required: true
type: number
go-version:
required: true
type: string
runner:
required: true
type: string
canary:
required: false
default: false
type: boolean
goos:
required: true
type: string
env:
GOTOOLCHAIN: local
jobs:
lint-go:
name: ${{ format('{0}{1}', inputs.goos, inputs.canary && ' (go canary)' || '') }}
timeout-minutes: ${{ inputs.timeout }}
runs-on: "${{ inputs.runner }}"
defaults:
run:
shell: bash
env:
GO_VERSION: ${{ inputs.go-version }}
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- if: ${{ inputs.canary }}
name: "Init (canary): retrieve GO_VERSION"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
latest_go="$(. ./hack/provisioning/version/fetch.sh; go::canary::for::go-setup)"
printf "GO_VERSION=%s\n" "$latest_go" >> "$GITHUB_ENV"
[ "$latest_go" != "" ] || \
echo "::warning title=No canary go::There is currently no canary go version to test. Steps will not run."
- if: ${{ env.GO_VERSION != '' }}
name: "Init: install go"
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- if: ${{ env.GO_VERSION != '' }}
name: "Init: install dev-tools"
run: |
echo "::group:: make install-dev-tools"
make install-dev-tools
echo "::endgroup::"
- if: ${{ env.GO_VERSION != '' }}
name: "Run"
run: |
# On canary, lint for all supported targets
if [ "${{ inputs.canary }}" == "true" ]; then
NO_COLOR=true make lint-go-all
else
NO_COLOR=true GOOS="${{ inputs.goos }}" make lint-go
fi
================================================
FILE: .github/workflows/job-lint-other.yml
================================================
# This job runs any subsidiary linter not part of golangci (shell, yaml, etc)
name: job-lint-other
on:
workflow_call:
inputs:
timeout:
required: true
type: number
runner:
required: true
type: string
env:
GOTOOLCHAIN: local
jobs:
lint-other:
name: "yaml | shell"
timeout-minutes: ${{ inputs.timeout }}
runs-on: ${{ inputs.runner }}
defaults:
run:
shell: bash
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: "Run: yaml"
run: |
make lint-yaml
- name: "Run: shell"
run: |
make lint-shell
================================================
FILE: .github/workflows/job-lint-project.yml
================================================
# This job runs containerd shared project-checks, that verifies licenses, headers, and commits.
# To run locally, you may just use `make lint` instead, that does the same thing
# (albeit `make lint` uses more modern versions).
name: job-lint-project
on:
workflow_call:
inputs:
timeout:
required: true
type: number
go-version:
required: true
type: string
runner:
required: true
type: string
env:
GOTOOLCHAIN: local
jobs:
project:
name: "commits, licenses..."
timeout-minutes: ${{ inputs.timeout }}
runs-on: ${{ inputs.runner }}
defaults:
run:
shell: bash
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 100
path: src/github.com/containerd/nerdctl
- name: "Init: install go"
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ${{ inputs.go-version }}
check-latest: true
cache-dependency-path: src/github.com/containerd/nerdctl
- name: "Run"
uses: containerd/project-checks@d7751f3c375b8fe4a84c02a068184ee4c1f59bc4 # v1.2.2
with:
working-directory: src/github.com/containerd/nerdctl
repo-access-token: ${{ secrets.GITHUB_TOKEN }}
# go-licenses-ignore is set because go-licenses cannot detect the license of the following package:
# * go-base36: Apache-2.0 OR MIT (https://github.com/multiformats/go-base36/blob/master/LICENSE.md)
# * filepath-securejoin: MPL-2.0 AND BSD-3-Clause, exceptionally approved by CNCF
# (https://github.com/cncf/foundation/issues/1154#issuecomment-3562385979)
#
# The list of the CNCF-approved licenses can be found here:
# https://github.com/cncf/foundation/blob/main/allowed-third-party-license-policy.md
go-licenses-ignore: |
github.com/multiformats/go-base36
github.com/cyphar/filepath-securejoin
================================================
FILE: .github/workflows/job-test-dependencies.yml
================================================
# This job pre-heats the cache for the test image by building all dependencies
name: job-test-dependencies
on:
workflow_call:
inputs:
timeout:
required: true
type: number
runner:
required: true
type: string
containerd-version:
required: false
default: ''
type: string
env:
GOTOOLCHAIN: local
jobs:
# This job builds the dependency target of the test docker image for all supported architectures and cache it in GHA
build-dependencies:
# Note: for whatever reason, you cannot access env.RUNNER_ARCH here
name: "${{ contains(inputs.runner, 'arm') && 'arm64' || 'amd64' }}${{ inputs.containerd-version && format(' | {0}', inputs.containerd-version) || ''}}"
timeout-minutes: ${{ inputs.timeout }}
runs-on: "${{ inputs.runner }}"
defaults:
run:
shell: bash
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: "Init: expose GitHub Runtime variables for gha"
uses: crazy-max/ghaction-github-runtime@04d248b84655b509d8c44dc1d6f990c879747487 # v4.0.0
- name: "Run: build dependencies for the integration test environment image"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Cache is sharded per-architecture
arch=${{ env.RUNNER_ARCH == 'ARM64' && 'arm64' || 'amd64' }}
docker buildx create --name with-gha --use
# Honor old containerd if requested
args=()
if [ "${{ inputs.containerd-version }}" != "" ]; then
args=(--build-arg CONTAINERD_VERSION=${{ inputs.containerd-version }})
fi
docker buildx build \
--secret id=github_token,env=GITHUB_TOKEN \
--cache-to type=gha,compression=zstd,mode=max,scope=test-integration-dependencies-"$arch" \
--cache-from type=gha,scope=test-integration-dependencies-"$arch" \
--target build-dependencies "${args[@]}" .
================================================
FILE: .github/workflows/job-test-in-container.yml
================================================
# This job runs integration tests inside a container, for all supported variants (ipv6, canary, etc)
# Note that it is linux and nerdctl (+/- gomodjail) only.
name: job-test-in-container
on:
workflow_call:
inputs:
timeout:
required: true
type: number
runner:
required: true
type: string
canary:
required: false
default: false
type: boolean
target:
required: false
default: ''
type: string
binary:
required: false
default: nerdctl
type: string
containerd-version:
required: false
default: ''
type: string
rootlesskit-version:
required: false
default: ''
type: string
ipv6:
required: false
default: false
type: boolean
skip-flaky:
required: false
default: false
type: boolean
env:
GOTOOLCHAIN: local
jobs:
test:
name: |
${{ inputs.binary != 'nerdctl' && format('{0} < ', inputs.binary) || '' }}
${{ inputs.target }}
${{ contains(inputs.runner, 'arm') && '(arm)' || '' }}
${{ contains(inputs.runner, '22.04') && '(old ubuntu)' || '' }}
${{ inputs.ipv6 && ' (ipv6)' || '' }}
${{ inputs.canary && ' (canary)' || '' }}
${{ inputs.containerd-version && format(' (ctd: {0})', inputs.containerd-version) || '' }}
${{ inputs.rootlesskit-version && format(' (rlk: {0})', inputs.rootlesskit-version) || '' }}
timeout-minutes: ${{ inputs.timeout }}
runs-on: ${{ inputs.runner }}
defaults:
run:
shell: bash
env:
# https://github.com/containerd/nerdctl/issues/622
# The only case when rootlesskit-version is force-specified is when we downgrade explicitly to v1
WORKAROUND_ISSUE_622: ${{ inputs.rootlesskit-version }}
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: "Init: expose GitHub Runtime variables for gha"
uses: crazy-max/ghaction-github-runtime@04d248b84655b509d8c44dc1d6f990c879747487 # v4.0.0
- name: "Init: install br-netfilter"
run: |
# This ensures that bridged traffic goes through netfilter
sudo modprobe br-netfilter
- name: "Init: register QEMU (tonistiigi/binfmt)"
run: |
# `--install all` will only install emulation for architectures that cannot be natively executed
# Since some arm64 platforms do provide native fallback execution for 32 bits,
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# To avoid that, we explicitly list the architectures we do want emulation for.
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
- if: ${{ inputs.canary }}
name: "Init (canary): prepare updated test image"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
. ./hack/build-integration-canary.sh
canary::build::integration
- if: ${{ ! inputs.canary }}
name: "Init: prepare test image"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
buildargs=()
# If the runner is old, use old ubuntu inside the container as well
[ "${{ contains(inputs.runner, '22.04') }}" != "true" ] || buildargs=(--build-arg UBUNTU_VERSION=22.04)
# Honor if we want old containerd
[ "${{ inputs.containerd-version }}" == "" ] || buildargs+=(--build-arg CONTAINERD_VERSION=${{ inputs.containerd-version }})
# Honor custom targets and if we want old rootlesskit
target=test-integration
if [ "${{ inputs.target }}" != "rootful" ]; then
target+=-${{ inputs.target }}
if [ "${{ inputs.rootlesskit-version }}" != "" ]; then
buildargs+=(--build-arg ROOTLESSKIT_VERSION=${{ inputs.rootlesskit-version }})
fi
fi
# Cache is sharded per-architecture
arch=${{ env.RUNNER_ARCH == 'ARM64' && 'arm64' || 'amd64' }}
docker buildx create --name with-gha --use
docker buildx build \
--secret id=github_token,env=GITHUB_TOKEN \
--output=type=docker \
--cache-from type=gha,scope=test-integration-dependencies-"$arch" \
-t "$target" --target "$target" \
"${buildargs[@]}" \
.
# Rootful needs to disable snap
- if: ${{ inputs.target == 'rootful' }}
name: "Init: remove snap loopback devices (conflicts with our loopback devices in TestRunDevice)"
run: |
sudo systemctl disable --now snapd.service snapd.socket
sudo apt-get purge -qq snapd
sudo losetup -Dv
sudo losetup -lv
# Rootless on modern ubuntu wants apparmor
- if: ${{ inputs.target != 'rootful' && ! contains(inputs.runner, '22.04') }}
name: "Init: prepare apparmor for rootless + ubuntu 24+"
run: |
cat <<EOT | sudo tee "/etc/apparmor.d/usr.local.bin.rootlesskit"
abi <abi/4.0>,
include <tunables/global>
/usr/local/bin/rootlesskit flags=(unconfined) {
userns,
# Site-specific additions and overrides. See local/README for details.
include if exists <local/usr.local.bin.rootlesskit>
}
EOT
sudo systemctl restart apparmor.service
# ipv6 wants... ipv6
- if: ${{ inputs.ipv6 }}
name: "Init: ipv6"
run: |
# Enable ipv4 and ipv6 forwarding
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv4.ip_forward=1
# Enable IPv6 for Docker, and configure docker to use containerd for gha
sudo mkdir -p /etc/docker
echo '{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64", "ip6tables": true}' | sudo tee /etc/docker/daemon.json
- name: "Init: enable Docker experimental features"
run: |
sudo mkdir -p /etc/docker
if [ -f /etc/docker/daemon.json ]; then
tmpfile="$(sudo mktemp)"
sudo jq '.experimental = true' /etc/docker/daemon.json | sudo tee "$tmpfile" >/dev/null
sudo mv "$tmpfile" /etc/docker/daemon.json
else
echo '{"experimental": true}' | sudo tee /etc/docker/daemon.json >/dev/null
fi
sudo systemctl restart docker
- name: "Run: integration tests"
run: |
. ./hack/github/action-helpers.sh
github::md::h2 "non-flaky" >> "$GITHUB_STEP_SUMMARY"
# IPV6 note: nested IPv6 network inside docker and qemu is complex and needs a bunch of sysctl config.
# Therefore, it's hard to debug why the IPv6 tests fail in such an isolation layer.
# On the other side, using the host network is easier at configuration.
# Besides, each job is running on a different instance, which means using host network here
# is safe and has no side effects on others.
[ "${{ inputs.target }}" == "rootful" ] \
&& args=(test-integration ./hack/test-integration.sh -test.allow-modify-users=true) \
|| args=(test-integration-${{ inputs.target }} /test-integration-rootless.sh ./hack/test-integration.sh)
if [ "${{ inputs.ipv6 }}" == true ]; then
docker run --network host -t --rm --privileged -e GITHUB_STEP_SUMMARY="$GITHUB_STEP_SUMMARY" -v "$GITHUB_STEP_SUMMARY":"$GITHUB_STEP_SUMMARY" -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622:-} "${args[@]}" -test.only-flaky=false -test.only-ipv6 -test.target=${{ inputs.binary }}
else
docker run -t --rm --privileged -e GITHUB_STEP_SUMMARY="$GITHUB_STEP_SUMMARY" -v "$GITHUB_STEP_SUMMARY":"$GITHUB_STEP_SUMMARY" -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622:-} "${args[@]}" -test.only-flaky=false -test.target=${{ inputs.binary }}
fi
# FIXME: this NEEDS to go away
- name: "Run: integration tests (flaky)"
if: ${{ !fromJSON(inputs.skip-flaky) }}
run: |
. ./hack/github/action-helpers.sh
github::md::h2 "flaky" >> "$GITHUB_STEP_SUMMARY"
[ "${{ inputs.target }}" == "rootful" ] \
&& args=(test-integration ./hack/test-integration.sh) \
|| args=(test-integration-${{ inputs.target }} /test-integration-rootless.sh ./hack/test-integration.sh)
if [ "${{ inputs.ipv6 }}" == true ]; then
docker run --network host -t --rm --privileged -e GITHUB_STEP_SUMMARY="$GITHUB_STEP_SUMMARY" -v "$GITHUB_STEP_SUMMARY":"$GITHUB_STEP_SUMMARY" -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622:-} "${args[@]}" -test.only-flaky=true -test.only-ipv6 -test.target=${{ inputs.binary }}
else
docker run -t --rm --privileged -e GITHUB_STEP_SUMMARY="$GITHUB_STEP_SUMMARY" -v "$GITHUB_STEP_SUMMARY":"$GITHUB_STEP_SUMMARY" -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622:-} "${args[@]}" -test.only-flaky=true -test.target=${{ inputs.binary }}
fi
================================================
FILE: .github/workflows/job-test-in-host.yml
================================================
# This currently test docker and nerdctl on windows (w/o canary)
# Structure is in to allow testing nerdctl on linux as well, though more work is required to make it functional.
name: job-test-in-host
on:
workflow_call:
inputs:
timeout:
required: true
type: number
runner:
required: true
type: string
canary:
required: false
default: false
type: boolean
binary:
required: false
default: nerdctl
type: string
go-version:
required: true
type: string
docker-version:
required: true
type: string
containerd-version:
required: true
type: string
containerd-sha:
required: true
type: string
containerd-service-sha:
required: true
type: string
windows-cni-version:
required: true
type: string
linux-cni-version:
required: true
type: string
linux-cni-sha:
required: true
type: string
env:
GOTOOLCHAIN: local
jobs:
test:
name: |
${{ inputs.binary != 'nerdctl' && format('{0} < ', inputs.binary) || '' }}
${{ contains(inputs.runner, 'ubuntu') && ' linux' || ' windows' }}
${{ contains(inputs.runner, 'arm') && '(arm)' || '' }}
${{ contains(inputs.runner, '22.04') && '(old ubuntu)' || '' }}
${{ inputs.canary && ' (canary)' || '' }}
timeout-minutes: ${{ inputs.timeout }}
runs-on: "${{ inputs.runner }}"
defaults:
run:
shell: bash
env:
SHOULD_RUN: "yes"
GO_VERSION: ${{ inputs.go-version }}
# Both Docker and nerdctl on linux need rootful right now
WITH_SUDO: ${{ contains(inputs.runner, 'ubuntu') }}
CONTAINERD_VERSION: ${{ inputs.containerd-version }}
CONTAINERD_SHA: ${{ inputs.containerd-sha }}
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- if: ${{ inputs.canary }}
name: "Init (canary): retrieve latest go and containerd"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
latest_go="$(. ./hack/provisioning/version/fetch.sh; go::canary::for::go-setup)"
latest_containerd="$(. ./hack/provisioning/version/fetch.sh; github::project::latest "containerd/containerd")"
[ "$latest_go" == "" ] || \
printf "GO_VERSION=%s\n" "$latest_go" >> "$GITHUB_ENV"
[ "${latest_containerd:1}" == "$CONTAINERD_VERSION" ] || {
printf "CONTAINERD_VERSION=%s\n" "${latest_containerd:1}" >> "$GITHUB_ENV"
printf "CONTAINERD_SHA=canary is volatile and I accept the risk\n" >> "$GITHUB_ENV"
}
if [ "$latest_go" == "" ] && [ "${latest_containerd:1}" == "$CONTAINERD_VERSION" ]; then
echo "::warning title=No canary::There is currently no canary versions to test. Steps will not run.";
printf "SHOULD_RUN=no\n" >> "$GITHUB_ENV"
fi
- if: ${{ env.SHOULD_RUN == 'yes' }}
name: "Init: install go"
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
# XXX RUNNER_OS and generally env is too unreliable
# - if: ${{ env.RUNNER_OS == 'Linux' }}
- if: ${{ contains(inputs.runner, 'ubuntu') && env.SHOULD_RUN == 'yes' }}
name: "Init (linux): prepare host"
run: |
if [ "${{ contains(inputs.binary, 'docker') }}" == true ]; then
echo "::group:: configure cdi and experimental for docker"
sudo mkdir -p /etc/docker
sudo jq -n '.features.cdi = true | .experimental = true' | sudo tee /etc/docker/daemon.json
echo "::endgroup::"
echo "::group:: downgrade docker to the specific version we want to test (${{ inputs.docker-version }})"
sudo apt-get update -qq
sudo apt-get install -qq ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo cp ./hack/provisioning/gpg/docker /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update -qq
sudo apt-get install -qq --allow-downgrades docker-ce=${{ inputs.docker-version }} docker-ce-cli=${{ inputs.docker-version }}
sudo systemctl restart docker
echo "::endgroup::"
else
# FIXME: this is missing runc (see top level workflow note about the state of this)
echo "::group:: install dependencies"
sudo ./hack/provisioning/linux/containerd.sh uninstall
./hack/provisioning/linux/containerd.sh rootful "$CONTAINERD_VERSION" "amd64" "$CONTAINERD_SHA" "${{ inputs.containerd-service-sha }}"
sudo ./hack/provisioning/linux/cni.sh uninstall
./hack/provisioning/linux/cni.sh install "${{ inputs.linux-cni-version }}" "amd64" "${{ inputs.linux-cni-sha }}"
echo "::endgroup::"
echo "::group:: build nerctl"
go install ./cmd/nerdctl
echo "$HOME/go/bin" >> "$GITHUB_PATH"
# Since tests are going to run root, we need nerdctl to be in a PATH that will survive `sudo`
sudo cp "$(which nerdctl)" /usr/local/bin
echo "::endgroup::"
fi
# Register QEMU (tonistiigi/binfmt)
# `--install all` will only install emulation for architectures that cannot be natively executed
# Since some arm64 platforms do provide native fallback execution for 32 bits,
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# To avoid that, we explicitly list the architectures we do want emulation for.
echo "::group:: install binfmt"
docker run --quiet --privileged --rm tonistiigi/binfmt --install linux/amd64
docker run --quiet --privileged --rm tonistiigi/binfmt --install linux/arm64
docker run --quiet --privileged --rm tonistiigi/binfmt --install linux/arm/v7
echo "::endgroup::"
# FIXME: remove expect when we are done removing unbuffer from tests
echo "::group:: installing test dependencies"
sudo add-apt-repository ppa:criu/ppa -y
sudo apt-get install -qq expect criu
echo "::endgroup::"
# This ensures that bridged traffic goes through netfilter
sudo modprobe br-netfilter
- if: ${{ contains(inputs.runner, 'windows') && env.SHOULD_RUN == 'yes' }}
name: "Init (windows): prepare host"
env:
ctrdVersion: ${{ env.CONTAINERD_VERSION }}
run: |
# Install WinCNI
echo "::group:: install wincni"
GOPATH=$(go env GOPATH) WINCNI_VERSION=${{ inputs.windows-cni-version }} ./hack/provisioning/windows/cni.sh
echo "::endgroup::"
# Install containerd
echo "::group:: install containerd"
powershell hack/provisioning/windows/containerd.ps1
echo "::endgroup::"
# Install nerdctl
echo "::group:: build nerctl"
go install ./cmd/nerdctl
echo "::endgroup::"
choco install jq
- if: ${{ env.SHOULD_RUN == 'yes' }}
name: "Init: install dev tools"
run: |
echo "::group:: make install-dev-tools"
make install-dev-tools
echo "::endgroup::"
# ipv6 is tested only on linux
- if: ${{ contains(inputs.runner, 'ubuntu') && env.SHOULD_RUN == 'yes' }}
name: "Run (linux): integration tests (IPv6)"
run: |
. ./hack/github/action-helpers.sh
github::md::h2 "ipv6" >> "$GITHUB_STEP_SUMMARY"
./hack/test-integration.sh -test.target=${{ inputs.binary }} -test.only-ipv6
- if: ${{ env.SHOULD_RUN == 'yes' }}
name: "Run: integration tests"
run: |
. ./hack/github/action-helpers.sh
github::md::h2 "non-flaky" >> "$GITHUB_STEP_SUMMARY"
./hack/test-integration.sh -test.target=${{ inputs.binary }} -test.only-flaky=false
# FIXME: this must go
- if: ${{ env.SHOULD_RUN == 'yes' }}
name: "Run: integration tests (flaky)"
run: |
. ./hack/github/action-helpers.sh
github::md::h2 "flaky" >> "$GITHUB_STEP_SUMMARY"
./hack/test-integration.sh -test.target=${{ inputs.binary }} -test.only-flaky=true
================================================
FILE: .github/workflows/job-test-in-lima.yml
================================================
# Currently, Lima job test only for EL, though in the future it could be used to also test FreeBSD or other linux-es
name: job-test-in-lima
on:
workflow_call:
inputs:
timeout:
required: true
type: number
runner:
required: true
type: string
target:
required: true
type: string
guest:
required: true
type: string
skip-flaky:
required: false
default: false
type: boolean
jobs:
test:
name: "${{ inputs.guest }} ${{ inputs.target }}"
timeout-minutes: ${{ inputs.timeout }}
runs-on: "${{ inputs.runner }}"
env:
TARGET: ${{ inputs.target }}
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: "Init: lima"
uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0
id: lima-actions-setup
- name: "Init: Cache"
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.cache/lima
key: lima-${{ steps.lima-actions-setup.outputs.version }}
- name: "Init: start the guest VM"
run: |
set -eux
# containerd=none is set because the built-in containerd support conflicts with Docker
limactl start \
--name=default \
--cpus=4 \
--memory=12 \
--containerd=none \
--set '.mounts=null | .portForwards=[{"guestSocket":"/var/run/docker.sock","hostSocket":"{{.Dir}}/sock/docker.sock"}]' \
template://${{ inputs.guest }}
# FIXME: the tests should be directly executed in the VM without nesting Docker inside it
# https://github.com/containerd/nerdctl/issues/3858
- name: "Init: install dockerd in the guest VM"
run: |
set -eux
lima sudo mkdir -p /etc/systemd/system/docker.socket.d
cat <<-EOF | lima sudo tee /etc/systemd/system/docker.socket.d/override.conf
[Socket]
SocketUser=$(whoami)
EOF
lima sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
lima sudo dnf -q -y install docker-ce --nobest
lima sudo systemctl enable --now docker
- name: "Init: configure the host to use dockerd in the guest VM"
run: |
set -eux
sudo systemctl disable --now docker.service docker.socket
export DOCKER_HOST="unix://$(limactl ls --format '{{.Dir}}/sock/docker.sock' default)"
echo "DOCKER_HOST=${DOCKER_HOST}" >>$GITHUB_ENV
docker info
docker version
- name: "Init: install br-netfilter in the guest VM"
run: |
lima sudo modprobe br-netfilter
- name: "Init: expose GitHub Runtime variables for gha"
uses: crazy-max/ghaction-github-runtime@04d248b84655b509d8c44dc1d6f990c879747487 # v4.0.0
- name: "Init: prepare integration tests"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eux
sudo losetup -Dv
sudo losetup -lv
[ "$TARGET" = "rootless" ] && TARGET=test-integration-rootless || TARGET=test-integration
docker buildx create --name with-gha --use
docker buildx build \
--secret id=github_token,env=GITHUB_TOKEN \
--output=type=docker \
--cache-from type=gha,scope=test-integration-dependencies-amd64 \
-t test-integration --target "${TARGET}" \
.
- name: "Run integration tests"
# Presumably, something is broken with the way docker exposes /dev to the container, as it appears to only
# randomly work. Mounting /dev does workaround the issue.
# This might be due to the old kernel shipped with Alma (4.18), or something else between centos/docker.
run: |
set -eux
if [ "$TARGET" = "rootless" ]; then
echo "rootless"
docker run -t -v /dev:/dev --rm --privileged test-integration /test-integration-rootless.sh ./hack/test-integration.sh -test.only-flaky=false
else
echo "rootful"
docker run -t -v /dev:/dev --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky=false
fi
- name: "Run: integration tests (flaky)"
if: ${{ !fromJSON(inputs.skip-flaky) }}
run: |
set -eux
if [ "$TARGET" = "rootless" ]; then
echo "rootless"
docker run -t -v /dev:/dev --rm --privileged test-integration /test-integration-rootless.sh ./hack/test-integration.sh -test.only-flaky=true
else
echo "rootful"
docker run -t -v /dev:/dev --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky=true
fi
================================================
FILE: .github/workflows/job-test-in-vagrant.yml
================================================
# Right now, this is testing solely FreeBSD, but could be used to test other targets.
# Alternatively, this might get replaced entirely by Lima eventually.
name: job-test-in-vagrant
on:
workflow_call:
inputs:
timeout:
required: true
type: number
runner:
required: true
type: string
jobs:
test:
# Will appear as freebsd / 14 in GitHub UI
name: "14"
timeout-minutes: ${{ inputs.timeout }}
runs-on: "${{ inputs.runner }}"
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: "Init: setup cache"
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /root/.vagrant.d
key: vagrant
- name: "Init: set up vagrant"
run: |
# from https://github.com/containerd/containerd/blob/v2.0.2/.github/workflows/ci.yml#L583-L596
# which is based on https://github.com/opencontainers/runc/blob/v1.1.8/.cirrus.yml#L41-L49
# FIXME: https://github.com/containerd/nerdctl/issues/4163
cat ./hack/provisioning/gpg/hashicorp | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
sudo apt-get update -qq
sudo apt-get install -qq libvirt-daemon libvirt-daemon-system vagrant ovmf
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646
sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/
sudo systemctl enable --now libvirtd
sudo apt-get build-dep -qq ruby-libvirt
sudo apt-get install -qq --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
# Disable strict dependency enforcement to bypass gem version conflicts during the installation of the vagrant-libvirt plugin.
sudo env VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 vagrant plugin install vagrant-libvirt
- name: "Init: boot VM"
run: |
ln -sf Vagrantfile.freebsd Vagrantfile
sudo vagrant up --no-tty
- name: "Run: test-unit"
run: sudo vagrant up --provision-with=test-unit
- name: "Run: test-integration"
run: sudo vagrant up --provision-with=test-integration
================================================
FILE: .github/workflows/job-test-unit.yml
================================================
# Note: freebsd tests are not ran here (see integration instead)
name: job-test-unit
on:
workflow_call:
inputs:
timeout:
required: true
type: number
go-version:
required: true
type: string
runner:
required: true
type: string
canary:
required: false
default: false
type: boolean
windows-cni-version:
required: true
type: string
linux-cni-version:
required: true
type: string
linux-cni-sha:
required: true
type: string
env:
GOTOOLCHAIN: local
# Windows fails without this
CGO_ENABLED: 0
jobs:
test-unit:
name: ${{ format('{0}{1}', inputs.runner, inputs.canary && ' (go canary)' || '') }}
timeout-minutes: ${{ inputs.timeout }}
runs-on: "${{ inputs.runner }}"
defaults:
run:
shell: bash
env:
GO_VERSION: ${{ inputs.go-version }}
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
# If canary is requested, check for the latest unstable release
- if: ${{ inputs.canary }}
name: "Init (canary): retrieve GO_VERSION"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
latest_go="$(. ./hack/provisioning/version/fetch.sh; go::canary::for::go-setup)"
printf "GO_VERSION=%s\n" "$latest_go" >> "$GITHUB_ENV"
[ "$latest_go" != "" ] || \
echo "::warning title=No canary go::There is currently no canary go version to test. Following steps will not run."
- if: ${{ env.GO_VERSION != '' }}
name: "Init: install go"
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
# Install CNI and CRIU
- if: ${{ env.GO_VERSION != '' }}
name: "Init: set up CNI and CRIU"
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
GOPATH=$(go env GOPATH) WINCNI_VERSION=${{ inputs.windows-cni-version }} ./hack/provisioning/windows/cni.sh
elif [ "$RUNNER_OS" == "Linux" ]; then
./hack/provisioning/linux/cni.sh install "${{ inputs.linux-cni-version }}" "amd64" "${{ inputs.linux-cni-sha }}"
sudo apt-get update -qq
sudo add-apt-repository ppa:criu/ppa -y
sudo apt-get install -qq criu
fi
- if: ${{ env.GO_VERSION != '' }}
name: "Run"
run: |
make test-unit
# On linux, also run with root
- if: ${{ env.GO_VERSION != '' && env.RUNNER_OS == 'Linux' }}
name: "Run: with root"
run: |
sudo make test-unit
================================================
FILE: .github/workflows/release.yml
================================================
# See https://github.com/containerd/nerdctl/blob/main/MAINTAINERS_GUIDE.md for how to make a release.
name: Release
on:
push:
tags:
- 'v*'
- 'test-action-release-*'
pull_request:
paths-ignore:
- '**.md'
env:
GOTOOLCHAIN: local
jobs:
release:
runs-on: ubuntu-24.04
timeout-minutes: 40
# The maximum access is "read" for PRs from public forked repos
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
contents: write # for releases
id-token: write # for provenances
attestations: write # for provenances
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# FIXME: setup-qemu-action is depended by `gomodjail pack`
- name: "Set up QEMU"
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: "Install go"
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: "1.25"
check-latest: true
- name: "Compile binaries"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make artifacts
- name: "SHA256SUMS"
run: |
( cd _output; sha256sum nerdctl-* ) | tee /tmp/SHA256SUMS
mv /tmp/SHA256SUMS _output/SHA256SUMS
- name: "The sha256sum of the SHA256SUMS file"
run: (cd _output; sha256sum SHA256SUMS)
- name: "Prepare the release note"
run: |
shasha=$(sha256sum _output/SHA256SUMS | awk '{print $1}')
cat <<-EOF | tee /tmp/release-note.txt
$(hack/generate-release-note.sh)
- - -
The binaries were built automatically on GitHub Actions.
The build log is available for 90 days: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
The sha256sum of the SHA256SUMS file itself is \`${shasha}\` .
- - -
Release manager: [ADD YOUR NAME HERE] (@[ADD YOUR GITHUB ID HERE])
EOF
- name: "Generate artifact attestation"
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
with:
subject-path: _output/*
- name: "Create release"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF##*/}"
gh release create -F /tmp/release-note.txt --draft --title "${tag}" "${tag}" _output/*
================================================
FILE: .github/workflows/workflow-flaky.yml
================================================
# This workflow puts together all known "flaky" and experimental targets
name: "[flaky, see #3988]"
on:
push:
branches:
- main
- 'release/**'
pull_request:
paths-ignore:
- '**.md'
jobs:
test-integration-el:
name: "EL${{ inputs.hack }}"
uses: ./.github/workflows/job-test-in-lima.yml
strategy:
fail-fast: false
# EL8 is used for testing compatibility with cgroup v1.
# Unfortunately, EL8 is hard to debug for ARM Mac users (as Lima+ARM Mac+EL8 is not runnable because of page size),
# and it currently shows numerous issues.
# ARM Mac users may use oraclelinux-8 instead for debugging cgroup v1 issues, although its kernel is different from
# other EL8 variants.
matrix:
guest: ["almalinux-8"]
target: ["rootful", "rootless"]
with:
timeout: 60
runner: ubuntu-24.04
guest: ${{ matrix.guest }}
target: ${{ matrix.target }}
skip-flaky: true # skip the most flaky ones for now
test-integration-freebsd:
name: "FreeBSD"
uses: ./.github/workflows/job-test-in-vagrant.yml
with:
timeout: 15
runner: ubuntu-24.04
kube:
name: "kubernetes"
runs-on: ubuntu-24.04
timeout-minutes: 15
env:
ROOTFUL: true
steps:
- name: "Init: checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: "Run"
run: |
# FIXME: this should be a bit more elegant to use.
./hack/provisioning/kube/kind.sh
# See https://github.com/containerd/nerdctl/blob/main/docs/testing/README.md#about-parallelization
sudo ./_output/nerdctl exec nerdctl-test-control-plane bash -c -- 'export TMPDIR="$HOME"/tmp; mkdir -p "$TMPDIR"; cd /nerdctl-source; /usr/local/go/bin/go test -p 1 ./cmd/nerdctl/... -test.only-kubernetes'
================================================
FILE: .github/workflows/workflow-lint.yml
================================================
name: lint
on:
push:
branches:
- main
- 'release/**'
pull_request:
jobs:
# Runs golangci to ensure that:
# 1. the tooling is working on the target platform
# 2. the linter is happy
# 3. for canary (if there is a canary go version), does lint for all supported goos
lint-go:
name: "go${{ inputs.hack }}"
uses: ./.github/workflows/job-lint-go.yml
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
goos: linux
- runner: ubuntu-24.04
goos: freebsd
- runner: macos-15
goos: darwin
# FIXME: this is currently failing in a nonsensical way, so, running on linux instead...
# - runner: windows-2022
- runner: ubuntu-24.04
goos: windows
# Additionally lint for canary
- runner: ubuntu-24.04
goos: linux
canary: true
with:
timeout: 10
go-version: "1.25"
runner: ubuntu-24.04
# Note: in GitHub yaml world, if `matrix.canary` is undefined, and is passed to `inputs.canary`, the job
# will not run. However, if you test it, it will coerce to `false`, hence:
canary: ${{ matrix.canary && true || false }}
goos: ${{ matrix.goos }}
# Run common project checks (commits, licenses, etc)
lint-project-checks:
name: "project checks"
uses: ./.github/workflows/job-lint-project.yml
with:
timeout: 5
go-version: "1.25"
runner: ubuntu-24.04
# Lint for shell and yaml files
lint-other:
name: "other"
uses: ./.github/workflows/job-lint-other.yml
with:
timeout: 5
runner: ubuntu-24.04
# Verify we can actually build on all supported platforms, and a bunch of architectures
build-for-go:
name: "build for${{ inputs.hack }}"
uses: ./.github/workflows/job-build.yml
strategy:
fail-fast: false
matrix:
include:
# Build for both old and stable go
- go-version: "1.24"
- go-version: "1.25"
# Additionally build for canary
- go-version: "1.25"
canary: true
with:
timeout: 10
go-version: ${{ matrix.go-version }}
runner: ubuntu-24.04
canary: ${{ matrix.canary && true || false }}
================================================
FILE: .github/workflows/workflow-test.yml
================================================
name: test
on:
push:
branches:
- main
- 'release/**'
pull_request:
paths-ignore:
- '**.md'
jobs:
test-unit:
# Note: inputs.hack is undefined - its purpose is to prevent GitHub Actions from displaying all matrix variants as part of the name.
name: "unit${{ inputs.hack }}"
uses: ./.github/workflows/job-test-unit.yml
strategy:
fail-fast: false
matrix:
# Run on all supported platforms but freebsd
# Additionally run on canary for linux
include:
- runner: "ubuntu-24.04"
- runner: "macos-15"
- runner: "windows-2025"
- runner: "ubuntu-24.04"
canary: true
with:
runner: ${{ matrix.runner }}
canary: ${{ matrix.canary && true || false }}
# Windows routinely go over 5 minutes
timeout: 10
go-version: 1.25
windows-cni-version: v0.3.1
linux-cni-version: v1.7.1
linux-cni-sha: 1a28a0506bfe5bcdc981caf1a49eeab7e72da8321f1119b7be85f22621013098
# This job builds the dependency target of the test-image for all supported architectures and cache it in GHA
build-dependencies:
name: "dependencies${{ inputs.hack }}"
uses: ./.github/workflows/job-test-dependencies.yml
strategy:
fail-fast: false
matrix:
include:
# Build for arm & amd, current containerd
- runner: ubuntu-24.04
- runner: ubuntu-24.04-arm
# Additionally build for old containerd on amd
- runner: ubuntu-24.04
containerd-version: v1.7.30
with:
runner: ${{ matrix.runner }}
containerd-version: ${{ matrix.containerd-version }}
timeout: 20
test-integration-container:
name: "in-container${{ inputs.hack }}"
uses: ./.github/workflows/job-test-in-container.yml
needs: build-dependencies
strategy:
fail-fast: false
matrix:
include:
###### Rootless
# amd64
- runner: ubuntu-24.04
target: rootless
# arm64
- runner: ubuntu-24.04-arm
target: rootless
skip-flaky: true
# port-slirp4netns
- runner: ubuntu-24.04
target: rootless-port-slirp4netns
skip-flaky: true
# old containerd + old ubuntu + old rootlesskit
- runner: ubuntu-22.04
target: rootless
containerd-version: v1.7.30
rootlesskit-version: v1.1.1
# gomodjail
- runner: ubuntu-24.04
target: rootless
binary: "nerdctl.gomodjail"
###### Rootful
# amd64
- runner: ubuntu-24.04
target: rootful
# arm64
- runner: ubuntu-24.04-arm
target: rootful
skip-flaky: true
# old containerd + old ubuntu
- runner: ubuntu-22.04
target: rootful
containerd-version: v1.7.30
# ipv6
- runner: ubuntu-24.04
target: rootful
ipv6: true
skip-flaky: true
# all canary
- runner: ubuntu-24.04
target: rootful
canary: true
with:
timeout: 80
runner: ${{ matrix.runner }}
target: ${{ matrix.target }}
binary: ${{ matrix.binary && matrix.binary || 'nerdctl' }}
containerd-version: ${{ matrix.containerd-version }}
rootlesskit-version: ${{ matrix.rootlesskit-version }}
ipv6: ${{ matrix.ipv6 && true || false }}
canary: ${{ matrix.canary && true || false }}
skip-flaky: ${{ matrix.skip-flaky && true || false }}
test-integration-host:
name: "in-host${{ inputs.hack }}"
uses: ./.github/workflows/job-test-in-host.yml
strategy:
fail-fast: false
matrix:
include:
# Test on windows w/o canary
- runner: windows-2022
- runner: windows-2025
canary: true
# Test docker on linux
- runner: ubuntu-24.04
binary: docker
# FIXME: running nerdctl on the host is work in progress
# (we miss runc to be installed on the host - and obviously other deps)
# Plan is to pause this for now and first consolidate dependencies management (wrt Dockerfile vs. host-testing CI)
# before we can really start testing linux nerdctl on the host.
# - runner: ubuntu-24.04
# - runner: ubuntu-24.04
# canary: true
with:
timeout: 45
runner: ${{ matrix.runner }}
binary: ${{ matrix.binary != '' && matrix.binary || 'nerdctl' }}
canary: ${{ matrix.canary && true || false }}
go-version: 1.25
windows-cni-version: v0.3.1
docker-version: 5:28.0.4-1~ubuntu.24.04~noble
containerd-version: 2.2.1
# Note: these as for amd64
containerd-sha: f5d8e90ecb6c1c7e33ecddf8cc268a93b9e5b54e0e850320d765511d76624f41
containerd-service-sha: 1941362cbaa89dd591b99c32b050d82c583d3cd2e5fa63085d7017457ec5fca8
linux-cni-version: v1.9.0
linux-cni-sha: 58c03705426e929658f45a851df15a86d06ef680cacbf3f2dc127731ca265c28
================================================
FILE: .github/workflows/workflow-tigron.yml
================================================
name: tigron
on:
push:
branches:
- main
- 'release/**'
pull_request:
paths: 'mod/tigron/**'
env:
GO_VERSION: "1.25"
GOTOOLCHAIN: local
jobs:
lint:
timeout-minutes: 15
name: "${{ matrix.goos }} ${{ matrix.runner }} | go ${{ matrix.canary }}"
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
strategy:
matrix:
include:
- runner: ubuntu-24.04
- runner: macos-15
- runner: windows-2022
- runner: ubuntu-24.04
goos: freebsd
- runner: ubuntu-24.04
canary: go-canary
steps:
- name: "Checkout project"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 100
- if: ${{ matrix.canary }}
name: "Init (canary): retrieve GO_VERSION"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
latest_go="$(. ./hack/provisioning/version/fetch.sh; go::canary::for::go-setup)"
printf "GO_VERSION=%s\n" "$latest_go" >> "$GITHUB_ENV"
[ "$latest_go" != "" ] || \
echo "::warning title=No canary go::There is currently no canary go version to test. Steps will not run."
- if: ${{ env.GO_VERSION != '' }}
name: "Install go"
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- if: ${{ env.GO_VERSION != '' }}
name: "Install tools"
run: |
cd mod/tigron
echo "::group:: make install-dev-tools"
make install-dev-tools
if [ "$RUNNER_OS" == macOS ]; then
brew install yamllint shellcheck
fi
echo "::endgroup::"
- if: ${{ env.GO_VERSION != '' && matrix.goos == '' }}
name: "lint"
env:
NO_COLOR: true
run: |
if [ "$RUNNER_OS" == Linux ]; then
echo "::group:: lint"
cd mod/tigron
export LINT_COMMIT_RANGE="$(jq -r '.after + "..HEAD"' ${GITHUB_EVENT_PATH})"
make lint
echo "::endgroup::"
else
echo "Lint is disabled on $RUNNER_OS"
fi
- if: ${{ env.GO_VERSION != '' }}
name: "test-unit"
run: |
echo "::group:: unit test"
cd mod/tigron
make test-unit
echo "::endgroup::"
- if: ${{ env.GO_VERSION != '' }}
name: "test-unit-race"
run: |
echo "::group:: race test"
cd mod/tigron
make test-unit-race
echo "::endgroup::"
- if: ${{ env.GO_VERSION != '' }}
name: "test-unit-bench"
run: |
echo "::group:: bench"
cd mod/tigron
make test-unit-bench
echo "::endgroup::"
================================================
FILE: .gitignore
================================================
# artifacts
/nerdctl
_output
*.gomodjail
# golangci-lint
/build
# vagrant
/.vagrant
Vagrantfile
================================================
FILE: .golangci.yml
================================================
version: "2"
run:
modules-download-mode: readonly
issues:
max-issues-per-linter: 0
max-same-issues: 0
linters:
default: none
enable:
# 1. This is the default enabled set of golanci
# We should consider enabling errcheck
# - errcheck
- govet
- ineffassign
- staticcheck
- unused
# 2. These are not part of the default set
# Important to prevent import of certain packages
- depguard
# Removes unnecessary conversions
- unconvert
# Flag common typos
- misspell
# A meta-linter seen as a good replacement for golint
- revive
# Gocritic
- gocritic
- forbidigo
# 3. We used to use these, but have now removed them
# Use of prealloc is generally premature optimization and performance profiling should be done instead
# https://golangci-lint.run/usage/linters/#prealloc
# - prealloc
# Provided by revive in a better way
# - nakedret
settings:
forbidigo:
forbid:
# FIXME: there are still calls to os.WriteFile in tests under `cmd`
- pattern: ^os\.WriteFile.*$
pkg: github.com/containerd/nerdctl/v2/pkg
msg: os.WriteFile is neither atomic nor durable - use nerdctl filesystem.WriteFile instead
- pattern: ^os\.ReadFile.*$
pkg: github.com/containerd/nerdctl/v2/pkg
msg: use filesystem.ReadFile instead of os.ReadFile
staticcheck:
checks:
# Below is the default set
- "all"
- "-ST1000"
- "-ST1003"
- "-ST1016"
- "-ST1020"
- "-ST1021"
- "-ST1022"
##### TODO: fix and enable these
# 6 occurrences.
# Apply De Morgan’s law https://staticcheck.dev/docs/checks#QF1001
- "-QF1001"
# 10 occurrences.
# Convert if/else-if chain to tagged switch https://staticcheck.dev/docs/checks#QF1003
- "-QF1003"
##### These have been vetted to be disabled.
# 55 occurrences. Omit embedded fields from selector expression https://staticcheck.dev/docs/checks#QF1008
# Usefulness is questionable.
- "-QF1008"
revive:
enable-all-rules: true
rules:
# See https://revive.run/r
##### P0: we should do it ASAP.
- name: max-control-nesting
# 10 occurences (at default 5). Deep nesting hurts readibility.
arguments: [7]
- name: deep-exit
# 11 occurrences. Do not exit in random places.
disabled: true
- name: unchecked-type-assertion
# 14 occurrences. This is generally risky and encourages bad coding for newcomers.
disabled: true
- name: bare-return
# 31 occurrences. Bare returns are just evil, very unfriendly, and make reading and editing much harder.
disabled: true
- name: import-shadowing
# 44 occurrences. Shadowing makes things prone to errors / confusing to read.
disabled: true
- name: use-errors-new
# 84 occurrences. Improves error testing.
disabled: true
- name: struct-tag
# 2 occurrences.
disabled: true
##### P1: consider making a dent on these, but not critical.
- name: argument-limit
# 4 occurrences (at default 8). Long windy arguments list for functions are hard to read. Use structs instead.
arguments: [12]
- name: unnecessary-stmt
# 5 occurrences. Increase readability.
disabled: true
- name: defer
# 7 occurrences. Confusing to read for newbies.
disabled: true
- name: confusing-naming
# 10 occurrences. Hurts readability.
disabled: true
- name: early-return
# 10 occurrences. Would improve readability.
disabled: true
- name: function-result-limit
# 12 occurrences (at default 3). A function returning many results is probably too big.
arguments: [7]
- name: function-length
# 155 occurrences (at default 0, 75). Really long functions should really be broken up in most cases.
arguments: [0, 500]
- name: cyclomatic
# 204 occurrences (at default 10)
arguments: [100]
- name: unhandled-error
# 222 occurrences. Could indicate failure to handle broken conditions.
disabled: true
- name: cognitive-complexity
arguments: [205]
# 441 occurrences (at default 7). We should try to lower it (involves significant refactoring).
- name: var-naming
# 1 occurrence.
disabled: true
##### P2: nice to have.
- name: max-public-structs
# 7 occurrences (at default 5). Might indicate overcrowding of public API.
arguments: [25]
- name: confusing-results
# 13 occurrences. Have named returns when the type stutters.
# Makes it a bit easier to figure out function behavior just looking at signature.
disabled: true
- name: comment-spacings
# 50 occurrences. Makes code look less wonky / ease readability.
disabled: true
- name: use-any
# 30 occurrences. `any` instead of `interface{}`. Cosmetic.
disabled: true
- name: empty-lines
# 85 occurrences. Makes code look less wonky / ease readability.
disabled: true
- name: package-comments
# 100 occurrences. Better for documentation...
disabled: true
- name: exported
# 577 occurrences. Forces documentation of any exported symbol.
disabled: true
- name: unnecessary-format
# Many occurrences.
disabled: true
###### Permanently disabled. Below have been reviewed and vetted to be unnecessary.
- name: line-length-limit
# Formatter `golines` takes care of this.
disabled: true
- name: nested-structs
# 5 occurrences. Trivial. This is not that hard to read.
disabled: true
- name: flag-parameter
# 52 occurrences. Not sure if this is valuable.
disabled: true
- name: unused-parameter
# 505 occurrences. A lot of work for a marginal improvement.
disabled: true
- name: unused-receiver
# 31 occurrences. Ibid.
disabled: true
- name: add-constant
# 2605 occurrences. Kind of useful in itself, but unacceptable amount of effort to fix
disabled: true
- name: enforce-switch-style
# Many occurrences.
disabled: true
depguard:
rules:
no-patent:
# do not link in golang-lru anywhere (problematic patent)
deny:
- pkg: github.com/hashicorp/golang-lru/arc/v2
desc: patented (https://github.com/hashicorp/golang-lru/blob/arc/v2.0.7/arc/arc.go#L18)
pkg:
# pkg files must not depend on cobra nor anything in cmd
files:
- '**/pkg/**/*.go'
deny:
- pkg: github.com/spf13/cobra
desc: pkg must not depend on cobra
- pkg: github.com/spf13/pflag
desc: pkg must not depend on pflag
- pkg: github.com/spf13/viper
desc: pkg must not depend on viper
- pkg: github.com/containerd/nerdctl/v2/cmd
desc: pkg must not depend on any cmd files
gocritic:
disabled-checks:
# Below are normally enabled by default, but we do not pass
- appendAssign
- ifElseChain
- unslice
- badCall
- assignOp
- commentFormatting
- captLocal
- singleCaseSwitch
- wrapperFunc
- elseif
- regexpMust
enabled-checks:
# Below used to be enabled, but we do not pass anymore
# - paramTypeCombine
# - octalLiteral
# - unnamedResult
# - equalFold
# - sloppyReassign
# - emptyStringTest
# - hugeParam
# - appendCombine
# - stringXbytes
# - ptrToRefParam
# - commentedOutCode
# - rangeValCopy
# - methodExprCall
# - yodaStyleExpr
# - typeUnparen
# We enabled these and we pass
- nilValReturn
- weakCond
- indexAlloc
- rangeExprCopy
- boolExprSimplify
- commentedOutImport
- docStub
- emptyFallthrough
- hexLiteral
- typeAssertChain
- unlabelStmt
- builtinShadow
- initClause
- nestingReduce
- unnecessaryBlock
exclusions:
generated: disable
formatters:
settings:
gci:
sections:
- standard
- default
- prefix(github.com/containerd)
- localmodule
no-inline-comments: true
no-prefix-comments: true
custom-order: true
gofumpt:
extra-rules: true
golines:
max-len: 500
tab-len: 4
shorten-comments: true
enable:
- gci
- gofmt
# We might consider enabling the following:
# - gofumpt
- golines
exclusions:
generated: disable
================================================
FILE: .yamllint
================================================
---
extends: default
rules:
indentation:
spaces: 2
indent-sequences: consistent
truthy:
allowed-values: ['true', 'false', 'on', 'off']
comments-indentation: disable
document-start: disable
line-length: disable
================================================
FILE: BUILDING.md
================================================
# Building nerdctl
To build nerdctl, use `make`:
```bash
make
sudo make install
```
Alternatively, nerdctl can be also built with `go build ./cmd/nerdctl`.
However, this is not recommended as it does not populate the version string (`nerdctl -v`).
## Customization
To specify build tags, set the `BUILDTAGS` variable as follows:
```bash
BUILDTAGS=no_ipfs make
```
The following build tags are supported:
* `no_ipfs` (since v2.1.3): Disable IPFS
================================================
FILE: Dockerfile
================================================
# Copyright The containerd Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------------
# Usage: `docker run -it --privileged <IMAGE>`. Make sure to add `-t` and `--privileged`.
# Basic deps
# @BINARY: the binary checksums are verified via Dockerfile.d/SHA256SUMS.d/<COMPONENT>-<VERSION>
ARG CONTAINERD_VERSION=v2.2.1@dea7da592f5d1d2b7755e3a161be07f43fad8f75
ARG RUNC_VERSION=v1.4.0@8bd78a9977e604c4d5f67a7415d7b8b8c109cdc4
ARG CNI_PLUGINS_VERSION=v1.9.0@BINARY
# Extra deps: Build
ARG BUILDKIT_VERSION=v0.26.3@BINARY
# Extra deps: Lazy-pulling
ARG STARGZ_SNAPSHOTTER_VERSION=v0.18.1@BINARY
# Extra deps: Encryption
ARG IMGCRYPT_VERSION=v2.0.2@6892f4df2405cd15acbefd1dca970f53ba38bfda
# Extra deps: Rootless
ARG ROOTLESSKIT_VERSION=v2.3.6@BINARY
ARG SLIRP4NETNS_VERSION=v1.3.3@BINARY
# Extra deps: bypass4netns
ARG BYPASS4NETNS_VERSION=v0.4.2@aa04bd3dcc48c6dae6d7327ba219bda8fe2a4634
# Extra deps: FUSE-OverlayFS
ARG FUSE_OVERLAYFS_VERSION=v1.16@BINARY
ARG CONTAINERD_FUSE_OVERLAYFS_VERSION=v2.1.7@BINARY
# Extra deps: Init
ARG TINI_VERSION=v0.19.0@BINARY
# Extra deps: Debug
ARG BUILDG_VERSION=v0.5.3@BINARY
# Extra deps: gomodjail
ARG GOMODJAIL_VERSION=v0.1.3@cea529ddd971b677c67d8af7e936fbc62b35b98c
# Test deps
# Currently, the Docker Official Images and the test deps are not pinned by the hash
ARG GO_VERSION=1.25
ARG UBUNTU_VERSION=24.04
ARG CONTAINERIZED_SYSTEMD_VERSION=v0.1.1
ARG GOTESTSUM_VERSION=v1.13.0
ARG NYDUS_VERSION=v2.3.9
ARG SOCI_SNAPSHOTTER_VERSION=0.12.1
ARG KUBO_VERSION=v0.39.0
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.9.0@sha256:c64defb9ed5a91eacb37f96ccc3d4cd72521c4bd18d5442905b95e2226b0e707 AS xx
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-trixie AS build-base
COPY --from=xx / /
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
make \
git \
jq \
curl \
dpkg-dev
ARG TARGETARCH
# libbtrfs: for containerd
# libseccomp: for runc and bypass4netns
RUN xx-apt-get update -qq && xx-apt-get install -qq --no-install-recommends \
binutils \
gcc \
libc6-dev \
libbtrfs-dev \
libseccomp-dev \
pkg-config
RUN git config --global advice.detachedHead false
ADD hack/git-checkout-tag-with-hash.sh /usr/local/bin/
ADD hack/scripts/lib.sh /usr/local/bin/http::helper
FROM build-base AS build-containerd
ARG TARGETARCH
ARG CONTAINERD_VERSION
RUN git clone --quiet --depth 1 --branch "${CONTAINERD_VERSION%%@*}" https://github.com/containerd/containerd.git /go/src/github.com/containerd/containerd
WORKDIR /go/src/github.com/containerd/containerd
RUN git-checkout-tag-with-hash.sh ${CONTAINERD_VERSION} && \
mkdir -p /out /out/$TARGETARCH && \
cp -a containerd.service /out
RUN GO=xx-go make STATIC=1 && \
cp -a bin/containerd bin/containerd-shim-runc-v2 bin/ctr /out/$TARGETARCH
FROM build-base AS build-runc
ARG RUNC_VERSION
ARG TARGETARCH
RUN git clone --quiet --depth 1 --branch "${RUNC_VERSION%%@*}" https://github.com/opencontainers/runc.git /go/src/github.com/opencontainers/runc
WORKDIR /go/src/github.com/opencontainers/runc
RUN git-checkout-tag-with-hash.sh ${RUNC_VERSION} && \
mkdir -p /out
ENV CGO_ENABLED=1
# FIXME: avoid omitting libpathrs
RUN set -x ; GO=xx-go CC=$(xx-info)-gcc STRIP=$(xx-info)-strip make BUILDTAGS="$(grep -oP "^BUILDTAGS := \K.*" Makefile | sed -e s/libpathrs//)" static && \
xx-verify --static runc && cp -v -a runc /out/runc.${TARGETARCH}
FROM build-base AS build-bypass4netns
ARG BYPASS4NETNS_VERSION
ARG TARGETARCH
RUN git clone --quiet --depth 1 --branch "${BYPASS4NETNS_VERSION%%@*}" https://github.com/rootless-containers/bypass4netns.git /go/src/github.com/rootless-containers/bypass4netns
WORKDIR /go/src/github.com/rootless-containers/bypass4netns
RUN git-checkout-tag-with-hash.sh ${BYPASS4NETNS_VERSION} && \
mkdir -p /out/${TARGETARCH}
ENV CGO_ENABLED=1
RUN GO=xx-go make static && \
xx-verify --static bypass4netns && cp -a bypass4netns bypass4netnsd /out/${TARGETARCH}
FROM build-base AS build-gomodjail
ARG GOMODJAIL_VERSION
ARG TARGETARCH
RUN git clone --quiet --depth 1 --branch "${GOMODJAIL_VERSION%%@*}" https://github.com/AkihiroSuda/gomodjail.git /go/src/github.com/AkihiroSuda/gomodjail
WORKDIR /go/src/github.com/AkihiroSuda/gomodjail
RUN git-checkout-tag-with-hash.sh ${GOMODJAIL_VERSION} && \
mkdir -p /out/${TARGETARCH}
RUN GO=xx-go make STATIC=1 && \
xx-verify --static _output/bin/gomodjail && cp -a _output/bin/gomodjail /out/${TARGETARCH}
FROM build-base AS build-kubo
ARG KUBO_VERSION
ARG TARGETARCH
RUN git clone --quiet --depth 1 --branch "${KUBO_VERSION%%@*}" https://github.com/ipfs/kubo.git /go/src/github.com/ipfs/kubo
WORKDIR /go/src/github.com/ipfs/kubo
RUN git-checkout-tag-with-hash.sh ${KUBO_VERSION} && \
mkdir -p /out/${TARGETARCH}
ENV CGO_ENABLED=0
RUN xx-go --wrap && \
make build && \
xx-verify --static cmd/ipfs/ipfs && cp -a cmd/ipfs/ipfs /out/${TARGETARCH}
FROM build-base AS build-minimal
RUN BINDIR=/out/bin make binaries install
# We do not set CMD to `go test` here, because it requires systemd
FROM build-base AS build-dependencies
ARG TARGETARCH
ENV GOARCH=${TARGETARCH}
COPY ./Dockerfile.d/SHA256SUMS.d/ /SHA256SUMS.d
WORKDIR /nowhere
RUN echo "${TARGETARCH:-amd64}" | sed -e s/amd64/x86_64/ -e s/arm64/aarch64/ | tee /target_uname_m
RUN mkdir -p /out/share/doc/nerdctl-full && touch /out/share/doc/nerdctl-full/README.md
ARG CONTAINERD_VERSION
COPY --from=build-containerd /out/${TARGETARCH:-amd64}/* /out/bin/
COPY --from=build-containerd /out/containerd.service /out/lib/systemd/system/containerd.service
RUN echo "- containerd: ${CONTAINERD_VERSION%%@*}" >> /out/share/doc/nerdctl-full/README.md
ARG RUNC_VERSION
COPY --from=build-runc /out/runc.${TARGETARCH:-amd64} /out/bin/runc
RUN echo "- runc: ${RUNC_VERSION%%@*}" >> /out/share/doc/nerdctl-full/README.md
ARG CNI_PLUGINS_VERSION
RUN CNI_PLUGINS_VERSION=${CNI_PLUGINS_VERSION%%@*}; \
fname="cni-plugins-${TARGETOS:-linux}-${TARGETARCH:-amd64}-${CNI_PLUGINS_VERSION}.tgz" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/containernetworking/plugins/releases/download/${CNI_PLUGINS_VERSION}/${fname}" && \
grep "${fname}" "/SHA256SUMS.d/cni-plugins-${CNI_PLUGINS_VERSION}" | sha256sum -c && \
mkdir -p /out/libexec/cni && \
tar xzf "${fname}" -C /out/libexec/cni && \
rm -f "${fname}" && \
echo "- CNI plugins: ${CNI_PLUGINS_VERSION}" >> /out/share/doc/nerdctl-full/README.md
ARG BUILDKIT_VERSION
RUN BUILDKIT_VERSION=${BUILDKIT_VERSION%%@*}; \
fname="buildkit-${BUILDKIT_VERSION}.${TARGETOS:-linux}-${TARGETARCH:-amd64}.tar.gz" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}/${fname}" && \
grep "${fname}" "/SHA256SUMS.d/buildkit-${BUILDKIT_VERSION}" | sha256sum -c && \
tar xzf "${fname}" -C /out && \
rm -f "${fname}" /out/bin/buildkit-qemu-* /out/bin/buildkit-cni-* /out/bin/buildkit-runc && \
for f in /out/libexec/cni/*; do [ -x "$f" ] && [ -f "$f" ] && ln -s ../libexec/cni/$(basename $f) /out/bin/buildkit-cni-$(basename $f); done && \
echo "- BuildKit: ${BUILDKIT_VERSION}" >> /out/share/doc/nerdctl-full/README.md
# NOTE: github.com/moby/buildkit/examples/systemd is not included in BuildKit v0.8.x, will be included in v0.9.x
RUN cd /out/lib/systemd/system && \
sedcomm='s@bin/containerd@bin/buildkitd@g; s@(Description|Documentation)=.*@@' && \
sed -E "${sedcomm}" containerd.service > buildkit.service && \
echo "" >> buildkit.service && \
echo "# This file was converted from containerd.service, with \`sed -E '${sedcomm}'\`" >> buildkit.service
ARG STARGZ_SNAPSHOTTER_VERSION
RUN --mount=type=secret,id=github_token,env=GITHUB_TOKEN \
STARGZ_SNAPSHOTTER_VERSION=${STARGZ_SNAPSHOTTER_VERSION%%@*}; \
fname="stargz-snapshotter-${STARGZ_SNAPSHOTTER_VERSION}-${TARGETOS:-linux}-${TARGETARCH:-amd64}.tar.gz" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/containerd/stargz-snapshotter/releases/download/${STARGZ_SNAPSHOTTER_VERSION}/${fname}" && \
http::helper github::file containerd/stargz-snapshotter script/config/etc/systemd/system/stargz-snapshotter.service "${STARGZ_SNAPSHOTTER_VERSION}" > "stargz-snapshotter.service" && \
grep "${fname}" "/SHA256SUMS.d/stargz-snapshotter-${STARGZ_SNAPSHOTTER_VERSION}" | sha256sum -c - && \
grep "stargz-snapshotter.service" "/SHA256SUMS.d/stargz-snapshotter-${STARGZ_SNAPSHOTTER_VERSION}" | sha256sum -c - && \
tar xzf "${fname}" -C /out/bin && \
rm -f "${fname}" /out/bin/stargz-store && \
mv stargz-snapshotter.service /out/lib/systemd/system/stargz-snapshotter.service && \
echo "- Stargz Snapshotter: ${STARGZ_SNAPSHOTTER_VERSION}" >> /out/share/doc/nerdctl-full/README.md
ARG IMGCRYPT_VERSION
RUN git clone --quiet --depth 1 --branch "${IMGCRYPT_VERSION%%@*}" https://github.com/containerd/imgcrypt.git /go/src/github.com/containerd/imgcrypt && \
cd /go/src/github.com/containerd/imgcrypt && \
git-checkout-tag-with-hash.sh "${IMGCRYPT_VERSION}" && \
CGO_ENABLED=0 make && DESTDIR=/out make install && \
echo "- imgcrypt: ${IMGCRYPT_VERSION%%@*}" >> /out/share/doc/nerdctl-full/README.md
ARG SLIRP4NETNS_VERSION
RUN SLIRP4NETNS_VERSION=${SLIRP4NETNS_VERSION%%@*}; \
fname="slirp4netns-$(cat /target_uname_m)" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/rootless-containers/slirp4netns/releases/download/${SLIRP4NETNS_VERSION}/${fname}" && \
grep "${fname}" "/SHA256SUMS.d/slirp4netns-${SLIRP4NETNS_VERSION}" | sha256sum -c && \
mv "${fname}" /out/bin/slirp4netns && \
chmod +x /out/bin/slirp4netns && \
echo "- slirp4netns: ${SLIRP4NETNS_VERSION}" >> /out/share/doc/nerdctl-full/README.md
ARG BYPASS4NETNS_VERSION
COPY --from=build-bypass4netns /out/${TARGETARCH:-amd64}/* /out/bin/
RUN echo "- bypass4netns: ${BYPASS4NETNS_VERSION%%@*}" >> /out/share/doc/nerdctl-full/README.md
ARG FUSE_OVERLAYFS_VERSION
RUN FUSE_OVERLAYFS_VERSION=${FUSE_OVERLAYFS_VERSION%%@*}; \
fname="fuse-overlayfs-$(cat /target_uname_m)" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/containers/fuse-overlayfs/releases/download/${FUSE_OVERLAYFS_VERSION}/${fname}" && \
grep "${fname}" "/SHA256SUMS.d/fuse-overlayfs-${FUSE_OVERLAYFS_VERSION}" | sha256sum -c && \
mv "${fname}" /out/bin/fuse-overlayfs && \
chmod +x /out/bin/fuse-overlayfs && \
echo "- fuse-overlayfs: ${FUSE_OVERLAYFS_VERSION}" >> /out/share/doc/nerdctl-full/README.md
ARG CONTAINERD_FUSE_OVERLAYFS_VERSION
RUN CONTAINERD_FUSE_OVERLAYFS_VERSION=${CONTAINERD_FUSE_OVERLAYFS_VERSION%%@*}; \
fname="containerd-fuse-overlayfs-${CONTAINERD_FUSE_OVERLAYFS_VERSION##*v}-${TARGETOS:-linux}-${TARGETARCH:-amd64}.tar.gz" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/containerd/fuse-overlayfs-snapshotter/releases/download/${CONTAINERD_FUSE_OVERLAYFS_VERSION}/${fname}" && \
grep "${fname}" "/SHA256SUMS.d/containerd-fuse-overlayfs-${CONTAINERD_FUSE_OVERLAYFS_VERSION}" | sha256sum -c && \
tar xzf "${fname}" -C /out/bin && \
rm -f "${fname}" && \
echo "- containerd-fuse-overlayfs: ${CONTAINERD_FUSE_OVERLAYFS_VERSION}" >> /out/share/doc/nerdctl-full/README.md
ARG TINI_VERSION
RUN TINI_VERSION=${TINI_VERSION%%@*}; \
fname="tini-static-${TARGETARCH:-amd64}" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/${fname}" && \
grep "${fname}" "/SHA256SUMS.d/tini-${TINI_VERSION}" | sha256sum -c && \
cp -a "${fname}" /out/bin/tini && chmod +x /out/bin/tini && \
echo "- Tini: ${TINI_VERSION}" >> /out/share/doc/nerdctl-full/README.md
ARG BUILDG_VERSION
# FIXME: this is a mildly-confusing approach. Buildkit will perform some "smart" replacement at build time and output
# confusing debugging information, eg: BUILDG_VERSION will appear as if the original ARG value was used.
RUN BUILDG_VERSION=${BUILDG_VERSION%%@*}; \
fname="buildg-${BUILDG_VERSION}-${TARGETOS:-linux}-${TARGETARCH:-amd64}.tar.gz" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/ktock/buildg/releases/download/${BUILDG_VERSION}/${fname}" && \
grep "${fname}" "/SHA256SUMS.d/buildg-${BUILDG_VERSION}" | sha256sum -c && \
tar xzf "${fname}" -C /out/bin && \
rm -f "${fname}" && \
echo "- buildg: ${BUILDG_VERSION}" >> /out/share/doc/nerdctl-full/README.md
ARG ROOTLESSKIT_VERSION
RUN ROOTLESSKIT_VERSION=${ROOTLESSKIT_VERSION%%@*}; \
fname="rootlesskit-$(cat /target_uname_m).tar.gz" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/rootless-containers/rootlesskit/releases/download/${ROOTLESSKIT_VERSION}/${fname}" && \
grep "${fname}" "/SHA256SUMS.d/rootlesskit-${ROOTLESSKIT_VERSION}" | sha256sum -c && \
tar xzf "${fname}" -C /out/bin && \
rm -f "${fname}" /out/bin/rootlesskit-docker-proxy && \
echo "- RootlessKit: ${ROOTLESSKIT_VERSION}" >> /out/share/doc/nerdctl-full/README.md
ARG GOMODJAIL_VERSION
COPY --from=build-gomodjail /out/${TARGETARCH:-amd64}/* /out/bin/
RUN echo "- gomodjail: ${GOMODJAIL_VERSION}" >> /out/share/doc/nerdctl-full/README.md
ARG CONTAINERIZED_SYSTEMD_VERSION
RUN --mount=type=secret,id=github_token,env=GITHUB_TOKEN \
http::helper github::file AkihiroSuda/containerized-systemd docker-entrypoint.sh "${CONTAINERIZED_SYSTEMD_VERSION}" > /docker-entrypoint.sh && \
chmod +x /docker-entrypoint.sh
RUN echo "" >> /out/share/doc/nerdctl-full/README.md && \
echo "## License" >> /out/share/doc/nerdctl-full/README.md && \
echo "- bin/slirp4netns: [GNU GENERAL PUBLIC LICENSE, Version 2](https://github.com/rootless-containers/slirp4netns/blob/${SLIRP4NETNS_VERSION%%@*}/COPYING)" >> /out/share/doc/nerdctl-full/README.md && \
echo "- bin/fuse-overlayfs: [GNU GENERAL PUBLIC LICENSE, Version 2](https://github.com/containers/fuse-overlayfs/blob/${FUSE_OVERLAYFS_VERSION%%@*}/COPYING)" >> /out/share/doc/nerdctl-full/README.md && \
echo "- bin/{runc,bypass4netns,bypass4netnsd}: Apache License 2.0, statically linked with libseccomp ([LGPL 2.1](https://github.com/seccomp/libseccomp/blob/main/LICENSE), source code available at https://github.com/seccomp/libseccomp/)" >> /out/share/doc/nerdctl-full/README.md && \
echo "- bin/tini: [MIT License](https://github.com/krallin/tini/blob/${TINI_VERSION%%@*}/LICENSE)" >> /out/share/doc/nerdctl-full/README.md && \
echo "- Other files: [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)" >> /out/share/doc/nerdctl-full/README.md
FROM build-dependencies AS build-full
COPY . /go/src/github.com/containerd/nerdctl
RUN { echo "# nerdctl (full distribution)"; echo "- nerdctl: $(cd /go/src/github.com/containerd/nerdctl && git describe --tags)"; cat /out/share/doc/nerdctl-full/README.md; } > /out/share/doc/nerdctl-full/README.md.new; mv /out/share/doc/nerdctl-full/README.md.new /out/share/doc/nerdctl-full/README.md
WORKDIR /go/src/github.com/containerd/nerdctl
RUN BINDIR=/out/bin make binaries install
# FIXME: `gomodjail pack` depends on QEMU for non-native architecture
# TODO: gomodjail should provide a plain shell script that utilizes `zip(1)` for packing the self-extract archive, without running `gomodjail pack`..
RUN /out/bin/gomodjail pack --go-mod=/go/src/github.com/containerd/nerdctl/go.mod /out/bin/nerdctl && \
cp -a nerdctl.gomodjail /out/bin/
COPY README.md /out/share/doc/nerdctl/
COPY docs /out/share/doc/nerdctl/docs
RUN (cd /out && find ! -type d | sort | xargs sha256sum > /tmp/SHA256SUMS ) && \
mv /tmp/SHA256SUMS /out/share/doc/nerdctl-full/SHA256SUMS && \
chown -R 0:0 /out
FROM scratch AS out-full
COPY --from=build-full /out /
FROM ubuntu:${UBUNTU_VERSION} AS base
# fuse3 is required by stargz snapshotter
RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends \
apparmor \
bash-completion \
ca-certificates curl \
iproute2 iptables \
dbus dbus-user-session systemd systemd-sysv \
fuse3
COPY --from=build-full /docker-entrypoint.sh /docker-entrypoint.sh
COPY --from=out-full / /usr/local/
RUN perl -pi -e 's/multi-user.target/docker-entrypoint.target/g' /usr/local/lib/systemd/system/*.service && \
systemctl enable containerd buildkit stargz-snapshotter && \
mkdir -p /etc/bash_completion.d && \
nerdctl completion bash >/etc/bash_completion.d/nerdctl && \
mkdir -p -m 0755 /etc/cni
COPY ./Dockerfile.d/etc_containerd_config.toml /etc/containerd/config.toml
COPY ./Dockerfile.d/etc_buildkit_buildkitd.toml /etc/buildkit/buildkitd.toml
VOLUME /var/lib/containerd
VOLUME /var/lib/buildkit
VOLUME /var/lib/containerd-stargz-grpc
VOLUME /var/lib/nerdctl
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["bash", "--login", "-i"]
FROM base AS test-integration
ARG DEBIAN_FRONTEND=noninteractive
# `expect` package contains `unbuffer(1)`, which is used for emulating TTY for testing
# `jq` is required to generate test summaries
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
software-properties-common \
gnupg \
gpg-agent \
ca-certificates && \
add-apt-repository ppa:criu/ppa && \
apt-get update -qq && apt-get install -qq --no-install-recommends \
expect \
jq \
git \
make \
criu
# We wouldn't need this if Docker Hub could have "golang:${GO_VERSION}-ubuntu"
COPY --from=build-base /usr/local/go /usr/local/go
ARG TARGETARCH
ENV PATH=/usr/local/go/bin:$PATH
ARG GOTESTSUM_VERSION
RUN GOBIN=/usr/local/bin go install gotest.tools/gotestsum@${GOTESTSUM_VERSION}
COPY . /go/src/github.com/containerd/nerdctl
WORKDIR /go/src/github.com/containerd/nerdctl
VOLUME /tmp
ENV CGO_ENABLED=0
# copy cosign binary for integration test
COPY --from=ghcr.io/sigstore/cosign/cosign:v2.2.3@sha256:8fc9cad121611e8479f65f79f2e5bea58949e8a87ffac2a42cb99cf0ff079ba7 /ko-app/cosign /usr/local/bin/cosign
# installing soci for integration test
ARG SOCI_SNAPSHOTTER_VERSION
RUN fname="soci-snapshotter-${SOCI_SNAPSHOTTER_VERSION}-${TARGETOS:-linux}-${TARGETARCH:-amd64}.tar.gz" && \
curl -o "${fname}" -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/awslabs/soci-snapshotter/releases/download/v${SOCI_SNAPSHOTTER_VERSION}/${fname}" && \
tar -C /usr/local/bin -xvf "${fname}" soci soci-snapshotter-grpc && \
mkdir -p /etc/soci-snapshotter-grpc && \
touch /etc/soci-snapshotter-grpc/config.toml && \
echo "\n[pull_modes]\n [pull_modes.soci_v1]\n enable = true" >> /etc/soci-snapshotter-grpc/config.toml
# enable offline ipfs for integration test
COPY --from=build-kubo /out/${TARGETARCH:-amd64}/* /usr/local/bin/
COPY ./Dockerfile.d/test-integration-etc_containerd-stargz-grpc_config.toml /etc/containerd-stargz-grpc/config.toml
COPY ./Dockerfile.d/test-integration-ipfs-offline.service /usr/local/lib/systemd/system/
COPY ./Dockerfile.d/test-integration-buildkit-nerdctl-test.service /usr/local/lib/systemd/system/
COPY ./Dockerfile.d/test-integration-soci-snapshotter.service /usr/local/lib/systemd/system/
RUN cp /usr/local/bin/tini /usr/local/bin/tini-custom
# using test integration containerd config
COPY ./Dockerfile.d/test-integration-etc_containerd_config.toml /etc/containerd/config.toml
# install ipfs service. avoid using 5001(api)/8080(gateway) which are reserved by tests.
RUN systemctl enable test-integration-ipfs-offline test-integration-buildkit-nerdctl-test test-integration-soci-snapshotter && \
ipfs init && \
ipfs config Addresses.API "/ip4/127.0.0.1/tcp/5888" && \
ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/5889"
# install nydus components
ARG NYDUS_VERSION
RUN curl -o nydus-static.tgz -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 --connect-timeout 20 --proto '=https' --tlsv1.2 "https://github.com/dragonflyoss/image-service/releases/download/${NYDUS_VERSION}/nydus-static-${NYDUS_VERSION}-linux-${TARGETARCH}.tgz" && \
tar xzf nydus-static.tgz && \
mv nydus-static/nydus-image nydus-static/nydusd nydus-static/nydusify /usr/bin/ && \
rm nydus-static.tgz
CMD ["./hack/test-integration.sh"]
FROM test-integration AS test-integration-rootless
# Install SSH for creating systemd user session.
# (`sudo` does not work for this purpose,
# OTOH `machinectl shell` can create the session but does not propagate exit code)
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
uidmap \
openssh-server \
openssh-client
# TODO: update containerized-systemd to enable sshd by default, or allow `systemctl wants <TARGET> ssh` here
RUN ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N '' && \
useradd -m -s /bin/bash rootless && \
mkdir -p -m 0700 /home/rootless/.ssh && \
cp -a /root/.ssh/id_rsa.pub /home/rootless/.ssh/authorized_keys && \
mkdir -p /home/rootless/.local/share && \
chown -R rootless:rootless /home/rootless
COPY ./Dockerfile.d/etc_systemd_system_user@.service.d_delegate.conf /etc/systemd/system/user@.service.d/delegate.conf
# ipfs daemon for rootless containerd will be enabled in /test-integration-rootless.sh
RUN systemctl disable test-integration-ipfs-offline
VOLUME /home/rootless/.local/share
COPY ./Dockerfile.d/test-integration-rootless.sh /
RUN chmod a+rx /test-integration-rootless.sh
CMD ["/test-integration-rootless.sh", "./hack/test-integration.sh"]
# test for CONTAINERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns
FROM test-integration-rootless AS test-integration-rootless-port-slirp4netns
COPY ./Dockerfile.d/home_rootless_.config_systemd_user_containerd.service.d_port-slirp4netns.conf /home/rootless/.config/systemd/user/containerd.service.d/port-slirp4netns.conf
RUN chown -R rootless:rootless /home/rootless/.config
FROM base AS demo
================================================
FILE: Dockerfile.d/SHA256SUMS.d/SHA256SUMS
================================================
3edc52986c442576da856a66b59a61d16cf765359712c5ecf2d147c69f0df6e9 rootlesskit-aarch64.tar.gz
6ce9eed50f9e12f18f3e5197cf93d226bc9290185880a626ab186244593d2eed rootlesskit-armv7l.tar.gz
730ef884439e2fe15551218b05d5c4f96d96d6945db8ad7e89b1d12946408a8d rootlesskit-ppc64le.tar.gz
05da5803d0f023ec51112bbdf8967a3e12ae19544f8c101a7f08f3bb9c6548fd rootlesskit-riscv64.tar.gz
199f6bfcd0495d0b944d95f70e6fa1177ace16d801e2693fdd86fdaafa69b01a rootlesskit-s390x.tar.gz
afc52e9fa2f7a2d4bb692f675cf3d2f70f3a184f02593e8b18cfbbbc34cbfd41 rootlesskit-x86_64.tar.gz
================================================
FILE: Dockerfile.d/SHA256SUMS.d/buildg-v0.5.3
================================================
cf4c40c58ca795eeb6e75e2c6a0e5bb3a6a9c0623d51bc3b85163e5d483eeade buildg-full-v0.5.3-linux-amd64.tar.gz
47c479f2e5150c9c76294fa93a03ad20e5928f4315bf52ca8432bfb6707d4276 buildg-full-v0.5.3-linux-arm64.tar.gz
c289a454ae8673ff99acf56dec9ba97274c20d2015e80f7ac3b8eb8e4f77888f buildg-v0.5.3-linux-amd64.tar.gz
b2e244250ce7ea5c090388f2025a9c546557861d25bba7b0666aa512f01fa6cd buildg-v0.5.3-linux-arm64.tar.gz
================================================
FILE: Dockerfile.d/SHA256SUMS.d/buildkit-v0.26.3
================================================
249ae16ba4be59fadb51a49ff4d632bbf37200e2b6e187fa8574f0f1bce8166b buildkit-v0.26.3.linux-amd64.tar.gz
a98829f1b1b9ec596eb424dd03f03b9c7b596edac83e6700adf83ba0cb0d5f80 buildkit-v0.26.3.linux-arm64.tar.gz
================================================
FILE: Dockerfile.d/SHA256SUMS.d/cni-plugins-v1.9.0
================================================
58c03705426e929658f45a851df15a86d06ef680cacbf3f2dc127731ca265c28 cni-plugins-linux-amd64-v1.9.0.tgz
2596ef56329dd1269026f46b8df262f09ba43c92dbfb940e1e69fbccccd30a29 cni-plugins-linux-arm64-v1.9.0.tgz
================================================
FILE: Dockerfile.d/SHA256SUMS.d/containerd-fuse-overlayfs-v2.1.7
================================================
d54148043c22381af89cec2a167431e40668716404a1eb682ca69dfb890376f3 containerd-fuse-overlayfs-2.1.7-linux-amd64.tar.gz
a301030391d51356065f628b5e6e5a5a8c55f1978289eb71d8f5284af7a81eda containerd-fuse-overlayfs-2.1.7-linux-arm-v7.tar.gz
94ed6c2c3bece42e0c789ea056565b64fe487de4644121ee0dfb8acd8ef9369c containerd-fuse-overlayfs-2.1.7-linux-arm64.tar.gz
1bfb1f86894b640781d837ec0f66997222b419532fae730579140dbc1c7ea858 containerd-fuse-overlayfs-2.1.7-linux-ppc64le.tar.gz
9f2ef69b06229f5357f3fc23524922cea6616663ff220979a110a7742aaffee6 containerd-fuse-overlayfs-2.1.7-linux-riscv64.tar.gz
03f61035cef5fff33c5084c55f133d0340597520d8d12112970609dff0bd1e7a containerd-fuse-overlayfs-2.1.7-linux-s390x.tar.gz
================================================
FILE: Dockerfile.d/SHA256SUMS.d/fuse-overlayfs-v1.16
================================================
6c9ee54166fe7d33ebbfb085812585441f22ebe2a24a868d0a878d3127bcb89e fuse-overlayfs-aarch64
fc2a73ace8eb6a0553204532de615d782cb98d86deeb0fa7b5d14347d0b95823 fuse-overlayfs-armv7l
3c07b76b432a5b4e5e0ccd986919b478d096701178617175b0c71bcce7c6f6a0 fuse-overlayfs-ppc64le
404fd7a762255d554e70849612fb6979639e1eb23a740487dbe3bac2bccc37c1 fuse-overlayfs-riscv64
9e96cfe091b4342b8de3e239a96d5fecfb8692fbb4a201c256790c270526fd1b fuse-overlayfs-s390x
30c6b9e192600d6854e13397974c709d7cabd980b7d1a4d67defd8eb69677e91 fuse-overlayfs-x86_64
================================================
FILE: Dockerfile.d/SHA256SUMS.d/rootlesskit-v1.1.1
================================================
b74c577abd6ad721e0b7e10a74f4c5ac26cb3afe005ad3d28d4d7912c356079f rootlesskit-aarch64.tar.gz
95c27e6808c942c67ab93d94e37bada3a62cfc47de848101889f8e3ba5c9f7dd rootlesskit-armv7l.tar.gz
df35c74cd030e1b3978f28d1cb7c909da2ab962fb0c9369463d43a89b9f16cc2 rootlesskit-ppc64le.tar.gz
79af3e96e9d6deddc5faa4680de7e28120ae333386c48a30e79fe156f17bad9b rootlesskit-riscv64.tar.gz
32da9a11b67340ff498de8a3268673277a1e1d9e9d8d5f619bbf09305beaaa6c rootlesskit-s390x.tar.gz
3c83affbb405cafe2d32e2e24462af9b4dcfa19e3809030012ad0d4e3fd49e8f rootlesskit-x86_64.tar.gz
================================================
FILE: Dockerfile.d/SHA256SUMS.d/rootlesskit-v2.3.6
================================================
3edc52986c442576da856a66b59a61d16cf765359712c5ecf2d147c69f0df6e9 rootlesskit-aarch64.tar.gz
6ce9eed50f9e12f18f3e5197cf93d226bc9290185880a626ab186244593d2eed rootlesskit-armv7l.tar.gz
730ef884439e2fe15551218b05d5c4f96d96d6945db8ad7e89b1d12946408a8d rootlesskit-ppc64le.tar.gz
05da5803d0f023ec51112bbdf8967a3e12ae19544f8c101a7f08f3bb9c6548fd rootlesskit-riscv64.tar.gz
199f6bfcd0495d0b944d95f70e6fa1177ace16d801e2693fdd86fdaafa69b01a rootlesskit-s390x.tar.gz
afc52e9fa2f7a2d4bb692f675cf3d2f70f3a184f02593e8b18cfbbbc34cbfd41 rootlesskit-x86_64.tar.gz
================================================
FILE: Dockerfile.d/SHA256SUMS.d/slirp4netns-v1.3.3
================================================
d0e6a13342efbedb8b7454629a0e9ce9b7a937c261034c85f46ed81af76307d8 SOURCE_DATE_EPOCH
1ca9d2f5f1fb4beb91f354653e5dad35b95c049afb264268d99a96ff2a10d903 slirp4netns-aarch64
3e209d1c56fccbe627a038d311b233c15e8d914b30f9b981b5ed78b98e836859 slirp4netns-armv7l
4d1003a98103ee170c0fcd4aad8a5e0ba7aa2e70fbca883cbb6a39f40447c8da slirp4netns-ppc64le
06a13b398d88120097b20dace966d7dd5e2fbfd284b95a086347808df392200e slirp4netns-riscv64
23d4a206edd6d3fc9c86f8b05c0881ff77a607b8d471f20964ad9f9c3f3176b1 slirp4netns-s390x
5618887b671a30a2f7548f2bdf7fba98a53981abc80cfd3183cd28b4dc8b2b97 slirp4netns-x86_64
================================================
FILE: Dockerfile.d/SHA256SUMS.d/stargz-snapshotter-v0.18.1
================================================
f8f106a61b9fc797a6336d6c06435cdbf8b896f3f49fdc5288e08e87dff6bbdf stargz-snapshotter-v0.18.1-linux-amd64.tar.gz
643d04f5e97e83606b9ee129c2c33513df13a091dbc1dc084256d13a1034b749 stargz-snapshotter-v0.18.1-linux-arm64.tar.gz
f1cf855870af16a653d8acb9daa3edf84687c2c05323cb958f078fb148af3eec stargz-snapshotter.service
================================================
FILE: Dockerfile.d/SHA256SUMS.d/tini-v0.19.0
================================================
c5b0666b4cb676901f90dfcb37106783c5fe2077b04590973b885950611b30ee tini-static-amd64
eae1d3aa50c48fb23b8cbdf4e369d0910dfc538566bfd09df89a774aa84a48b9 tini-static-arm64
================================================
FILE: Dockerfile.d/etc_buildkit_buildkitd.toml
================================================
[worker.oci]
enabled = false
[worker.containerd]
enabled = true
namespace = "default"
================================================
FILE: Dockerfile.d/etc_containerd_config.toml
================================================
version = 2
# Enable stargz snapshotter
[proxy_plugins]
[proxy_plugins.stargz]
type = "snapshot"
address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock"
[proxy_plugins.stargz.exports]
root = "/var/lib/containerd-stargz-grpc/"
enable_remote_snapshot_annotations = "true"
[[plugins."io.containerd.transfer.v1.local".unpack_config]]
platform = "linux"
snapshotter = "overlayfs"
[[plugins."io.containerd.transfer.v1.local".unpack_config]]
platform = "linux"
snapshotter = "stargz"
================================================
FILE: Dockerfile.d/etc_systemd_system_user@.service.d_delegate.conf
================================================
[Service]
Delegate=yes
================================================
FILE: Dockerfile.d/home_rootless_.config_systemd_user_containerd.service.d_port-slirp4netns.conf
================================================
[Service]
# Change the port driver from "builtin" to "slirp4netns". Only used in CI.
Environment="CONTAINERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns"
================================================
FILE: Dockerfile.d/test-integration-buildkit-nerdctl-test.service
================================================
# Copyright The containerd Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Copied from released buildkit.service
[Unit]
After=network.target local-fs.target
Description=buildkit daemon for integration test (namespace: nerdctl-test)
[Service]
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/buildkitd --oci-worker=false --containerd-worker=true --addr="unix:///run/buildkit-nerdctl-test/buildkitd.sock" --root=/var/lib/buildkit-nerdctl-test --containerd-worker-namespace=nerdctl-test
Type=notify
Delegate=yes
KillMode=process
Restart=always
RestartSec=5
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity
LimitNOFILE=infinity
# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this version.
TasksMax=infinity
OOMScoreAdjust=-999
[Install]
WantedBy=docker-entrypoint.target
================================================
FILE: Dockerfile.d/test-integration-etc_containerd-stargz-grpc_config.toml
================================================
version = 2
# Enable IPFS
ipfs = true
================================================
FILE: Dockerfile.d/test-integration-etc_containerd_config.toml
================================================
version = 2
# Enable stargz snapshotter
[proxy_plugins]
[proxy_plugins.stargz]
type = "snapshot"
address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock"
[proxy_plugins.stargz.exports]
root = "/var/lib/containerd-stargz-grpc/"
enable_remote_snapshot_annotations = "true"
# Enable soci snapshotter
[proxy_plugins.soci]
type = "snapshot"
address = "/run/soci-snapshotter-grpc/soci-snapshotter-grpc.sock"
[proxy_plugins.soci.exports]
root = "/var/lib/soci-snapshotter-grpc"
enable_remote_snapshot_annotations = "true"
[[plugins."io.containerd.transfer.v1.local".unpack_config]]
platform = "linux"
snapshotter = "overlayfs"
[[plugins."io.containerd.transfer.v1.local".unpack_config]]
platform = "linux"
snapshotter = "soci"
[[plugins."io.containerd.transfer.v1.local".unpack_config]]
platform = "linux"
snapshotter = "stargz"
================================================
FILE: Dockerfile.d/test-integration-ipfs-offline.service
================================================
[Unit]
Description=ipfs daemon for integration test (offline)
[Service]
ExecStart=ipfs daemon --init --offline
Environment=IPFS_PATH="%h/.ipfs"
[Install]
WantedBy=docker-entrypoint.target
================================================
FILE: Dockerfile.d/test-integration-rootless.sh
================================================
#!/bin/bash
# Copyright The containerd Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -eux -o pipefail
if [[ "$(id -u)" = "0" ]]; then
# Ensure securityfs is mounted for apparmor to work
if ! mountpoint -q /sys/kernel/security; then
mount -tsecurityfs securityfs /sys/kernel/security
fi
if [ -e /sys/kernel/security/apparmor/profiles ]; then
# Load the "nerdctl-default" profile for TestRunApparmor
nerdctl apparmor load
fi
: "${WORKAROUND_ISSUE_622:=}"
if [[ "$WORKAROUND_ISSUE_622" != "" ]]; then
touch /workaround-issue-622
fi
# Switch to the rootless user via SSH
systemctl start ssh
exec ssh -o StrictHostKeyChecking=no rootless@localhost "$0" "$@"
else
containerd-rootless-setuptool.sh install
if grep -q "options use-vc" /etc/resolv.conf; then
containerd-rootless-setuptool.sh nsenter -- sh -euc 'echo "options use-vc" >>/etc/resolv.conf'
fi
if [[ -e /workaround-issue-622 ]]; then
echo "WORKAROUND_ISSUE_622: Not enabling BuildKit (https://github.com/containerd/nerdctl/issues/622)" >&2
else
CONTAINERD_NAMESPACE="nerdctl-test" containerd-rootless-setuptool.sh install-buildkit-containerd
fi
containerd-rootless-setuptool.sh install-stargz
if [ ! -f "/home/rootless/.config/containerd/config.toml" ] ; then
echo "version = 2" > /home/rootless/.config/containerd/config.toml
fi
cat <<EOF >>/home/rootless/.config/containerd/config.toml
[proxy_plugins]
[proxy_plugins."stargz"]
type = "snapshot"
address = "/run/user/$(id -u)/containerd-stargz-grpc/containerd-stargz-grpc.sock"
[proxy_plugins.stargz.exports]
root = "/home/rootless/.local/share/containerd-stargz-grpc/"
enable_remote_snapshot_annotations = "true"
[[plugins."io.containerd.transfer.v1.local".unpack_config]]
platform = "linux"
snapshotter = "overlayfs"
[[plugins."io.containerd.transfer.v1.local".unpack_config]]
platform = "linux"
snapshotter = "stargz"
EOF
systemctl --user restart containerd.service
containerd-rootless-setuptool.sh -- install-ipfs --init --offline # offline ipfs daemon for testing
echo "ipfs = true" >>/home/rootless/.config/containerd-stargz-grpc/config.toml
systemctl --user restart stargz-snapshotter.service
export IPFS_PATH="/home/rootless/.local/share/ipfs"
containerd-rootless-setuptool.sh install-bypass4netnsd
# Once ssh-ed, we lost the Dockerfile working dir, so, get back in the nerdctl checkout
cd /go/src/github.com/containerd/nerdctl
# We also lose the PATH (and SendEnv=PATH would require sshd config changes)
exec env PATH="/usr/local/go/bin:$PATH" "$@"
fi
================================================
FILE: Dockerfile.d/test-integration-soci-snapshotter.service
================================================
[Unit]
Description=soci snapshotter containerd plugin for integration test
Documentation=https://github.com/awslabs/soci-snapshotter
After=network.target
Before=containerd.service
[Service]
Type=notify
ExecStartPre=/bin/bash -c 'mkdir -p /var/lib/soci-snapshotter-grpc && mount -t tmpfs none /var/lib/soci-snapshotter-grpc'
ExecStart=/usr/local/bin/soci-snapshotter-grpc
Restart=always
RestartSec=5
[Install]
WantedBy=docker-entrypoint.target
================================================
FILE: EMERITUS.md
================================================
See [`MAINTAINERS`](./MAINTAINERS) for the current active maintainers.
- - -
# nerdctl Emeritus Maintainers
## Committers
### Ye Sijun ([@junnplus](https://github.com/junnplus))
Ye Sijun (GitHub ID [@junnplus](https://github.com/junnplus)) served as
a Committer of nerdctl from November 2022 to June 2024.
Prior to his role as a Committer, Sijun served as a Reviewer since February 2022.
Sijun has made [significant improvements](https://github.com/containerd/nerdctl/pulls?q=author%3Ajunnplus+)
especially to `nerdctl compose`, IPAM, and cosign integration.
## Reviewers
### Hanchin Hsieh ([@yuchanns](https://github.com/yuchanns))
Hanchin Hsieh (GitHub ID [@yuchanns](https://github.com/yuchanns)) served as
a Reviewer of nerdctl from November 2022 to June 2024.
Hanchin has made significant contributions such as the addition of
[syslog driver](https://github.com/containerd/nerdctl/pull/1377) and
[IPv6 networking](https://github.com/containerd/nerdctl/pull/1558).
### Manu Gupta ([@manugupt1](https://github.com/manugupt1))
Manu Gupta (GitHub ID [@manugupt1](https://github.com/manugupt1)) served as
a Reviewer of nerdctl from 2022 to August 2025.
Manu has made [significant improvements](https://github.com/containerd/nerdctl/pulls?q=author%3Amanugupt1+)
especially to image and volume management, container runtime features, build system enhancements,
and CI/CD infrastructure. Notable contributions include image filtering capabilities, volume size
inspection, Docker Compose enhancements, and multi-architecture build support.
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: MAINTAINERS
================================================
# nerdctl maintainers
#
# As a containerd sub-project, containerd maintainers are also included from https://github.com/containerd/project/blob/main/MAINTAINERS.
# See https://github.com/containerd/project/blob/main/GOVERNANCE.md for description of maintainer role
#
# See also MAINTAINERS_GUIDE.md
# CORE COMMITTERS who regularly contribute to nerdctl
# (Extracted from https://github.com/containerd/project/blob/main/MAINTAINERS for ease of reference)
# GitHub ID, Name, Email address, GPG fingerprint
"AkihiroSuda","Akihiro Suda","akihiro.suda.cz@hco.ntt.co.jp","C020 EA87 6CE4 E06C 7AB9 5AEF 4952 4C6F 9F63 8F1A"
# COMMITTERS
# GitHub ID, Name, Email address, GPG fingerprint
"ktock","Kohei Tokunaga","ktokunaga.mail@gmail.com",""
"fahedouch","Fahed Dorgaa","fahed.dorgaa@gmail.com","EE7A 5503 CE0D 38AC 5B95 A500 F35F F497 60A8 65FA"
"Zheaoli", "Zheao Li", "me@manjusaka.me","6E0D D9FA BAD5 AF61 D884 01EE 878F 445D 9C6C E65E"
"djdongjin", "Jin Dong", "djdongjin95@gmail.com",""
"yankay", "Kay Yan", "kay.yan@daocloud.io", ""
"ChengyuZhu6","Chengyu Zhu","hudson@cyzhu.com",""
# REVIEWERS
# GitHub ID, Name, Email address, GPG fingerprint
"jsturtevant","James Sturtevant","jstur@microsoft.com",""
"Shubhranshu153","Shubharanshu Mahapatra","shubhum@amazon.com",""
"haytok","Hayato Kiwata","haytok@amazon.co.jp","B485 C5AA 6220 0A06 78FD 294D FA4F 2421 1D65 269F"
# EMERITUS
# See EMERITUS.md
================================================
FILE: MAINTAINERS_GUIDE.md
================================================
# Maintainers' guide
## Maintainer list
- Core: https://github.com/containerd/project/blob/main/MAINTAINERS
- Non-core: [`MAINTAINERS`](./MAINTAINERS)
## Governance
See https://github.com/containerd/project/blob/main/GOVERNANCE.md
## Creating a release
Eligibility to be a release manager:
- MUST be an active Commiter (Core or Non-core)
- MUST have the GPG fingerprint listed in [`MAINTAINERS`](./MAINTAINERS)
- MUST upload the GPG public key to `https://github.com/USERNAME.gpg`
- MUST protect the GPG key with a passphrase or a hardware token.
Release steps:
- Open a PR to keep the dependencies up-to-date.
Update `go.mod` for Go dependencies (usually Dependabot automatically updates them).
Update `Dockerfile` and relevant files under `Dockerfile.d` for `nerdctl-full` dependencies.
- Open an issue to propose making a new release.
The proposal should be public, with an exception for vulnerability fixes.
If this is the first time for you to take a role of release management,
you SHOULD make a beta (or alpha, RC) release as an exercise before releasing GA.
- Make sure that all the merged PRs are associated with the correct [Milestone](https://github.com/containerd/nerdctl/milestones).
- Run `git tag --sign vX.Y.Z-beta.W` .
- Run `git push UPSTREAM vX.Y.Z-beta.W` .
- Wait for the `Release` action on GitHub Actions to complete. A draft release will appear in https://github.com/containerd/nerdctl/releases .
- Download `SHA256SUMS` from the draft release, and confirm that it corresponds to the hashes printed in the build logs on the `Release` action.
- Sign `SHA256SUMS` with `gpg --detach-sign -a SHA256SUMS` to produce `SHA256SUMS.asc`, and upload it to the draft release.
- Add release notes in the draft release, to explain the changes and show appreciation to the contributors.
Make sure to fulfill the `Release manager: [ADD YOUR NAME HERE] (@[ADD YOUR GITHUB ID HERE])` line with your name.
e.g., `Release manager: Akihiro Suda (@AkihiroSuda)` .
- Click the `Set as a pre-release` checkbox if this release is a beta (or alpha, RC).
- Click the `Publish release` button.
- Close the [Milestone](https://github.com/containerd/nerdctl/milestones).
================================================
FILE: Makefile
================================================
# Copyright The containerd Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------------
# Portions from https://github.com/kubernetes-sigs/cri-tools/blob/v1.19.0/Makefile
# Copyright The Kubernetes Authors.
# Licensed under the Apache License, Version 2.0
# -----------------------------------------------------------------------------
##########################
# Configuration
##########################
PACKAGE := "github.com/containerd/nerdctl/v2"
DOCKER ?= docker
GO ?= go
GOOS ?= $(shell $(GO) env GOOS)
GOARCH ?= $(shell $(GO) env GOARCH)
ifeq ($(GOOS),windows)
BIN_EXT := .exe
endif
# distro builders might want to override these
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
DATADIR ?= $(PREFIX)/share
DOCDIR ?= $(DATADIR)/doc
BINARY ?= "nerdctl"
MAKEFILE_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
VERSION ?= $(shell git -C $(MAKEFILE_DIR) describe --match 'v[0-9]*' --dirty='.m' --always --tags 2>/dev/null || echo no_git_information)
VERSION_TRIMMED := $(VERSION:v%=%)
REVISION ?= $(shell git -C $(MAKEFILE_DIR) rev-parse HEAD 2>/dev/null || echo no_git_information)$(shell if ! git -C $(MAKEFILE_DIR) diff --no-ext-diff --quiet --exit-code 2>/dev/null; then echo .m; fi)
LINT_COMMIT_RANGE ?= main..HEAD
GO_BUILD_LDFLAGS ?= -s -w
GO_BUILD_FLAGS ?=
BUILDTAGS ?=
GO_TAGS=$(if $(BUILDTAGS),-tags "$(strip $(BUILDTAGS))",)
##########################
# Helpers
##########################
ifdef VERBOSE
VERBOSE_FLAG := -v
VERBOSE_FLAG_LONG := --verbose
endif
export GO_BUILD=CGO_ENABLED=0 GOOS=$(GOOS) $(GO) -C $(MAKEFILE_DIR) build $(GO_TAGS) -ldflags "$(GO_BUILD_LDFLAGS) $(VERBOSE_FLAG) -X $(PACKAGE)/pkg/version.Version=$(VERSION) -X $(PACKAGE)/pkg/version.Revision=$(REVISION)"
ifndef NO_COLOR
NC := \033[0m
GREEN := \033[1;32m
ORANGE := \033[1;33m
endif
recursive_wildcard=$(wildcard $1$2) $(foreach e,$(wildcard $1*),$(call recursive_wildcard,$e/,$2))
define title
@printf "$(GREEN)____________________________________________________________________________________________________\n"
@printf "$(GREEN)%*s\n" $$(( ( $(shell echo "🤓$(1) 🤓" | wc -c ) + 100 ) / 2 )) "🤓$(1) 🤓"
@printf "$(GREEN)____________________________________________________________________________________________________\n$(ORANGE)"
endef
define footer
@printf "$(GREEN)> %s: done!\n" "$(1)"
@printf "$(GREEN)____________________________________________________________________________________________________\n$(NC)"
endef
##########################
# High-level tasks definitions
##########################
all: binaries
lint: lint-go-all lint-yaml lint-shell lint-commits lint-mod lint-licenses-all
fix: fix-mod fix-go-all
# TODO: fix race task and add it
test: test-unit # test-unit-race test-unit-bench
help:
@echo "Usage: make <target>"
@echo
@echo " * 'lint' - Run linters against codebase."
@echo " * 'fix' - Automatically fixes imports, modules, and simple formatting."
@echo " * 'test' - Run basic unit testing."
@echo " * 'binaries' - Build nerdctl."
@echo " * 'install' - Install binaries to system locations."
@echo " * 'clean' - Clean artifacts."
##########################
# Building and installation tasks
##########################
binaries: $(CURDIR)/_output/$(BINARY)$(BIN_EXT)
$(CURDIR)/_output/$(BINARY)$(BIN_EXT):
$(call title, $@: $(GOOS)/$(GOARCH))
$(GO_BUILD) $(GO_BUILD_FLAGS) $(VERBOSE_FLAG) -o $(CURDIR)/_output/$(BINARY)$(BIN_EXT) ./cmd/nerdctl
$(call footer, $@)
install:
$(call title, $@)
install -D -m 755 $(CURDIR)/_output/$(BINARY) $(DESTDIR)$(BINDIR)/$(BINARY)
install -D -m 755 $(MAKEFILE_DIR)/extras/rootless/containerd-rootless.sh $(DESTDIR)$(BINDIR)/containerd-rootless.sh
install -D -m 755 $(MAKEFILE_DIR)/extras/rootless/containerd-rootless-setuptool.sh $(DESTDIR)$(BINDIR)/containerd-rootless-setuptool.sh
install -D -m 644 -t $(DESTDIR)$(DOCDIR)/nerdctl $(MAKEFILE_DIR)/docs/*.md
$(call footer, $@)
clean:
$(call title, $@)
find . -name \*~ -delete
find . -name \#\* -delete
rm -rf $(CURDIR)/_output/* $(MAKEFILE_DIR)/vendor
$(call footer, $@)
##########################
# Linting tasks
##########################
lint-go:
$(call title, $@: $(GOOS))
@cd $(MAKEFILE_DIR) \
&& golangci-lint run $(VERBOSE_FLAG_LONG) ./...
$(call footer, $@)
lint-go-all:
$(call title, $@)
@cd $(MAKEFILE_DIR) \
&& GOOS=linux make lint-go \
&& GOOS=windows make lint-go \
&& GOOS=freebsd make lint-go \
&& GOOS=darwin make lint-go
$(call footer, $@)
lint-yaml:
$(call title, $@)
cd $(MAKEFILE_DIR) \
&& yamllint .
$(call footer, $@)
lint-shell: $(call recursive_wildcard,$(MAKEFILE_DIR)/,*.sh)
$(call title, $@)
shellcheck -a -x $^
$(call footer, $@)
lint-commits:
$(call title, $@)
@cd $(MAKEFILE_DIR) \
&& git-validation $(VERBOSE_FLAG) -run DCO,short-subject,dangling-whitespace -range "$(LINT_COMMIT_RANGE)"
$(call footer, $@)
lint-mod:
$(call title, $@)
@cd $(MAKEFILE_DIR) \
&& go mod tidy --diff
$(call footer, $@)
# FIXME: go-licenses cannot find LICENSE from root of repo when submodule is imported:
# https://github.com/google/go-licenses/issues/186
# This is impacting gotest.tools
# FIXME: go-base36 is multi-license (MIT/Apache), using a custom boilerplate file that go-licenses fails to understand
lint-licenses:
$(call title, $@: $(GOOS))
@cd $(MAKEFILE_DIR) \
&& go-licenses check --include_tests --allowed_licenses=Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib \
--ignore gotest.tools \
--ignore github.com/multiformats/go-base36 \
./...
$(call footer, $@)
lint-licenses-all:
$(call title, $@)
@cd $(MAKEFILE_DIR) \
&& GOOS=linux make lint-licenses \
&& GOOS=windows make lint-licenses \
&& GOOS=freebsd make lint-licenses \
&& GOOS=darwin make lint-licenses
$(call footer, $@)
##########################
# Automated fixing tasks
##########################
fix-go:
$(call title, $@: $(GOOS))
@cd $(MAKEFILE_DIR) \
&& golangci-lint run --fix
$(call footer, $@)
fix-go-all:
$(call title, $@)
@cd $(MAKEFILE_DIR) \
&& GOOS=linux make fix-go \
&& GOOS=windows make fix-go \
&& GOOS=freebsd make fix-go \
&& GOOS=darwin make fix-go
$(call footer, $@)
fix-mod:
$(call title, $@)
@cd $(MAKEFILE_DIR) \
&& go mod tidy
$(call footer, $@)
##########################
# Development tools installation
##########################
install-dev-tools:
$(call title, $@)
# golangci: v2.4.0 (2025-08-14)
# git-validation: main (2025-02-25)
# ltag: main (2025-03-04)
# go-licenses: v2.0.0-alpha.1 (2024-06-27)
# stubbing go-licenses with dependency upgrade due to non-compatibility with golang 1.25rc1
# Issue: https://github.com/google/go-licenses/issues/312
@cd $(MAKEFILE_DIR) \
&& go install github.com/Shubhranshu153/go-licenses/v2@f8c503d1357dffb6c97ed3b94e912ab294dde24a \
&& go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@43d03392d7dc3746fa776dbddd66dfcccff70651 \
&& go install github.com/vbatts/git-validation@7b60e35b055dd2eab5844202ffffad51d9c93922 \
&& go install github.com/containerd/ltag@66e6a514664ee2d11a470735519fa22b1a9eaabd \
&& go install gotest.tools/gotestsum@0d9599e513d70e5792bb9334869f82f6e8b53d4d
@echo "Remember to add \$$HOME/go/bin to your path"
$(call footer, $@)
##########################
# Testing tasks
##########################
test-unit:
$(call title, $@)
@go test $(VERBOSE_FLAG) $(MAKEFILE_DIR)/pkg/...
$(call footer, $@)
test-unit-bench:
$(call title, $@)
@go test $(VERBOSE_FLAG) $(MAKEFILE_DIR)/pkg/... -bench=.
$(call footer, $@)
test-unit-race:
$(call title, $@)
@go test $(VERBOSE_FLAG) $(MAKEFILE_DIR)/pkg/... -race
$(call footer, $@)
##########################
# Release tasks
##########################
# Note that these options will not work on macOS - unless you use gnu-tar instead of tar
TAR_OWNER0_FLAGS=--owner=0 --group=0
TAR_FLATTEN_FLAGS=--transform 's/.*\///g'
define make_artifact_full_linux
$(DOCKER) build --secret id=github_token,env=GITHUB_TOKEN --output type=tar,dest=$(CURDIR)/_output/nerdctl-full-$(VERSION_TRIMMED)-linux-$(1).tar --target out-full --platform $(1) --build-arg GO_VERSION -f $(MAKEFILE_DIR)/Dockerfile $(MAKEFILE_DIR)
gzip -9 $(CURDIR)/_output/nerdctl-full-$(VERSION_TRIMMED)-linux-$(1).tar
endef
artifacts: clean
$(call title, $@)
GOOS=linux GOARCH=amd64 make -C $(CURDIR) -f $(MAKEFILE_DIR)/Makefile binaries
tar $(TAR_OWNER0_FLAGS) $(TAR_FLATTEN_FLAGS) -czvf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-linux-amd64.tar.gz $(CURDIR)/_output/nerdctl $(MAKEFILE_DIR)/extras/rootless/*
GOOS=linux GOARCH=arm64 make -C $(CURDIR) -f $(MAKEFILE_DIR)/Makefile binaries
tar $(TAR_OWNER0_FLAGS) $(TAR_FLATTEN_FLAGS) -czvf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-linux-arm64.tar.gz $(CURDIR)/_output/nerdctl $(MAKEFILE_DIR)/extras/rootless/*
GOOS=linux GOARCH=arm GOARM=7 make -C $(CURDIR) -f $(MAKEFILE_DIR)/Makefile binaries
tar $(TAR_OWNER0_FLAGS) $(TAR_FLATTEN_FLAGS) -czvf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-linux-arm-v7.tar.gz $(CURDIR)/_output/nerdctl $(MAKEFILE_DIR)/extras/rootless/*
GOOS=linux GOARCH=loong64 make -C $(CURDIR) -f $(MAKEFILE_DIR)/Makefile binaries
tar $(TAR_OWNER0_FLAGS) $(TAR_FLATTEN_FLAGS) -czvf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-linux-loong64.tar.gz $(CURDIR)/_output/nerdctl $(MAKEFILE_DIR)/extras/rootless/*
GOOS=linux GOARCH=ppc64le make -C $(CURDIR) -f $(MAKEFILE_DIR)/Makefile binaries
tar $(TAR_OWNER0_FLAGS) $(TAR_FLATTEN_FLAGS) -czvf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-linux-ppc64le.tar.gz $(CURDIR)/_output/nerdctl $(MAKEFILE_DIR)/extras/rootless/*
GOOS=linux GOARCH=riscv64 make -C $(CURDIR) -f $(MAKEFILE_DIR)/Makefile binaries
tar $(TAR_OWNER0_FLAGS) $(TAR_FLATTEN_FLAGS) -czvf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-linux-riscv64.tar.gz $(CURDIR)/_output/nerdctl $(MAKEFILE_DIR)/extras/rootless/*
GOOS=linux GOARCH=s390x make -C $(CURDIR) -f $(MAKEFILE_DIR)/Makefile binaries
tar $(TAR_OWNER0_FLAGS) $(TAR_FLATTEN_FLAGS) -czvf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-linux-s390x.tar.gz $(CURDIR)/_output/nerdctl $(MAKEFILE_DIR)/extras/rootless/*
GOOS=windows GOARCH=amd64 make -C $(CURDIR) -f $(MAKEFILE_DIR)/Makefile binaries
tar $(TAR_OWNER0_FLAGS) $(TAR_FLATTEN_FLAGS) -czvf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-windows-amd64.tar.gz $(CURDIR)/_output/nerdctl.exe
GOOS=freebsd GOARCH=amd64 make -C $(CURDIR) -f $(MAKEFILE_DIR)/Makefile binaries
tar $(TAR_OWNER0_FLAGS) $(TAR_FLATTEN_FLAGS) -czvf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-freebsd-amd64.tar.gz $(CURDIR)/_output/nerdctl
rm -f $(CURDIR)/_output/nerdctl $(CURDIR)/_output/nerdctl.exe
$(call make_artifact_full_linux,amd64)
$(call make_artifact_full_linux,arm64)
$(GO) -C $(MAKEFILE_DIR) mod vendor
tar $(TAR_OWNER0_FLAGS) -czf $(CURDIR)/_output/nerdctl-$(VERSION_TRIMMED)-go-mod-vendor.tar.gz $(MAKEFILE_DIR)/go.mod $(MAKEFILE_DIR)/go.sum $(MAKEFILE_DIR)/vendor
$(call footer, $@)
.PHONY: \
all \
lint \
fix \
test \
help \
binaries \
install \
clean \
lint-go lint-go-all lint-yaml lint-shell lint-commits lint-mod lint-licenses lint-licenses-all \
fix-go fix-go-all fix-mod \
install-dev-tools \
test-unit test-unit-race test-unit-bench \
artifacts
================================================
FILE: NOTICE
================================================
nerdctl
Copyright The containerd Authors.
This project contains portions of other projects that are licensed under the terms of Apache License 2.0.
The NOTICE files of those projects are replicated here.
=== https://github.com/moby/moby , https://github.com/docker/cli ===
https://github.com/moby/moby/blob/v20.10.14/LICENSE , https://github.com/docker/cli/blob/v20.10.14/LICENSE
https://github.com/moby/moby/blob/v20.10.14/NOTICE , https://github.com/docker/cli/blob/v20.10.14/NOTICE
> Docker
> Copyright 2012-2017 Docker, Inc.
>
> This product includes software developed at Docker, Inc. (https://www.docker.com).
>
> This product contains software (https://github.com/creack/pty) developed
> by Keith Rarick, licensed under the MIT License.
>
> The following is courtesy of our legal counsel:
>
>
> Use and transfer of Docker may be subject to certain restrictions by the
> United States and other governments.
> It is your responsibility to ensure that your use and/or transfer does not
> violate applicable laws.
>
> For more information, please see https://www.bis.doc.gov
>
> See also https://www.apache.org/dev/crypto.html and/or seek legal counsel.
=== https://github.com/docker/compose ===
https://github.com/docker/compose/blob/v2.4.1/LICENSE
https://github.com/docker/compose/blob/v2.4.1/NOTICE
> Docker Compose V2
> Copyright 2020 Docker Compose authors
>
> This product includes software developed at Docker, Inc. (https://www.docker.com).
================================================
FILE: README.md
================================================
[[⬇️ **Download]**](https://github.com/containerd/nerdctl/releases)
[[📖 **Command reference]**](./docs/command-reference.md)
[[❓**FAQs & Troubleshooting]**](./docs/faq.md)
[[📚 **Additional documents]**](#additional-documents)
# nerdctl: Docker-compatible CLI for containerd
<picture>
<source media="(prefers-color-scheme: light)" srcset="docs/images/nerdctl.svg">
<source media="(prefers-color-scheme: dark)" srcset="docs/images/nerdctl-white.svg">
<img alt="logo" src="docs/images/nerdctl.svg">
</picture>
`nerdctl` is a Docker-compatible CLI for [contai**nerd**](https://containerd.io).
✅ Same UI/UX as `docker`
✅ Supports Docker Compose (`nerdctl compose up`)
✅ [Optional] Supports [rootless mode, without slirp overhead (bypass4netns)](./docs/rootless.md)
✅ [Optional] Supports lazy-pulling ([Stargz](./docs/stargz.md), [Nydus](./docs/nydus.md), [OverlayBD](./docs/overlaybd.md))
✅ [Optional] Supports [encrypted images (ocicrypt)](./docs/ocicrypt.md)
✅ [Optional] Supports [P2P image distribution (IPFS)](./docs/ipfs.md) (\*1)
✅ [Optional] Supports [container image signing and verifying (cosign)](./docs/cosign.md)
nerdctl is a **non-core** sub-project of containerd.
\*1: P2P image distribution (IPFS) is completely optional. Your host is NOT connected to any P2P network, unless you opt in to [install and run IPFS daemon](https://docs.ipfs.io/install/).
## Examples
### Basic usage
To run a container with the default `bridge` CNI network (10.4.0.0/24):
```console
# nerdctl run -it --rm alpine
```
To build an image using BuildKit:
```console
# nerdctl build -t foo /some-dockerfile-directory
# nerdctl run -it --rm foo
```
To build and send output to a local directory using BuildKit:
```console
# nerdctl build -o type=local,dest=. /some-dockerfile-directory
```
To run containers from `docker-compose.yaml`:
```console
# nerdctl compose -f ./examples/compose-wordpress/docker-compose.yaml up
```
See also [`./examples/compose-wordpress`](./examples/compose-wordpress).
### Debugging Kubernetes
To list local Kubernetes containers:
```console
# nerdctl --namespace k8s.io ps -a
```
To build an image for local Kubernetes without using registry:
```console
# nerdctl --namespace k8s.io build -t foo /some-dockerfile-directory
# kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: foo
spec:
containers:
- name: foo
image: foo
imagePullPolicy: Never
EOF
```
To load an image archive (`docker save` format or OCI format) into local Kubernetes:
```console
# nerdctl --namespace k8s.io load < /path/to/image.tar
```
To read logs (experimental):
```console
# nerdctl --namespace=k8s.io ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
...
e8793b8cca8b registry.k8s.io/coredns/coredns:v1.9.3 "/coredns -conf /etc…" 2 minutes ago Up k8s://kube-system/coredns-787d4945fb-mfx6b/coredns
...
# nerdctl --namespace=k8s.io logs -f e8793b8cca8b
[INFO] plugin/reload: Running configuration SHA512 = 591cf328cccc12bc490481273e738df59329c62c0b729d94e8b61db9961c2fa5f046dd37f1cf888b953814040d180f52594972691cd6ff41be96639138a43908
CoreDNS-1.9.3
linux/amd64, go1.18.2, 45b0a11
...
```
### Rootless mode
To launch rootless containerd:
```console
$ containerd-rootless-setuptool.sh install
```
To run a container with rootless containerd:
```console
$ nerdctl run -d -p 8080:80 --name nginx nginx:alpine
```
See [`./docs/rootless.md`](./docs/rootless.md).
## Install
Binaries are available here: <https://github.com/containerd/nerdctl/releases>
In addition to containerd, the following components should be installed:
- [CNI plugins](https://github.com/containernetworking/plugins): for using `nerdctl run`.
- v1.1.0 or later is highly recommended.
- [BuildKit](https://github.com/moby/buildkit) (OPTIONAL): for using `nerdctl build`. BuildKit daemon (`buildkitd`) needs to be running. See also [the document about setting up BuildKit](./docs/build.md).
- v0.11.0 or later is highly recommended. Some features, such as pruning caches with `nerdctl system prune`, do not work with older versions.
- [RootlessKit](https://github.com/rootless-containers/rootlesskit) and [slirp4netns](https://github.com/rootless-containers/slirp4netns) (OPTIONAL): for [Rootless mode](./docs/rootless.md)
- RootlessKit needs to be v0.10.0 or later. v2.0.0 or later is recommended.
- slirp4netns needs to be v0.4.0 or later. v1.1.7 or later is recommended.
These dependencies are included in `nerdctl-full-<VERSION>-<OS>-<ARCH>.tar.gz`, but not included in `nerdctl-<VERSION>-<OS>-<ARCH>.tar.gz`.
### Brew
On Linux systems you can install nerdctl via [brew](https://brew.sh):
```bash
brew install nerdctl
```
This is currently not supported for macOS. The section below shows how to install on macOS using brew.
### macOS
[Lima](https://github.com/lima-vm/lima) project provides Linux virtual machines for macOS, with built-in integration for nerdctl.
```console
$ brew install lima
$ limactl start
$ lima nerdctl run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine
```
### FreeBSD
See [`./docs/freebsd.md`](docs/freebsd.md).
### Windows
- Linux containers: Known to work on WSL2
- Windows containers: experimental support for Windows (see below for features that are currently known to work)
### Docker
To run containerd and nerdctl inside Docker:
```bash
docker build -t nerdctl .
docker run -it --rm --privileged nerdctl
```
## Motivation
The goal of `nerdctl` is to facilitate experimenting the cutting-edge features of containerd that are not present in Docker (see below).
Note that competing with Docker is _not_ the goal of `nerdctl`. Those cutting-edge features are expected to be eventually available in Docker as well.
Also, `nerdctl` might be potentially useful for debugging Kubernetes clusters, but it is not the primary goal.
## Features present in `nerdctl` but not present in Docker
Major:
- On-demand image pulling (lazy-pulling) using [Stargz](./docs/stargz.md)/[Nydus](./docs/nydus.md)/[OverlayBD](./docs/overlaybd.md)/[SOCI](./docs/soci.md) Snapshotter: `nerdctl --snapshotter=stargz|nydus|overlaybd|soci run IMAGE` .
- [Image encryption and decryption using ocicrypt (imgcrypt)](./docs/ocicrypt.md): `nerdctl image (encrypt|decrypt) SRC DST`
- [P2P image distribution using IPFS](./docs/ipfs.md): `nerdctl run ipfs://CID` .
P2P image distribution (IPFS) is completely optional. Your host is NOT connected to any P2P network, unless you opt in to [install and run IPFS daemon](https://docs.ipfs.io/install/).
- [Cosign integration](./docs/cosign.md): `nerdctl pull --verify=cosign` and `nerdctl push --sign=cosign`, and [in Compose](./docs/cosign.md#cosign-in-compose)
- [Accelerated rootless containers using bypass4netns](./docs/rootless.md): `nerdctl run --annotation nerdctl/bypass4netns=true`
Minor:
- Namespacing: `nerdctl --namespace=<NS> ps` .
(NOTE: All Kubernetes containers are in the `k8s.io` containerd namespace regardless to Kubernetes namespaces)
- Exporting Docker/OCI dual-format archives: `nerdctl save` .
- Importing OCI archives as well as Docker archives: `nerdctl load` .
- Specifying a non-image rootfs: `nerdctl run -it --rootfs <ROOTFS> /bin/sh` . The CLI syntax conforms to Podman convention.
- Connecting a container to multiple networks at once: `nerdctl run --net foo --net bar`
- Running [FreeBSD jails](./docs/freebsd.md).
- Better multi-platform support, e.g., `nerdctl pull --all-platforms IMAGE`
- Applying an (existing) AppArmor profile to rootless containers: `nerdctl run --security-opt apparmor=<PROFILE>`.
Use `sudo nerdctl apparmor load` to load the `nerdctl-default` profile.
- Systemd compatibility support: `nerdctl run --systemd=always`
Trivial:
- Inspecting raw OCI config: `nerdctl container inspect --mode=native` .
## Features implemented in `nerdctl` ahead of Docker
- Recursive read-only (RRO) bind-mount: `nerdctl run -v /mnt:/mnt:rro` (make children such as `/mnt/usb` to be read-only, too).
Requires kernel >= 5.12.
The same feature was later introduced in Docker v25 with a different syntax. nerdctl will support Docker v25 syntax too in the future.
## Similar tools
- [`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`
- `nerdctl pull` with `~/.docker/config.json` and credential helper binaries such as `docker-credential-ecr-login`
- `nerdctl logs`
- `nerdctl build`
- `nerdctl compose up`
- [`crictl`](https://github.com/kubernetes-sigs/cri-tools): incompatible with Docker CLI, not friendly to users, and does not support non-CRI features
- [k3c v0.2 (abandoned)](https://github.com/rancher/k3c/tree/v0.2.1): needs an extra daemon, and does not support non-CRI features
- [Rancher Kim (nee k3c v0.3)](https://github.com/rancher/kim): needs Kubernetes, and only focuses on image management commands such as `kim build` and `kim push`
- [PouchContainer (abandoned?)](https://github.com/alibaba/pouch): needs an extra daemon
## 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/main/GOVERNANCE.md),
- [Maintainers](./MAINTAINERS),
- and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md)
information in our [`containerd/project`](https://github.com/containerd/project) repository.
### Compiling nerdctl from source
Run `make && sudo make install`.
See the header of [`go.mod`](./go.mod) for the minimum supported version of Go.
Using `go install github.com/containerd/nerdctl/v2/cmd/nerdctl` is possible, but unrecommended because it does not fill version strings printed in `nerdctl version`
### Testing
See [testing nerdctl](docs/testing/README.md).
### Contributing to nerdctl
Lots of commands and flags are currently missing. Pull requests are highly welcome.
Please certify your [Developer Certificate of Origin (DCO)](https://developercertificate.org/), by signing off your commit with `git commit -s` and with your real name.
# Command reference
Moved to [`./docs/command-reference.md`](./docs/command-reference.md)
# Additional documents
Configuration guide:
- [`./docs/config.md`](./docs/config.md): Configuration (`/etc/nerdctl/nerdctl.toml`, `~/.config/nerdctl/nerdctl.toml`)
- [`./docs/registry.md`](./docs/registry.md): Registry authentication (`~/.docker/config.json`)
Basic features:
- [`./docs/compose.md`](./docs/compose.md): Compose
- [`./docs/rootless.md`](./docs/rootless.md): Rootless mode
- [`./docs/cni.md`](./docs/cni.md): CNI for containers network
- [`./docs/build.md`](./docs/build.md): `nerdctl build` with BuildKit
Advanced features:
- [`./docs/stargz.md`](./docs/stargz.md): Lazy-pulling using Stargz Snapshotter
- [`./docs/nydus.md`](./docs/nydus.md): Lazy-pulling using Nydus Snapshotter
- [`./docs/soci.md`](./docs/soci.md): Lazy-pulling using SOCI Snapshotter
- [`./docs/overlaybd.md`](./docs/overlaybd.md): Lazy-pulling using OverlayBD Snapshotter
- [`./docs/ocicrypt.md`](./docs/ocicrypt.md): Running encrypted images
- [`./docs/gpu.md`](./docs/gpu.md): Using GPUs inside containers
- [`./docs/multi-platform.md`](./docs/multi-platform.md): Multi-platform mode
Experimental features:
- [`./docs/experimental.md`](./docs/experimental.md): Experimental features
- [`./docs/freebsd.md`](./docs/freebsd.md): Running FreeBSD jails
- [`./docs/ipfs.md`](./docs/ipfs.md): Distributing images on IPFS
- [`./docs/builder-debug.md`](./docs/builder-debug.md): Interactive debugging of Dockerfile
Implementation details:
- [`./docs/dir.md`](./docs/dir.md): Directory layout (`/var/lib/nerdctl`)
Misc:
- [`./docs/faq.md`](./docs/faq.md): FAQs and Troubleshooting
================================================
FILE: SECURITY.md
================================================
See https://github.com/containerd/project/blob/main/SECURITY.md for reporting a vulnerability.
================================================
FILE: Vagrantfile.freebsd
================================================
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Copyright The containerd Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Vagrantfile for FreeBSD
Vagrant.configure("2") do |config|
config.vm.box = "generic/freebsd14"
memory = 2048
cpus = 1
config.vm.provider :virtualbox do |v, o|
v.memory = memory
v.cpus = cpus
end
config.vm.provider :libvirt do |v|
v.memory = memory
v.cpus = cpus
end
config.vm.synced_folder ".", "/vagrant", type: "rsync"
config.vm.provision "install", type: "shell", run: "once" do |sh|
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
freebsd-version -kru
# switching to "release_2" ensures compatibility with the current Vagrant box
# https://github.com/moby/buildkit/pull/5893
sed -i '' 's/latest/release_2/' /usr/local/etc/pkg/repos/FreeBSD.conf
# `pkg install go` still installs Go 1.20 (March 2024)
pkg install -y go122 containerd runj
ln -s go122 /usr/local/bin/go
cd /vagrant
go install ./cmd/nerdctl
SHELL
end
config.vm.provision "test-unit", type: "shell", run: "never" do |sh|
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
cd /vagrant
go test -v ./pkg/...
SHELL
end
config.vm.provision "test-integration", type: "shell", run: "never" do |sh|
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
daemon -o containerd.out containerd
sleep 3
CONTAINERD_ADDRESS=/run/containerd/containerd.sock /root/go/bin/nerdctl run --rm --quiet --net=none dougrabson/freebsd-minimal:13 echo "Nerdctl is up and running."
SHELL
end
end
================================================
FILE: cmd/nerdctl/apparmor/apparmor_inspect_linux.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package apparmor
import (
"fmt"
"github.com/spf13/cobra"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/cmd/apparmor"
"github.com/containerd/nerdctl/v2/pkg/defaults"
)
func inspectCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "inspect",
Short: fmt.Sprintf("Display the default AppArmor profile %q. Other profiles cannot be displayed with this command.", defaults.AppArmorProfileName),
Args: cobra.NoArgs,
RunE: inspectAction,
SilenceUsage: true,
SilenceErrors: true,
}
return cmd
}
func inspectAction(cmd *cobra.Command, args []string) error {
return apparmor.Inspect(types.ApparmorInspectOptions{
Stdout: cmd.OutOrStdout(),
})
}
================================================
FILE: cmd/nerdctl/apparmor/apparmor_linux.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package apparmor
import (
"github.com/spf13/cobra"
"github.com/containerd/nerdctl/v2/cmd/nerdctl/helpers"
)
func Command() *cobra.Command {
cmd := &cobra.Command{
Annotations: map[string]string{helpers.Category: helpers.Management},
Use: "apparmor",
Short: "Manage AppArmor profiles",
RunE: helpers.UnknownSubcommandAction,
SilenceUsage: true,
SilenceErrors: true,
}
cmd.AddCommand(
listCommand(),
inspectCommand(),
loadCommand(),
unloadCommand(),
)
return cmd
}
================================================
FILE: cmd/nerdctl/apparmor/apparmor_linux_test.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package apparmor
import (
"testing"
"github.com/containerd/nerdctl/v2/pkg/testutil"
)
func TestMain(m *testing.M) {
testutil.M(m)
}
================================================
FILE: cmd/nerdctl/apparmor/apparmor_list_linux.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package apparmor
import (
"github.com/spf13/cobra"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/cmd/apparmor"
)
func listCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "ls",
Aliases: []string{"list"},
Short: "List the loaded AppArmor profiles",
Args: cobra.NoArgs,
RunE: listAction,
SilenceUsage: true,
SilenceErrors: true,
}
cmd.Flags().BoolP("quiet", "q", false, "Only display profile names")
// Alias "-f" is reserved for "--filter"
cmd.Flags().String("format", "", "Format the output using the given go template")
cmd.RegisterFlagCompletionFunc("format", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return []string{"json", "table", "wide"}, cobra.ShellCompDirectiveNoFileComp
})
return cmd
}
func listOptions(cmd *cobra.Command) (types.ApparmorListOptions, error) {
quiet, err := cmd.Flags().GetBool("quiet")
if err != nil {
return types.ApparmorListOptions{}, err
}
format, err := cmd.Flags().GetString("format")
if err != nil {
return types.ApparmorListOptions{}, err
}
return types.ApparmorListOptions{
Quiet: quiet,
Format: format,
Stdout: cmd.OutOrStdout(),
}, nil
}
func listAction(cmd *cobra.Command, args []string) error {
options, err := listOptions(cmd)
if err != nil {
return err
}
return apparmor.List(options)
}
================================================
FILE: cmd/nerdctl/apparmor/apparmor_load_linux.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package apparmor
import (
"fmt"
"github.com/spf13/cobra"
"github.com/containerd/nerdctl/v2/pkg/cmd/apparmor"
"github.com/containerd/nerdctl/v2/pkg/defaults"
)
func loadCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "load",
Short: fmt.Sprintf("Load the default AppArmor profile %q. Requires root.", defaults.AppArmorProfileName),
Args: cobra.NoArgs,
RunE: loadAction,
SilenceUsage: true,
SilenceErrors: true,
}
return cmd
}
func loadAction(cmd *cobra.Command, args []string) error {
return apparmor.Load()
}
================================================
FILE: cmd/nerdctl/apparmor/apparmor_unload_linux.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package apparmor
import (
"fmt"
"github.com/spf13/cobra"
"github.com/containerd/nerdctl/v2/cmd/nerdctl/completion"
"github.com/containerd/nerdctl/v2/pkg/cmd/apparmor"
"github.com/containerd/nerdctl/v2/pkg/defaults"
)
func unloadCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "unload [PROFILE]",
Short: fmt.Sprintf("Unload an AppArmor profile. The target profile name defaults to %q. Requires root.", defaults.AppArmorProfileName),
Args: cobra.MaximumNArgs(1),
RunE: unloadAction,
ValidArgsFunction: unloadShellComplete,
SilenceUsage: true,
SilenceErrors: true,
}
return cmd
}
func unloadAction(cmd *cobra.Command, args []string) error {
target := defaults.AppArmorProfileName
if len(args) > 0 {
target = args[0]
}
return apparmor.Unload(target)
}
func unloadShellComplete(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return completion.ApparmorProfiles(cmd)
}
================================================
FILE: cmd/nerdctl/builder/builder.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package builder
import (
"fmt"
"os"
"os/exec"
"strings"
"time"
"github.com/docker/go-units"
"github.com/spf13/cobra"
"github.com/containerd/nerdctl/v2/cmd/nerdctl/helpers"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/cmd/builder"
)
func Command() *cobra.Command {
var cmd = &cobra.Command{
Annotations: map[string]string{helpers.Category: helpers.Management},
Use: "builder",
Short: "Manage builds",
RunE: helpers.UnknownSubcommandAction,
SilenceUsage: true,
SilenceErrors: true,
}
cmd.AddCommand(
BuildCommand(),
pruneCommand(),
debugCommand(),
)
return cmd
}
func pruneCommand() *cobra.Command {
shortHelp := `Clean up BuildKit build cache`
var cmd = &cobra.Command{
Use: "prune",
Args: cobra.NoArgs,
Short: shortHelp,
RunE: pruneAction,
SilenceUsage: true,
SilenceErrors: true,
}
cmd.Flags().String("buildkit-host", "", "BuildKit address")
cmd.Flags().BoolP("all", "a", false, "Remove all unused build cache, not just dangling ones")
cmd.Flags().BoolP("force", "f", false, "Do not prompt for confirmation")
return cmd
}
func pruneAction(cmd *cobra.Command, _ []string) error {
options, err := pruneOptions(cmd)
if err != nil {
return err
}
if !options.Force {
var msg string
if options.All {
msg = "This will remove all build cache."
} else {
msg = "This will remove any dangling build cache."
}
if confirmed, err := helpers.Confirm(cmd, fmt.Sprintf("WARNING! %s.", msg)); err != nil || !confirmed {
return err
}
}
prunedObjects, err := builder.Prune(cmd.Context(), options)
if err != nil {
return err
}
var totalReclaimedSpace int64
for _, prunedObject := range prunedObjects {
totalReclaimedSpace += prunedObject.Size
}
fmt.Fprintf(cmd.OutOrStdout(), "Total: %s\n", units.BytesSize(float64(totalReclaimedSpace)))
return nil
}
func pruneOptions(cmd *cobra.Command) (types.BuilderPruneOptions, error) {
globalOptions, err := helpers.ProcessRootCmdFlags(cmd)
if err != nil {
return types.BuilderPruneOptions{}, err
}
buildkitHost, err := GetBuildkitHost(cmd, globalOptions.Namespace)
if err != nil {
return types.BuilderPruneOptions{}, err
}
all, err := cmd.Flags().GetBool("all")
if err != nil {
return types.BuilderPruneOptions{}, err
}
force, err := cmd.Flags().GetBool("force")
if err != nil {
return types.BuilderPruneOptions{}, err
}
return types.BuilderPruneOptions{
Stderr: cmd.OutOrStderr(),
GOptions: globalOptions,
BuildKitHost: buildkitHost,
All: all,
Force: force,
}, nil
}
func debugCommand() *cobra.Command {
shortHelp := `Debug Dockerfile`
var cmd = &cobra.Command{
Use: "debug",
Short: shortHelp,
PreRunE: helpers.CheckExperimental("`nerdctl builder debug`"),
RunE: debugAction,
SilenceUsage: true,
SilenceErrors: true,
}
cmd.Flags().StringP("file", "f", "", "Name of the Dockerfile")
cmd.Flags().String("target", "", "Set the target build stage to build")
cmd.Flags().StringArray("build-arg", nil, "Set build-time variables")
cmd.Flags().String("image", "", "Image to use for debugging stage")
cmd.Flags().StringArray("ssh", nil, "Allow forwarding SSH agent to the build. Format: default|<id>[=<socket>|<key>[,<key>]]")
cmd.Flags().StringArray("secret", nil, "Expose secret value to the build. Format: id=secretname,src=filepath")
helpers.AddDurationFlag(cmd, "buildg-startup-timeout", nil, 1*time.Minute, "", "Timeout for starting up buildg")
return cmd
}
func debugAction(cmd *cobra.Command, args []string) error {
globalOptions, err := helpers.ProcessRootCmdFlags(cmd)
if err != nil {
return err
}
if len(args) < 1 {
return fmt.Errorf("context needs to be specified")
}
buildgBinary, err := exec.LookPath("buildg")
if err != nil {
return err
}
buildgArgs := []string{"debug"}
if globalOptions.Debug {
buildgArgs = append([]string{"--debug"}, buildgArgs...)
}
startupTimeout, err := cmd.Flags().GetDuration("buildg-startup-timeout")
if err != nil {
return err
}
buildgArgs = append(buildgArgs, "--startup-timeout="+startupTimeout.String())
if file, err := cmd.Flags().GetString("file"); err != nil {
return err
} else if file != "" {
buildgArgs = append(buildgArgs, "--file="+file)
}
if target, err := cmd.Flags().GetString("target"); err != nil {
return err
} else if target != "" {
buildgArgs = append(buildgArgs, "--target="+target)
}
if buildArgsValue, err := cmd.Flags().GetStringArray("build-arg"); err != nil {
return err
} else if len(buildArgsValue) > 0 {
for _, v := range buildArgsValue {
arr := strings.Split(v, "=")
if len(arr) == 1 && len(arr[0]) > 0 {
// Avoid masking default build arg value from Dockerfile if environment variable is not set
// https://github.com/moby/moby/issues/24101
val, ok := os.LookupEnv(arr[0])
if ok {
buildgArgs = append(buildgArgs, fmt.Sprintf("--build-arg=%s=%s", v, val))
}
} else if len(arr) > 1 && len(arr[0]) > 0 {
buildgArgs = append(buildgArgs, "--build-arg="+v)
} else {
return fmt.Errorf("invalid build arg %q", v)
}
}
}
if imageValue, err := cmd.Flags().GetString("image"); err != nil {
return err
} else if imageValue != "" {
buildgArgs = append(buildgArgs, "--image="+imageValue)
}
if sshValue, err := cmd.Flags().GetStringArray("ssh"); err != nil {
return err
} else if len(sshValue) > 0 {
for _, v := range sshValue {
buildgArgs = append(buildgArgs, "--ssh="+v)
}
}
if secretValue, err := cmd.Flags().GetStringArray("secret"); err != nil {
return err
} else if len(secretValue) > 0 {
for _, v := range secretValue {
buildgArgs = append(buildgArgs, "--secret="+v)
}
}
buildgCmd := exec.Command(buildgBinary, append(buildgArgs, args[0])...)
buildgCmd.Env = os.Environ()
buildgCmd.Stdin = cmd.InOrStdin()
buildgCmd.Stdout = cmd.OutOrStdout()
buildgCmd.Stderr = cmd.ErrOrStderr()
if err := buildgCmd.Start(); err != nil {
return err
}
return buildgCmd.Wait()
}
================================================
FILE: cmd/nerdctl/builder/builder_build.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package builder
import (
"errors"
"fmt"
"strconv"
"strings"
"github.com/spf13/cobra"
"github.com/containerd/log"
"github.com/containerd/nerdctl/v2/cmd/nerdctl/completion"
"github.com/containerd/nerdctl/v2/cmd/nerdctl/helpers"
"github.com/containerd/nerdctl/v2/pkg/api/types"
"github.com/containerd/nerdctl/v2/pkg/buildkitutil"
"github.com/containerd/nerdctl/v2/pkg/clientutil"
"github.com/containerd/nerdctl/v2/pkg/cmd/builder"
"github.com/containerd/nerdctl/v2/pkg/strutil"
)
func BuildCommand() *cobra.Command {
var cmd = &cobra.Command{
Use: "build [flags] PATH",
Short: "Build an image from a Dockerfile. Needs buildkitd to be running.",
Long: `Build an image from a Dockerfile. Needs buildkitd to be running.
If Dockerfile is not present and -f is not specified, it will look for Containerfile and build with it. `,
RunE: buildAction,
SilenceUsage: true,
SilenceErrors: true,
}
cmd.Flags().String("buildkit-host", "", "BuildKit address")
cmd.Flags().StringArray("add-host", nil, "Add a custom host-to-IP mapping (format: \"host:ip\")")
cmd.Flags().StringArrayP("tag", "t", nil, "Name and optionally a tag in the 'name:tag' format")
cmd.Flags().StringP("file", "f", "", "Name of the Dockerfile")
cmd.Flags().String("target", "", "Set the target build stage to build")
cmd.Flags().StringArray("build-arg", nil, "Set build-time variables")
cmd.Flags().Bool("no-cache", false, "Do not use cache when building the image")
cmd.Flags().StringP("output", "o", "", "Output destination (format: type=local,dest=path)")
cmd.Flags().String("progress", "auto", "Set type of progress output (auto, plain, tty). Use plain to show container output")
cmd.Flags().String("provenance", "", "Shorthand for \"--attest=type=provenance\"")
cmd.Flags().Bool("pull", false, "On true, always attempt to pull latest image version from remote. Default uses buildkit's default.")
cmd.Flags().StringArray("secret", nil, "Secret file to expose to the build: id=mysecret,src=/local/secret")
cmd.Flags().StringArray("allow", nil, "Allow extra privileged entitlement, e.g. network.host, security.insecure")
cmd.RegisterFlagCompletionFunc("allow", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return []string{"network.host", "security.insecure"}, cobra.ShellCompDirectiveNoFileComp
})
cmd.Flags().StringArray("attest", nil, "Attestation parameters (format: \"type=sbom,generator=image\")")
cmd.Flags().StringArray("ssh", nil, "SSH agent socket or keys to expose to the build (format: default|<id>[=<socket>|<key>[,<key>]])")
cmd.Flags().BoolP("quiet", "q", false, "Suppress the build output and print image ID on success")
cmd.Flags().String("sbom", "", "Shorthand for \"--attest=type=sbom\"")
cmd.Flags().StringArray("cache-from", nil, "External cache sources (eg. user/app:cache, type=local,src=path/to/dir)")
cmd.Flags().StringArray("cache-to", nil, "Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)")
cmd.Flags().Bool("rm", true, "Remove intermediate containers after a successful build")
cmd.Flags().String("network", "default", "Set type of network for build (format:network=default|none|host)")
cmd.RegisterFlagCompletionFunc("network", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return []string{"default", "host", "none"}, cobra.ShellCompDirectiveNoFileComp
})
// #region platform flags
// platform is defined as StringSlice, not StringArray, to allow specifying "--platform=amd64,arm64"
cmd.Flags().StringSlice("platform", []string{}, "Set target platform for build (e.g., \"amd64\", \"arm64\")")
cmd.RegisterFlagCompletionFunc("platform", completion.Platforms)
cmd.Flags().StringArray("build-context", []string{}, "Additional build contexts (e.g., name=path)")
// #endregion
cmd.Flags().String("iidfile", "", "Write the image ID to the file")
cmd.Flags().StringArray("label", nil, "Set metadata for an image")
cmd.Flags().String("source-policy-file", "", "BuildKit source policy file (see https://github.com/moby/buildkit/blob/master/docs/build-repro.md)")
return cmd
}
func processBuildCommandFlag(cmd *cobra.Command, args []string) (types.BuilderBuildOptions, error) {
globalOptions, err := helpers.ProcessRootCmdFlags(cmd)
if err != nil {
return types.BuilderBuildOptions{}, err
}
buildKitHost, err := GetBuildkitHost(cmd, globalOptions.Namespace)
if err != nil {
return types.BuilderBuildOptions{}, err
}
extraHosts, err := cmd.Flags().GetStringArray("add-host")
if err != nil {
return types.BuilderBuildOptions{}, err
}
platform, err := cmd.Flags().GetStringSlice("platform")
if err != nil {
return types.BuilderBuildOptions{}, err
}
platform = strutil.DedupeStrSlice(platform)
if len(args) < 1 {
return types.BuilderBuildOptions{}, errors.New("context needs to be specified")
}
buildContext := args[0]
if buildContext == "-" || strings.Contains(buildContext, "://") {
return types.BuilderBuildOptions{}, fmt.Errorf("unsupported build context: %q", buildContext)
}
output, err := cmd.Flags().GetString("output")
if err != nil {
return types.BuilderBuildOptions{}, err
}
tagValue, err := cmd.Flags().GetStringArray("tag")
if err != nil {
return types.BuilderBuildOptions{}, err
}
progress, err := cmd.Flags().GetString("progress")
if err != nil {
return types.BuilderBuildOptions{}, err
}
filename, err := cmd.Flags().GetString("file")
if err != nil {
return types.BuilderBuildOptions{}, err
}
target, err := cmd.Flags().GetString("target")
if err != nil {
return types.BuilderBuildOptions{}, err
}
buildArgs, err := cmd.Flags().GetStringArray("build-arg")
if err != nil {
return types.BuilderBuildOptions{}, err
}
label, err := cmd.Flags().GetStringArray("label")
if err != nil {
return types.BuilderBuildOptions{}, err
}
noCache, err := cmd.Flags().GetBool("no-cache")
if err != nil {
return types.BuilderBuildOptions{}, err
}
var pull *bool
if cmd.Flags().Changed("pull") {
pullFlag, err := cmd.Flags().GetBool("pull")
if err != nil {
return types.BuilderBuildOptions{}, err
}
pull = &pullFlag
}
secret, err := cmd.Flags().GetStringArray("secret")
if err != nil {
return types.BuilderBuildOptions{}, err
}
allow, err := cmd.Flags().GetStringArray("allow")
if err != nil {
return types.BuilderBuildOptions{}, err
}
ssh, err := cmd.Flags().GetStringArray("ssh")
if err != nil {
return types.BuilderBuildOptions{}, err
}
cacheFrom, err := cmd.Flags().GetStringArray("cache-from")
if err != nil {
return types.BuilderBuildOptions{}, err
}
cacheTo, err := cmd.Flags().GetStringArray("cache-to")
if err != nil {
return types.BuilderBuildOptions{}, err
}
rm, err := cmd.Flags().GetBool("rm")
if err != nil {
return types.BuilderBuildOptions{}, err
}
iidfile, err := cmd.Flags().GetString("iidfile")
if err != nil {
return types.BuilderBuildOptions{}, err
}
quiet, err := cmd.Flags().GetBool("quiet")
if err != nil {
return types.BuilderBuildOptions{}, err
}
network, err := cmd.Flags().GetString("network")
if err != nil {
return types.BuilderBuildOptions{}, err
}
attest, err := cmd.Flags().GetStringArray("attest")
if err != nil {
return types.BuilderBuildOptions{}, err
}
sbom, err := cmd.Flags().GetString("sbom")
if err != nil {
return types.BuilderBuildOptions{}, err
}
if sbom != "" {
attest = append(attest, canonicalizeAttest("sbom", sbom))
}
provenance, err := cmd.Flags().GetString("provenance")
if err != nil {
return types.BuilderBuildOptions{}, err
}
if provenance != "" {
attest = append(attest, canonicalizeAttest("provenance", provenance))
}
extendedBuildCtx, err := cmd.Flags().GetStringArray("build-context")
if err != nil {
return types.BuilderBuildOptions{}, err
}
sourcePolicyFile, err := cmd.Flags().GetString("source-policy-file")
if err != nil {
return types.BuilderBuildOptions{}, err
}
usernsRemap, err := cmd.Flags().GetString("userns-remap")
if err != nil {
return types.BuilderBuildOptions{}, err
} else if usernsRemap != "" {
log.L.Warn("userns remap is not supported with nerdctl build. dropping the config.")
}
return types.BuilderBuildOptions{
GOptions: globalOptions,
BuildKitHost: buildKitHost,
BuildContext: buildContext,
Output: output,
Tag: tagValue,
Progress: progress,
File: filename,
Target: target,
BuildArgs: buildArgs,
Label: label,
NoCache: noCache,
Pull: pull,
Secret: secret,
Allow: allow,
Attest: attest,
SSH: ssh,
CacheFrom: cacheFrom,
CacheTo: cacheTo,
Rm: rm,
IidFile: iidfile,
Quiet: quiet,
Platform: platform,
Stdout: cmd.OutOrStdout(),
Stderr: cmd.OutOrStderr(),
Stdin: cmd.InOrStdin(),
NetworkMode: network,
ExtendedBuildContext: extendedBuildCtx,
ExtraHosts: extraHosts,
SourcePolicyFile: sourcePolicyFile,
}, nil
}
func GetBuildkitHost(cmd *cobra.Command, namespace string) (string, error) {
if cmd.Flags().Changed("buildkit-host") {
// If address is explicitly specified, use it.
buildkitHost, err := cmd.Flags().GetString("buildkit-host")
if err != nil {
return "", err
}
if err := buildkitutil.PingBKDaemon(buildkitHost); err != nil {
return "", err
}
return buildkitHost, nil
}
return buildkitutil.GetBuildkitHost(namespace)
}
func buildAction(cmd *cobra.Command, args []string) error {
options, err := processBuildCommandFlag(cmd, args)
if err != nil {
return err
}
client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), options.GOptions.Namespace, options.GOptions.Address)
if err != nil {
return err
}
defer cancel()
return builder.Build(ctx, client, options)
}
// canonicalizeAttest is from https://github.com/docker/buildx/blob/v0.12/util/buildflags/attests.go##L13-L21
func canonicalizeAttest(attestType string, in string) string {
if in == "" {
return ""
}
if b, err := strconv.ParseBool(in); err == nil {
return fmt.Sprintf("type=%s,disabled=%t", attestType, !b)
}
return fmt.Sprintf("type=%s,%s", attestType, in)
}
================================================
FILE: cmd/nerdctl/builder/builder_build_oci_layout_test.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package builder
import (
"fmt"
"path/filepath"
"strings"
"testing"
"gotest.tools/v3/assert"
"github.com/containerd/nerdctl/mod/tigron/expect"
"github.com/containerd/nerdctl/mod/tigron/require"
"github.com/containerd/nerdctl/mod/tigron/test"
"github.com/containerd/nerdctl/mod/tigron/tig"
"github.com/containerd/nerdctl/v2/pkg/testutil"
"github.com/containerd/nerdctl/v2/pkg/testutil/nerdtest"
)
func TestBuildContextWithOCILayout(t *testing.T) {
nerdtest.Setup()
var dockerBuilderArgs []string
testCase := &test.Case{
Require: require.All(
nerdtest.Build,
require.Not(require.Windows),
),
Cleanup: func(data test.Data, helpers test.Helpers) {
if nerdtest.IsDocker() {
helpers.Anyhow("buildx", "stop", data.Identifier("container"))
helpers.Anyhow("buildx", "rm", "--force", data.Identifier("container"))
}
helpers.Anyhow("rmi", "-f", data.Identifier("parent"))
helpers.Anyhow("rmi", "-f", data.Identifier("child"))
},
Setup: func(data test.Data, helpers test.Helpers) {
// Default docker driver does not support OCI exporter.
// Reference: https://docs.docker.com/build/exporters/oci-docker/
if nerdtest.IsDocker() {
name := data.Identifier("container")
helpers.Ensure("buildx", "create", "--name", name, "--driver=docker-container")
dockerBuilderArgs = []string{"buildx", "--builder", name}
}
dockerfile := fmt.Sprintf(`FROM %s
LABEL layer=oci-layout-parent
CMD ["echo", "test-nerdctl-build-context-oci-layout-parent"]`, testutil.CommonImage)
data.Temp().Save(dockerfile, "Dockerfile")
dest := data.Temp().Dir("parent")
tarPath := data.Temp().Path("parent.tar")
helpers.Ensure("build", data.Temp().Path(), "--tag", data.Identifier("parent"))
helpers.Ensure("image", "save", "--output", tarPath, data.Identifier("parent"))
helpers.Custom("tar", "Cxf", dest, tarPath).Run(&test.Expected{
ExitCode: expect.ExitCodeSuccess,
})
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
dockerfile := `FROM parent
CMD ["echo", "test-nerdctl-build-context-oci-layout"]`
data.Temp().Save(dockerfile, "Dockerfile")
var cmd test.TestableCommand
if nerdtest.IsDocker() {
cmd = helpers.Command(dockerBuilderArgs...)
} else {
cmd = helpers.Command()
}
cmd.WithArgs(
"build",
data.Temp().Path(),
fmt.Sprintf("--build-context=parent=oci-layout://%s", filepath.Join(data.Temp().Path(), "parent")),
"--tag",
data.Identifier("child"),
)
if nerdtest.IsDocker() {
// Need to load the container image from the builder to be able to run it.
cmd.WithArgs("--load")
}
return cmd
},
Expected: func(data test.Data, helpers test.Helpers) *test.Expected {
return &test.Expected{
Output: func(stdout string, t tig.T) {
assert.Assert(
t,
strings.Contains(
helpers.Capture("run", "--rm", data.Identifier("child")),
"test-nerdctl-build-context-oci-layout",
),
)
},
}
},
}
testCase.Run(t)
}
================================================
FILE: cmd/nerdctl/builder/builder_build_test.go
================================================
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package builder
import (
"errors"
"fmt"
"os"
"path/filepath"
"regexp"
"runtime"
"strings"
"testing"
"gotest.tools/v3/assert"
"github.com/containerd/nerdctl/mod/tigron/expect"
"github.com/containerd/nerdctl/mod/tigron/require"
"github.com/containerd/nerdctl/mod/tigron/test"
"github.com/containerd/nerdctl/mod/tigron/tig"
"github.com/containerd/nerdctl/v2/pkg/buildkitutil"
"github.com/containerd/nerdctl/v2/pkg/platformutil"
"github.com/containerd/nerdctl/v2/pkg/testutil"
"github.com/containerd/nerdctl/v2/pkg/testutil/nerdtest"
)
func TestBuildBasics(t *testing.T) {
nerdtest.Setup()
dockerfile := fmt.Sprintf(`FROM %s
CMD ["echo", "nerdctl-build-test-string"]`, testutil.CommonImage)
testCase := &test.Case{
Require: nerdtest.Build,
Setup: func(data test.Data, helpers test.Helpers) {
data.Temp().Save(dockerfile, "Dockerfile")
data.Labels().Set("buildCtx", data.Temp().Path())
},
SubTests: []*test.Case{
{
Description: "Successfully build with 'tag first', 'buildctx second'",
Setup: func(data test.Data, helpers test.Helpers) {
helpers.Ensure("build", "-t", data.Identifier(), data.Labels().Get("buildCtx"))
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
return helpers.Command("run", "--rm", data.Identifier())
},
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Expected: test.Expects(expect.ExitCodeSuccess, nil, expect.Equals("nerdctl-build-test-string\n")),
},
{
Description: "Successfully build with 'buildctx first', 'tag second'",
Setup: func(data test.Data, helpers test.Helpers) {
helpers.Ensure("build", data.Labels().Get("buildCtx"), "-t", data.Identifier())
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
return helpers.Command("run", "--rm", data.Identifier())
},
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Expected: test.Expects(expect.ExitCodeSuccess, nil, expect.Equals("nerdctl-build-test-string\n")),
},
{
Description: "Successfully build with output docker, main tag still works",
Setup: func(data test.Data, helpers test.Helpers) {
helpers.Ensure(
"build",
data.Labels().Get("buildCtx"),
"-t",
data.Identifier(),
"--output=type=docker,name="+data.Identifier("ignored"),
)
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
return helpers.Command("run", "--rm", data.Identifier())
},
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Expected: test.Expects(expect.ExitCodeSuccess, nil, expect.Equals("nerdctl-build-test-string\n")),
},
{
Description: "Successfully build with output docker, name cannot be used",
Setup: func(data test.Data, helpers test.Helpers) {
helpers.Ensure(
"build",
data.Labels().Get("buildCtx"),
"-t",
data.Identifier(),
"--output=type=docker,name="+data.Identifier("ignored"),
)
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
return helpers.Command("run", "--rm", data.Identifier("ignored"))
},
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier("ignored"))
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Expected: test.Expects(expect.ExitCodeGenericFail, nil, nil),
},
},
}
testCase.Run(t)
}
func TestCanBuildOnOtherPlatform(t *testing.T) {
nerdtest.Setup()
requireEmulation := &test.Requirement{
Check: func(data test.Data, helpers test.Helpers) (bool, string) {
candidateArch := "arm64"
if runtime.GOARCH == "arm64" {
candidateArch = "amd64"
}
can, err := platformutil.CanExecProbably("linux/" + candidateArch)
assert.NilError(helpers.T(), err)
data.Labels().Set("OS", "linux")
data.Labels().Set("Architecture", candidateArch)
return can, "Current environment does not support emulation"
},
}
dockerfile := fmt.Sprintf(`FROM %s
RUN echo hello > /hello
CMD ["echo", "nerdctl-build-test-string"]`, testutil.CommonImage)
testCase := &test.Case{
Require: require.All(
nerdtest.Build,
requireEmulation,
),
Setup: func(data test.Data, helpers test.Helpers) {
data.Temp().Save(dockerfile, "Dockerfile")
data.Labels().Set("buildCtx", data.Temp().Path())
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
return helpers.Command(
"build",
data.Labels().Get("buildCtx"),
"--platform",
fmt.Sprintf("%s/%s", data.Labels().Get("OS"), data.Labels().Get("Architecture")),
"-t",
data.Identifier(),
)
},
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Expected: test.Expects(expect.ExitCodeSuccess, nil, nil),
}
testCase.Run(t)
}
// TestBuildBaseImage tests if an image can be built on the previously built image.
// This isn't currently supported by nerdctl with BuildKit OCI worker.
func TestBuildBaseImage(t *testing.T) {
nerdtest.Setup()
testCase := &test.Case{
Require: nerdtest.Build,
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier("first"))
helpers.Anyhow("rmi", "-f", data.Identifier("second"))
},
Setup: func(data test.Data, helpers test.Helpers) {
dockerfile := fmt.Sprintf(`FROM %s
RUN echo hello > /hello
CMD ["echo", "nerdctl-build-test-string"]`, testutil.CommonImage)
data.Temp().Save(dockerfile, "Dockerfile")
helpers.Ensure("build", "-t", data.Identifier("first"), data.Temp().Path())
dockerfileSecond := fmt.Sprintf(`FROM %s
RUN echo hello2 > /hello2
CMD ["cat", "/hello2"]`, data.Identifier("first"))
data.Temp().Save(dockerfileSecond, "Dockerfile")
helpers.Ensure("build", "-t", data.Identifier("second"), data.Temp().Path())
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
return helpers.Command("run", "--rm", data.Identifier("second"))
},
Expected: test.Expects(expect.ExitCodeSuccess, nil, expect.Equals("hello2\n")),
}
testCase.Run(t)
}
// TestBuildFromContainerd tests if an image can be built on an image pulled by nerdctl.
// This isn't currently supported by nerdctl with BuildKit OCI worker.
func TestBuildFromContainerd(t *testing.T) {
nerdtest.Setup()
testCase := &test.Case{
Require: require.All(
nerdtest.Build,
require.Not(nerdtest.Docker),
),
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier("first"))
helpers.Anyhow("rmi", "-f", data.Identifier("second"))
},
Setup: func(data test.Data, helpers test.Helpers) {
helpers.Ensure("pull", "--quiet", testutil.CommonImage)
helpers.Ensure("tag", testutil.CommonImage, data.Identifier("first"))
dockerfile := fmt.Sprintf(`FROM %s
RUN echo hello2 > /hello2
CMD ["cat", "/hello2"]`, data.Identifier("first"))
data.Temp().Save(dockerfile, "Dockerfile")
helpers.Ensure("build", "-t", data.Identifier("second"), data.Temp().Path())
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
return helpers.Command("run", "--rm", data.Identifier("second"))
},
Expected: test.Expects(expect.ExitCodeSuccess, nil, expect.Equals("hello2\n")),
}
testCase.Run(t)
}
func TestBuildFromStdin(t *testing.T) {
nerdtest.Setup()
dockerfile := fmt.Sprintf(`FROM %s
CMD ["echo", "nerdctl-build-test-stdin"]`, testutil.CommonImage)
testCase := &test.Case{
Require: nerdtest.Build,
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
cmd := helpers.Command("build", "-t", data.Identifier(), "-f", "-", ".")
cmd.Feed(strings.NewReader(dockerfile))
return cmd
},
Expected: func(data test.Data, helpers test.Helpers) *test.Expected {
return &test.Expected{
Errors: []error{errors.New(data.Identifier())},
}
},
}
testCase.Run(t)
}
func TestBuildWithDockerfile(t *testing.T) {
nerdtest.Setup()
dockerfile := fmt.Sprintf(`FROM %s
CMD ["echo", "nerdctl-build-test-dockerfile"]
`, testutil.CommonImage)
testCase := &test.Case{
Require: nerdtest.Build,
Setup: func(data test.Data, helpers test.Helpers) {
data.Temp().Save(dockerfile, "test", "Dockerfile")
data.Labels().Set("buildCtx", data.Temp().Path("test"))
},
SubTests: []*test.Case{
{
Description: "Dockerfile ..",
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
cmd := helpers.Command("build", "-t", data.Identifier(), "-f", "Dockerfile", "..")
cmd.WithCwd(data.Labels().Get("buildCtx"))
return cmd
},
Expected: test.Expects(expect.ExitCodeSuccess, nil, nil),
},
{
Description: "Dockerfile .",
Cleanup: func(data test.Data, helpers test.Helpers) {
helpers.Anyhow("rmi", "-f", data.Identifier())
},
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
cmd := helpers.Command("build", "-t", data.Identifier(), "-f", "Dockerfile", ".")
cmd.WithCwd(data.Labels().Get("buildCtx"))
return cmd
},
Expected: test.Expects(expect.ExitCodeSuccess, nil, nil),
},
{
Description: "../Dockerfile .",
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
cmd := helpers.Command("build", "-t", data.Identifier(), "-f", "../Dockerfile", ".")
cmd.WithCwd(data.Labels().Get("buildCtx"))
return cmd
},
Expected: test.Expects(1, nil, nil),
},
},
}
testCase.Run(t)
}
func TestBuildLocal(t *testing.T) {
nerdtest.Setup()
const testFileName = "nerdctl-build-test"
const testContent = "nerdctl"
dockerfile := fmt.Sprintf(`FROM scratch
COPY %s /`, testFileName)
testCase := &test.Case{
Require: nerdtest.Build,
Setup: func(data test.Data, helpers test.Helpers) {
data.Temp().Save(dockerfile, "Dockerfile")
data.Temp().Save(testContent, testFileName)
data.Labels().Set("buildCtx", data.Temp().Path())
},
SubTests: []*test.Case{
{
// GOTCHA: avoid comma and = in the test name, or buildctl will misparse the destination direction
Description: "-o type local destination DIR: verify the file copied from context is in the o
gitextract_yfhpsu0l/
├── .dockerignore
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yaml
│ │ ├── config.yml
│ │ └── feature_request.yaml
│ ├── dependabot.yml
│ └── workflows/
│ ├── ghcr-image-build-and-publish.yml
│ ├── job-build.yml
│ ├── job-lint-go.yml
│ ├── job-lint-other.yml
│ ├── job-lint-project.yml
│ ├── job-test-dependencies.yml
│ ├── job-test-in-container.yml
│ ├── job-test-in-host.yml
│ ├── job-test-in-lima.yml
│ ├── job-test-in-vagrant.yml
│ ├── job-test-unit.yml
│ ├── release.yml
│ ├── workflow-flaky.yml
│ ├── workflow-lint.yml
│ ├── workflow-test.yml
│ └── workflow-tigron.yml
├── .gitignore
├── .golangci.yml
├── .yamllint
├── BUILDING.md
├── Dockerfile
├── Dockerfile.d/
│ ├── SHA256SUMS.d/
│ │ ├── SHA256SUMS
│ │ ├── buildg-v0.5.3
│ │ ├── buildkit-v0.26.3
│ │ ├── cni-plugins-v1.9.0
│ │ ├── containerd-fuse-overlayfs-v2.1.7
│ │ ├── fuse-overlayfs-v1.16
│ │ ├── rootlesskit-v1.1.1
│ │ ├── rootlesskit-v2.3.6
│ │ ├── slirp4netns-v1.3.3
│ │ ├── stargz-snapshotter-v0.18.1
│ │ └── tini-v0.19.0
│ ├── etc_buildkit_buildkitd.toml
│ ├── etc_containerd_config.toml
│ ├── etc_systemd_system_user@.service.d_delegate.conf
│ ├── home_rootless_.config_systemd_user_containerd.service.d_port-slirp4netns.conf
│ ├── test-integration-buildkit-nerdctl-test.service
│ ├── test-integration-etc_containerd-stargz-grpc_config.toml
│ ├── test-integration-etc_containerd_config.toml
│ ├── test-integration-ipfs-offline.service
│ ├── test-integration-rootless.sh
│ └── test-integration-soci-snapshotter.service
├── EMERITUS.md
├── LICENSE
├── MAINTAINERS
├── MAINTAINERS_GUIDE.md
├── Makefile
├── NOTICE
├── README.md
├── SECURITY.md
├── Vagrantfile.freebsd
├── cmd/
│ └── nerdctl/
│ ├── apparmor/
│ │ ├── apparmor_inspect_linux.go
│ │ ├── apparmor_linux.go
│ │ ├── apparmor_linux_test.go
│ │ ├── apparmor_list_linux.go
│ │ ├── apparmor_load_linux.go
│ │ └── apparmor_unload_linux.go
│ ├── builder/
│ │ ├── builder.go
│ │ ├── builder_build.go
│ │ ├── builder_build_oci_layout_test.go
│ │ ├── builder_build_test.go
│ │ ├── builder_builder_test.go
│ │ └── builder_test.go
│ ├── checkpoint/
│ │ ├── checkpoint.go
│ │ ├── checkpoint_create.go
│ │ ├── checkpoint_create_linux_test.go
│ │ ├── checkpoint_list.go
│ │ ├── checkpoint_list_linux_test.go
│ │ ├── checkpoint_remove.go
│ │ ├── checkpoint_remove_linux_test.go
│ │ └── checkpoint_test.go
│ ├── completion/
│ │ ├── completion.go
│ │ ├── completion_linux.go
│ │ ├── completion_test.go
│ │ ├── completion_unix.go
│ │ ├── completion_unix_nolinux.go
│ │ └── completion_windows.go
│ ├── compose/
│ │ ├── compose.go
│ │ ├── compose_build.go
│ │ ├── compose_build_linux_test.go
│ │ ├── compose_config.go
│ │ ├── compose_config_test.go
│ │ ├── compose_cp.go
│ │ ├── compose_cp_linux_test.go
│ │ ├── compose_create.go
│ │ ├── compose_create_linux_test.go
│ │ ├── compose_down.go
│ │ ├── compose_down_linux_test.go
│ │ ├── compose_exec.go
│ │ ├── compose_exec_linux_test.go
│ │ ├── compose_images.go
│ │ ├── compose_images_linux_test.go
│ │ ├── compose_kill.go
│ │ ├── compose_kill_linux_test.go
│ │ ├── compose_logs.go
│ │ ├── compose_pause.go
│ │ ├── compose_pause_linux_test.go
│ │ ├── compose_port.go
│ │ ├── compose_port_linux_test.go
│ │ ├── compose_ps.go
│ │ ├── compose_ps_linux_test.go
│ │ ├── compose_pull.go
│ │ ├── compose_pull_linux_test.go
│ │ ├── compose_push.go
│ │ ├── compose_restart.go
│ │ ├── compose_restart_linux_test.go
│ │ ├── compose_rm.go
│ │ ├── compose_rm_linux_test.go
│ │ ├── compose_run.go
│ │ ├── compose_run_linux_test.go
│ │ ├── compose_start.go
│ │ ├── compose_start_linux_test.go
│ │ ├── compose_stop.go
│ │ ├── compose_stop_linux_test.go
│ │ ├── compose_test.go
│ │ ├── compose_top.go
│ │ ├── compose_top_linux_test.go
│ │ ├── compose_up.go
│ │ ├── compose_up_linux_test.go
│ │ ├── compose_up_test.go
│ │ ├── compose_version.go
│ │ └── compose_version_test.go
│ ├── container/
│ │ ├── container.go
│ │ ├── container_attach.go
│ │ ├── container_attach_linux_test.go
│ │ ├── container_commit.go
│ │ ├── container_commit_linux_test.go
│ │ ├── container_commit_test.go
│ │ ├── container_cp_acid_linux_test.go
│ │ ├── container_cp_linux.go
│ │ ├── container_cp_linux_test.go
│ │ ├── container_cp_nolinux.go
│ │ ├── container_create.go
│ │ ├── container_create_linux_test.go
│ │ ├── container_create_test.go
│ │ ├── container_diff.go
│ │ ├── container_diff_test.go
│ │ ├── container_exec.go
│ │ ├── container_exec_linux_test.go
│ │ ├── container_exec_test.go
│ │ ├── container_export.go
│ │ ├── container_export_test.go
│ │ ├── container_health_check.go
│ │ ├── container_health_check_linux_test.go
│ │ ├── container_inspect.go
│ │ ├── container_inspect_linux_test.go
│ │ ├── container_inspect_windows_test.go
│ │ ├── container_kill.go
│ │ ├── container_kill_linux_test.go
│ │ ├── container_list.go
│ │ ├── container_list_linux_test.go
│ │ ├── container_list_test.go
│ │ ├── container_list_windows_test.go
│ │ ├── container_logs.go
│ │ ├── container_logs_test.go
│ │ ├── container_pause.go
│ │ ├── container_port.go
│ │ ├── container_prune.go
│ │ ├── container_prune_linux_test.go
│ │ ├── container_remove.go
│ │ ├── container_remove_linux_test.go
│ │ ├── container_remove_test.go
│ │ ├── container_remove_windows_test.go
│ │ ├── container_rename.go
│ │ ├── container_rename_linux_test.go
│ │ ├── container_rename_windows_test.go
│ │ ├── container_restart.go
│ │ ├── container_restart_linux_test.go
│ │ ├── container_run.go
│ │ ├── container_run_cgroup_linux_test.go
│ │ ├── container_run_gpus_test.go
│ │ ├── container_run_linux.go
│ │ ├── container_run_linux_test.go
│ │ ├── container_run_log_driver_syslog_test.go
│ │ ├── container_run_mount_linux_test.go
│ │ ├── container_run_mount_windows_test.go
│ │ ├── container_run_network.go
│ │ ├── container_run_network_base_test.go
│ │ ├── container_run_network_linux_test.go
│ │ ├── container_run_network_windows_test.go
│ │ ├── container_run_nolinux.go
│ │ ├── container_run_restart_linux_test.go
│ │ ├── container_run_runtime_linux_test.go
│ │ ├── container_run_security_linux_test.go
│ │ ├── container_run_soci_linux_test.go
│ │ ├── container_run_stargz_linux_test.go
│ │ ├── container_run_systemd_linux_test.go
│ │ ├── container_run_test.go
│ │ ├── container_run_user_linux_test.go
│ │ ├── container_run_user_windows_test.go
│ │ ├── container_run_verify_linux_test.go
│ │ ├── container_run_windows_test.go
│ │ ├── container_start.go
│ │ ├── container_start_linux_test.go
│ │ ├── container_start_test.go
│ │ ├── container_stats.go
│ │ ├── container_stats_test.go
│ │ ├── container_stop.go
│ │ ├── container_stop_linux_test.go
│ │ ├── container_test.go
│ │ ├── container_top.go
│ │ ├── container_top_test.go
│ │ ├── container_unpause.go
│ │ ├── container_update.go
│ │ ├── container_update_linux_test.go
│ │ ├── container_wait.go
│ │ ├── container_wait_test.go
│ │ └── multi_platform_linux_test.go
│ ├── helpers/
│ │ ├── cobra.go
│ │ ├── consts.go
│ │ ├── flagutil.go
│ │ ├── prompt.go
│ │ ├── testing.go
│ │ └── testing_linux.go
│ ├── image/
│ │ ├── image.go
│ │ ├── image_convert.go
│ │ ├── image_convert_linux_test.go
│ │ ├── image_cryptutil.go
│ │ ├── image_decrypt.go
│ │ ├── image_encrypt.go
│ │ ├── image_encrypt_linux_test.go
│ │ ├── image_history.go
│ │ ├── image_history_test.go
│ │ ├── image_import.go
│ │ ├── image_import_linux_test.go
│ │ ├── image_inspect.go
│ │ ├── image_inspect_test.go
│ │ ├── image_list.go
│ │ ├── image_list_test.go
│ │ ├── image_load.go
│ │ ├── image_load_test.go
│ │ ├── image_prune.go
│ │ ├── image_prune_test.go
│ │ ├── image_pull.go
│ │ ├── image_pull_linux_test.go
│ │ ├── image_push.go
│ │ ├── image_push_linux_test.go
│ │ ├── image_remove.go
│ │ ├── image_remove_test.go
│ │ ├── image_save.go
│ │ ├── image_save_test.go
│ │ ├── image_tag.go
│ │ └── image_test.go
│ ├── inspect/
│ │ ├── inspect.go
│ │ └── inspect_test.go
│ ├── internal/
│ │ ├── internal.go
│ │ └── internal_oci_hook.go
│ ├── ipfs/
│ │ ├── ipfs.go
│ │ ├── ipfs_compose_linux_test.go
│ │ ├── ipfs_kubo_linux_test.go
│ │ ├── ipfs_registry.go
│ │ ├── ipfs_registry_linux_test.go
│ │ ├── ipfs_registry_serve.go
│ │ ├── ipfs_simple_linux_test.go
│ │ └── ipfs_test.go
│ ├── issues/
│ │ ├── issues_linux_test.go
│ │ └── main_linux_test.go
│ ├── login/
│ │ ├── login.go
│ │ ├── login_linux_test.go
│ │ ├── login_test.go
│ │ └── logout.go
│ ├── main.go
│ ├── main_linux.go
│ ├── main_nolinux.go
│ ├── main_test.go
│ ├── main_test_test.go
│ ├── manifest/
│ │ ├── manifest.go
│ │ ├── manifest_annotate.go
│ │ ├── manifest_annotate_linux_test.go
│ │ ├── manifest_create.go
│ │ ├── manifest_create_linux_test.go
│ │ ├── manifest_inspect.go
│ │ ├── manifest_inspect_linux_test.go
│ │ ├── manifest_push.go
│ │ ├── manifest_push_linux_test.go
│ │ ├── manifest_remove.go
│ │ ├── manifest_remove_linux_test.go
│ │ └── manifest_test.go
│ ├── namespace/
│ │ ├── namespace.go
│ │ ├── namespace_create.go
│ │ ├── namespace_inspect.go
│ │ ├── namespace_list.go
│ │ ├── namespace_remove.go
│ │ ├── namespace_test.go
│ │ └── namespace_update.go
│ ├── network/
│ │ ├── network.go
│ │ ├── network_create.go
│ │ ├── network_create_linux_test.go
│ │ ├── network_create_unix.go
│ │ ├── network_create_windows.go
│ │ ├── network_inspect.go
│ │ ├── network_inspect_test.go
│ │ ├── network_list.go
│ │ ├── network_list_linux_test.go
│ │ ├── network_prune.go
│ │ ├── network_prune_linux_test.go
│ │ ├── network_remove.go
│ │ ├── network_remove_linux_test.go
│ │ └── network_test.go
│ ├── search/
│ │ ├── search.go
│ │ ├── search_linux_test.go
│ │ └── search_test.go
│ ├── system/
│ │ ├── system.go
│ │ ├── system_events.go
│ │ ├── system_events_linux_test.go
│ │ ├── system_info.go
│ │ ├── system_info_test.go
│ │ ├── system_prune.go
│ │ ├── system_prune_linux_test.go
│ │ └── system_test.go
│ ├── version.go
│ └── volume/
│ ├── volume.go
│ ├── volume_create.go
│ ├── volume_create_test.go
│ ├── volume_inspect.go
│ ├── volume_inspect_test.go
│ ├── volume_list.go
│ ├── volume_list_test.go
│ ├── volume_namespace_test.go
│ ├── volume_prune.go
│ ├── volume_prune_linux_test.go
│ ├── volume_remove.go
│ ├── volume_remove_linux_test.go
│ └── volume_test.go
├── docs/
│ ├── build.md
│ ├── builder-debug.md
│ ├── cni.md
│ ├── command-reference.md
│ ├── compose.md
│ ├── config.md
│ ├── cosign.md
│ ├── cvmfs.md
│ ├── dev/
│ │ ├── auditing_dockerfile.md
│ │ └── store.md
│ ├── dir.md
│ ├── experimental.md
│ ├── faq.md
│ ├── freebsd.md
│ ├── gpu.md
│ ├── healthchecks.md
│ ├── ipfs.md
│ ├── multi-platform.md
│ ├── notation.md
│ ├── nydus.md
│ ├── ocicrypt.md
│ ├── overlaybd.md
│ ├── registry.md
│ ├── rootless.md
│ ├── soci.md
│ ├── stargz.md
│ └── testing/
│ ├── README.md
│ └── tools.md
├── examples/
│ ├── compose-multi-platform/
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── docker-compose.yaml
│ │ └── index.php
│ ├── compose-wordpress/
│ │ ├── README.md
│ │ ├── docker-compose.stargz.yaml
│ │ └── docker-compose.yaml
│ ├── nerdctl-as-a-library/
│ │ ├── README.md
│ │ └── run-container/
│ │ └── main.go
│ └── nerdctl-ipfs-registry-kubernetes/
│ ├── README.md
│ ├── ipfs/
│ │ ├── README.md
│ │ ├── bootstrap.yaml.sh
│ │ └── nerdctl-ipfs-registry.yaml
│ ├── ipfs-cluster/
│ │ ├── README.md
│ │ ├── bootstrap.yaml.sh
│ │ └── nerdctl-ipfs-registry.yaml
│ └── ipfs-stargz-snapshotter/
│ ├── README.md
│ ├── bootstrap.yaml.sh
│ └── nerdctl-ipfs-registry.yaml
├── extras/
│ └── rootless/
│ ├── containerd-rootless-setuptool.sh
│ └── containerd-rootless.sh
├── go.mod
├── go.sum
├── hack/
│ ├── build-integration-canary.sh
│ ├── generate-release-note.sh
│ ├── git-checkout-tag-with-hash.sh
│ ├── github/
│ │ ├── action-helpers.sh
│ │ └── gotestsum-reporter.sh
│ ├── provisioning/
│ │ ├── README.md
│ │ ├── gpg/
│ │ │ ├── docker
│ │ │ └── hashicorp
│ │ ├── kube/
│ │ │ ├── kind.sh
│ │ │ └── kind.yaml
│ │ ├── linux/
│ │ │ ├── cni.sh
│ │ │ └── containerd.sh
│ │ ├── version/
│ │ │ └── fetch.sh
│ │ └── windows/
│ │ ├── cni.sh
│ │ └── containerd.ps1
│ ├── scripts/
│ │ └── lib.sh
│ └── test-integration.sh
├── mod/
│ └── tigron/
│ ├── .golangci.yml
│ ├── .yamllint
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── expect/
│ │ ├── comparators.go
│ │ ├── comparators_test.go
│ │ ├── doc.go
│ │ ├── doc.md
│ │ └── exit.go
│ ├── go.mod
│ ├── go.sum
│ ├── hack/
│ │ ├── dev-setup-linux.sh
│ │ ├── dev-setup-macos.sh
│ │ └── headers/
│ │ ├── bash.txt
│ │ ├── dockerfile.txt
│ │ ├── go.txt
│ │ └── makefile.txt
│ ├── internal/
│ │ ├── assertive/
│ │ │ ├── assertive.go
│ │ │ ├── assertive_test.go
│ │ │ └── doc.go
│ │ ├── com/
│ │ │ ├── command.go
│ │ │ ├── command_other.go
│ │ │ ├── command_test.go
│ │ │ ├── command_windows.go
│ │ │ ├── doc.go
│ │ │ ├── package_benchmark_test.go
│ │ │ ├── package_example_test.go
│ │ │ ├── package_test.go
│ │ │ └── pipes.go
│ │ ├── doc.go
│ │ ├── exit.go
│ │ ├── formatter/
│ │ │ ├── doc.go
│ │ │ ├── formatter.go
│ │ │ └── osc8.go
│ │ ├── highk/
│ │ │ ├── doc.go
│ │ │ ├── fileleak.go
│ │ │ └── goroutines.go
│ │ ├── logger/
│ │ │ ├── doc.go
│ │ │ └── logger.go
│ │ ├── mimicry/
│ │ │ ├── doc.go
│ │ │ ├── doc.md
│ │ │ ├── mimicry.go
│ │ │ ├── print.go
│ │ │ └── stack.go
│ │ ├── mocks/
│ │ │ ├── doc.go
│ │ │ └── t.go
│ │ └── pty/
│ │ └── pty.go
│ ├── require/
│ │ ├── doc.go
│ │ ├── doc.md
│ │ ├── requirement.go
│ │ └── requirement_test.go
│ ├── test/
│ │ ├── case.go
│ │ ├── command.go
│ │ ├── config.go
│ │ ├── config_test.go
│ │ ├── consts.go
│ │ ├── data.go
│ │ ├── data_test.go
│ │ ├── doc.go
│ │ ├── expected.go
│ │ ├── funct.go
│ │ ├── helpers.go
│ │ ├── interfaces.go
│ │ ├── package_test.go
│ │ ├── test.go
│ │ └── types.go
│ ├── tig/
│ │ ├── doc.go
│ │ └── t.go
│ └── utils/
│ ├── doc.go
│ ├── testca/
│ │ └── ca.go
│ └── utilities.go
└── pkg/
├── annotations/
│ └── annotations.go
├── api/
│ └── types/
│ ├── apparmor_types.go
│ ├── builder_types.go
│ ├── checkpoint_types.go
│ ├── container_network_types.go
│ ├── container_types.go
│ ├── cri/
│ │ └── metadata_types.go
│ ├── global.go
│ ├── image_types.go
│ ├── import_types.go
│ ├── ipfs_types.go
│ ├── load_types.go
│ ├── login_types.go
│ ├── manifest_types.go
│ ├── namespace_types.go
│ ├── network_types.go
│ ├── search_types.go
│ ├── system_types.go
│ └── volume_types.go
├── apparmorutil/
│ ├── apparmorutil.go
│ └── apparmorutil_linux.go
├── buildkitutil/
│ ├── buildkitutil.go
│ ├── buildkitutil_linux.go
│ ├── buildkitutil_test.go
│ ├── buildkitutil_unix.go
│ ├── buildkitutil_unix_nolinux.go
│ ├── buildkitutil_windows.go
│ └── types.go
├── bypass4netnsutil/
│ ├── bypass.go
│ └── bypass4netnsutil.go
├── checkpointutil/
│ └── checkpointutil.go
├── cioutil/
│ ├── container_io.go
│ ├── container_io_unix.go
│ └── container_io_windows.go
├── clientutil/
│ └── client.go
├── cmd/
│ ├── apparmor/
│ │ ├── inspect_linux.go
│ │ ├── list_linux.go
│ │ ├── load_linux.go
│ │ └── unload_linux.go
│ ├── builder/
│ │ ├── build.go
│ │ ├── build_test.go
│ │ └── prune.go
│ ├── checkpoint/
│ │ ├── create.go
│ │ ├── list.go
│ │ └── remove.go
│ ├── compose/
│ │ └── compose.go
│ ├── container/
│ │ ├── attach.go
│ │ ├── commit.go
│ │ ├── cp_linux.go
│ │ ├── create.go
│ │ ├── create_userns_opts_darwin.go
│ │ ├── create_userns_opts_freebsd.go
│ │ ├── create_userns_opts_linux.go
│ │ ├── create_userns_opts_linux_test.go
│ │ ├── create_userns_opts_windows.go
│ │ ├── exec.go
│ │ ├── exec_linux.go
│ │ ├── exec_nolinux.go
│ │ ├── export.go
│ │ ├── health_check.go
│ │ ├── idmap.go
│ │ ├── inspect.go
│ │ ├── kill.go
│ │ ├── list.go
│ │ ├── list_util.go
│ │ ├── logs.go
│ │ ├── pause.go
│ │ ├── prune.go
│ │ ├── remove.go
│ │ ├── rename.go
│ │ ├── restart.go
│ │ ├── run_blkio_linux.go
│ │ ├── run_cdi.go
│ │ ├── run_cgroup_linux.go
│ │ ├── run_gpus.go
│ │ ├── run_linux.go
│ │ ├── run_mount.go
│ │ ├── run_restart.go
│ │ ├── run_runtime.go
│ │ ├── run_security_linux.go
│ │ ├── run_ulimit_linux.go
│ │ ├── run_unix_nolinux.go
│ │ ├── run_user.go
│ │ ├── run_windows.go
│ │ ├── start.go
│ │ ├── stats.go
│ │ ├── stats_linux.go
│ │ ├── stats_nolinux.go
│ │ ├── stop.go
│ │ ├── top.go
│ │ ├── top_unix.go
│ │ ├── top_windows.go
│ │ ├── unpause.go
│ │ └── wait.go
│ ├── image/
│ │ ├── convert.go
│ │ ├── crypt.go
│ │ ├── ensure.go
│ │ ├── import.go
│ │ ├── inspect.go
│ │ ├── list.go
│ │ ├── prune.go
│ │ ├── pull.go
│ │ ├── push.go
│ │ ├── remove.go
│ │ ├── save.go
│ │ └── tag.go
│ ├── ipfs/
│ │ └── registry_serve.go
│ ├── login/
│ │ ├── login.go
│ │ ├── prompt.go
│ │ ├── prompt_unix.go
│ │ └── prompt_windows.go
│ ├── logout/
│ │ └── logout.go
│ ├── manifest/
│ │ ├── annotate.go
│ │ ├── create.go
│ │ ├── inspect.go
│ │ ├── push.go
│ │ └── rm.go
│ ├── namespace/
│ │ ├── common.go
│ │ ├── create.go
│ │ ├── inspect.go
│ │ ├── list.go
│ │ ├── namespace_linux.go
│ │ ├── namespace_nolinux.go
│ │ ├── remove.go
│ │ └── update.go
│ ├── network/
│ │ ├── create.go
│ │ ├── inspect.go
│ │ ├── list.go
│ │ ├── prune.go
│ │ └── remove.go
│ ├── search/
│ │ └── search.go
│ ├── system/
│ │ ├── events.go
│ │ ├── info.go
│ │ └── prune.go
│ └── volume/
│ ├── create.go
│ ├── inspect.go
│ ├── list.go
│ ├── prune.go
│ ├── rm.go
│ └── volume.go
├── composer/
│ ├── build.go
│ ├── composer.go
│ ├── config.go
│ ├── container.go
│ ├── copy.go
│ ├── create.go
│ ├── down.go
│ ├── exec.go
│ ├── kill.go
│ ├── lock.go
│ ├── logs.go
│ ├── orphans.go
│ ├── pause.go
│ ├── pipetagger/
│ │ └── pipetagger.go
│ ├── port.go
│ ├── pull.go
│ ├── push.go
│ ├── restart.go
│ ├── rm.go
│ ├── run.go
│ ├── serviceparser/
│ │ ├── build.go
│ │ ├── build_test.go
│ │ ├── serviceparser.go
│ │ └── serviceparser_test.go
│ ├── stop.go
│ ├── up.go
│ ├── up_network.go
│ ├── up_service.go
│ └── up_volume.go
├── config/
│ └── config.go
├── consoleutil/
│ ├── consoleutil.go
│ ├── consoleutil_unix.go
│ ├── consoleutil_windows.go
│ └── detach.go
├── containerdutil/
│ ├── content.go
│ ├── helpers.go
│ ├── image_store.go
│ ├── snapshotter.go
│ └── version.go
├── containerinspector/
│ ├── containerinspector.go
│ ├── containerinspector_linux.go
│ ├── containerinspector_unix_nolinux.go
│ └── containerinspector_windows.go
├── containerutil/
│ ├── config.go
│ ├── container_network_manager.go
│ ├── container_network_manager_linux.go
│ ├── container_network_manager_other.go
│ ├── container_network_manager_test.go
│ ├── container_network_manager_windows.go
│ ├── containerutil.go
│ ├── containerutil_test.go
│ ├── cp_linux.go
│ ├── cp_resolve_linux.go
│ └── lock.go
├── defaults/
│ ├── cgroup_linux.go
│ ├── defaults_darwin.go
│ ├── defaults_freebsd.go
│ ├── defaults_linux.go
│ └── defaults_windows.go
├── dnsutil/
│ ├── dnsutil.go
│ ├── dnsutil_test.go
│ └── hostsstore/
│ ├── hosts.go
│ ├── hosts_test.go
│ ├── hostsstore.go
│ ├── updater.go
│ └── updater_test.go
├── doc.go
├── errutil/
│ ├── errors_check.go
│ └── exit_coder.go
├── eventutil/
│ └── eventutil.go
├── flagutil/
│ ├── flagutil.go
│ └── flagutil_test.go
├── formatter/
│ ├── common.go
│ ├── formatter.go
│ └── formatter_test.go
├── fs/
│ └── fs.go
├── healthcheck/
│ ├── executor.go
│ ├── health.go
│ ├── healthcheck_manager_darwin.go
│ ├── healthcheck_manager_freebsd.go
│ ├── healthcheck_manager_linux.go
│ ├── healthcheck_manager_windows.go
│ └── log.go
├── identifiers/
│ └── validate.go
├── idgen/
│ └── idgen.go
├── idutil/
│ ├── containerwalker/
│ │ └── containerwalker.go
│ └── imagewalker/
│ └── imagewalker.go
├── imageinspector/
│ └── imageinspector.go
├── imgutil/
│ ├── commit/
│ │ ├── commit.go
│ │ ├── commit_other.go
│ │ └── commit_unix.go
│ ├── converter/
│ │ ├── convert.go
│ │ ├── info.go
│ │ └── zstd.go
│ ├── dockerconfigresolver/
│ │ ├── credentialsstore.go
│ │ ├── credentialsstore_test.go
│ │ ├── defaults.go
│ │ ├── dockerconfigresolver.go
│ │ ├── hostsstore.go
│ │ ├── registryurl.go
│ │ └── registryurl_test.go
│ ├── fetch/
│ │ └── fetch.go
│ ├── filtering.go
│ ├── filtering_test.go
│ ├── imgutil.go
│ ├── imgutil_test.go
│ ├── jobs/
│ │ └── jobs.go
│ ├── load/
│ │ └── load.go
│ ├── pull/
│ │ └── pull.go
│ ├── push/
│ │ └── push.go
│ ├── snapshotter.go
│ ├── snapshotter_test.go
│ └── transfer.go
├── infoutil/
│ ├── infoutil.go
│ ├── infoutil_darwin.go
│ ├── infoutil_freebsd.go
│ ├── infoutil_linux.go
│ ├── infoutil_test.go
│ ├── infoutil_unix.go
│ ├── infoutil_unix_test.go
│ ├── infoutil_windows.go
│ ├── infoutil_windows_test.go
│ └── infoutilmock/
│ └── infoutil_mock.go
├── inspecttypes/
│ ├── dockercompat/
│ │ ├── blkio.go
│ │ ├── blkioutils_linux.go
│ │ ├── blkioutils_others.go
│ │ ├── dockercompat.go
│ │ ├── dockercompat_test.go
│ │ └── info.go
│ └── native/
│ ├── container.go
│ ├── image.go
│ ├── info.go
│ ├── namespace.go
│ ├── network.go
│ └── volume.go
├── internal/
│ └── filesystem/
│ ├── consts.go
│ ├── errors.go
│ ├── helpers.go
│ ├── lock.go
│ ├── lock_test.go
│ ├── lock_unix.go
│ ├── lock_windows.go
│ ├── os.go
│ ├── path.go
│ ├── path_test.go
│ ├── path_unix.go
│ ├── path_windows.go
│ ├── umask.go
│ ├── umask_test.go
│ ├── umask_unix.go
│ ├── umask_windows.go
│ ├── writefile_rename.go
│ ├── writefile_rollback.go
│ └── writefile_rollback_test.go
├── ipcutil/
│ ├── ipcutil.go
│ ├── ipcutil_linux.go
│ ├── ipcutil_other.go
│ └── ipcutil_windows.go
├── ipfs/
│ ├── image_ipfs.go
│ ├── image_noipfs.go
│ ├── noipfs.go
│ ├── registry.go
│ ├── registry_ipfs.go
│ └── registry_noipfs.go
├── labels/
│ ├── k8slabels/
│ │ └── k8slabels.go
│ └── labels.go
├── logging/
│ ├── cri_logger.go
│ ├── cri_logger_test.go
│ ├── detail_writer.go
│ ├── fluentd_logger.go
│ ├── fluentd_logger_test.go
│ ├── journald_logger.go
│ ├── json_logger.go
│ ├── json_logger_test.go
│ ├── jsonfile/
│ │ └── jsonfile.go
│ ├── log_viewer.go
│ ├── logging.go
│ ├── logging_test.go
│ ├── logs_other.go
│ ├── logs_windows.go
│ ├── none_logger.go
│ ├── none_logger_test.go
│ ├── syslog_logger.go
│ └── tail/
│ ├── tail.go
│ └── tail_test.go
├── manifeststore/
│ └── manifeststore.go
├── manifesttypes/
│ └── manifesttypes.go
├── manifestutil/
│ └── manifestutils.go
├── maputil/
│ ├── maputil.go
│ └── maputil_test.go
├── mountutil/
│ ├── mountutil.go
│ ├── mountutil_darwin.go
│ ├── mountutil_freebsd.go
│ ├── mountutil_linux.go
│ ├── mountutil_linux_test.go
│ ├── mountutil_test.go
│ ├── mountutil_unix.go
│ ├── mountutil_windows.go
│ ├── mountutil_windows_test.go
│ └── volumestore/
│ └── volumestore.go
├── namestore/
│ ├── namestore.go
│ └── namestore_test.go
├── netutil/
│ ├── cni_plugin.go
│ ├── cni_plugin_unix.go
│ ├── cni_plugin_windows.go
│ ├── nettype/
│ │ ├── nettype.go
│ │ └── nettype_test.go
│ ├── netutil.go
│ ├── netutil_linux_test.go
│ ├── netutil_test.go
│ ├── netutil_unix.go
│ ├── netutil_unix_test.go
│ ├── netutil_windows.go
│ ├── netutil_windows_test.go
│ ├── networkstore/
│ │ └── networkstore.go
│ ├── store.go
│ └── subnet/
│ ├── subnet.go
│ └── subnet_test.go
├── ocihook/
│ ├── ocihook.go
│ ├── ocihook_linux.go
│ ├── ocihook_nolinux.go
│ ├── rootless_linux.go
│ ├── rootless_other.go
│ └── state/
│ └── state.go
├── platformutil/
│ ├── binfmt.go
│ ├── layers.go
│ └── platformutil.go
├── portutil/
│ ├── iptable/
│ │ ├── iptables.go
│ │ ├── iptables_linux.go
│ │ └── iptables_test.go
│ ├── port_allocate_linux.go
│ ├── port_allocate_other.go
│ ├── portutil.go
│ ├── portutil_test.go
│ └── procnet/
│ ├── procnet.go
│ ├── procnet_linux.go
│ └── procnetd_test.go
├── referenceutil/
│ ├── cid_ipfs.go
│ ├── cid_noipfs.go
│ ├── referenceutil.go
│ └── referenceutil_test.go
├── reflectutil/
│ ├── reflectutil.go
│ └── reflectutil_test.go
├── resolvconf/
│ ├── resolvconf.go
│ └── resolvconf_linux_test.go
├── rootlessutil/
│ ├── child_linux.go
│ ├── parent_linux.go
│ ├── port_linux.go
│ ├── rootlessutil_linux.go
│ ├── rootlessutil_other.go
│ └── xdg_linux.go
├── signalutil/
│ ├── signals.go
│ ├── signals_linux.go
│ └── signals_other.go
├── signutil/
│ ├── cosignutil.go
│ ├── notationutil.go
│ └── signutil.go
├── snapshotterutil/
│ ├── socisource.go
│ └── sociutil.go
├── statsutil/
│ ├── stats.go
│ └── stats_linux.go
├── store/
│ ├── filestore.go
│ ├── filestore_test.go
│ └── store.go
├── strutil/
│ ├── strutil.go
│ └── strutil_test.go
├── systemutil/
│ ├── socket_unix.go
│ └── socket_windows.go
├── tabutil/
│ ├── tabutil.go
│ └── tabutil_test.go
├── tarutil/
│ └── tarutil.go
├── taskutil/
│ └── taskutil.go
├── testutil/
│ ├── compose.go
│ ├── images.yaml
│ ├── images_linux.go
│ ├── iptables/
│ │ └── iptables_linux.go
│ ├── nerdtest/
│ │ ├── ambient.go
│ │ ├── command.go
│ │ ├── hoststoml/
│ │ │ └── hoststoml.go
│ │ ├── platform/
│ │ │ ├── platform_darwin.go
│ │ │ ├── platform_freebsd.go
│ │ │ ├── platform_linux.go
│ │ │ └── platform_windows.go
│ │ ├── registry/
│ │ │ ├── cesanta.go
│ │ │ ├── common.go
│ │ │ ├── docker.go
│ │ │ └── kubo.go
│ │ ├── requirements.go
│ │ ├── requirements_other.go
│ │ ├── requirements_windows.go
│ │ ├── test.go
│ │ ├── third-party.go
│ │ ├── utilities.go
│ │ └── utilities_linux.go
│ ├── nettestutil/
│ │ └── nettestutil.go
│ ├── portlock/
│ │ └── portlock.go
│ ├── testca/
│ │ └── testca.go
│ ├── testregistry/
│ │ ├── certsd_linux.go
│ │ └── testregistry_linux.go
│ ├── testsyslog/
│ │ └── testsyslog.go
│ ├── testutil.go
│ ├── testutil_darwin.go
│ ├── testutil_freebsd.go
│ ├── testutil_linux.go
│ └── testutil_windows.go
├── transferutil/
│ └── progress.go
└── version/
└── version.go
Showing preview only (357K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3639 symbols across 757 files)
FILE: cmd/nerdctl/apparmor/apparmor_inspect_linux.go
function inspectCommand (line 29) | func inspectCommand() *cobra.Command {
function inspectAction (line 41) | func inspectAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/apparmor/apparmor_linux.go
function Command (line 25) | func Command() *cobra.Command {
FILE: cmd/nerdctl/apparmor/apparmor_linux_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/apparmor/apparmor_list_linux.go
function listCommand (line 26) | func listCommand() *cobra.Command {
function listOptions (line 45) | func listOptions(cmd *cobra.Command) (types.ApparmorListOptions, error) {
function listAction (line 61) | func listAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/apparmor/apparmor_load_linux.go
function loadCommand (line 28) | func loadCommand() *cobra.Command {
function loadAction (line 40) | func loadAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/apparmor/apparmor_unload_linux.go
function unloadCommand (line 29) | func unloadCommand() *cobra.Command {
function unloadAction (line 42) | func unloadAction(cmd *cobra.Command, args []string) error {
function unloadShellComplete (line 50) | func unloadShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/builder/builder.go
function Command (line 34) | func Command() *cobra.Command {
function pruneCommand (line 51) | func pruneCommand() *cobra.Command {
function pruneAction (line 68) | func pruneAction(cmd *cobra.Command, _ []string) error {
function pruneOptions (line 104) | func pruneOptions(cmd *cobra.Command) (types.BuilderPruneOptions, error) {
function debugCommand (line 134) | func debugCommand() *cobra.Command {
function debugAction (line 154) | func debugAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/builder/builder_build.go
function BuildCommand (line 38) | func BuildCommand() *cobra.Command {
function processBuildCommandFlag (line 89) | func processBuildCommandFlag(cmd *cobra.Command, args []string) (types.B...
function GetBuildkitHost (line 258) | func GetBuildkitHost(cmd *cobra.Command, namespace string) (string, erro...
function buildAction (line 274) | func buildAction(cmd *cobra.Command, args []string) error {
function canonicalizeAttest (line 290) | func canonicalizeAttest(attestType string, in string) string {
FILE: cmd/nerdctl/builder/builder_build_oci_layout_test.go
function TestBuildContextWithOCILayout (line 36) | func TestBuildContextWithOCILayout(t *testing.T) {
FILE: cmd/nerdctl/builder/builder_build_test.go
function TestBuildBasics (line 42) | func TestBuildBasics(t *testing.T) {
function TestCanBuildOnOtherPlatform (line 126) | func TestCanBuildOnOtherPlatform(t *testing.T) {
function TestBuildBaseImage (line 178) | func TestBuildBaseImage(t *testing.T) {
function TestBuildFromContainerd (line 211) | func TestBuildFromContainerd(t *testing.T) {
function TestBuildFromStdin (line 242) | func TestBuildFromStdin(t *testing.T) {
function TestBuildWithDockerfile (line 268) | func TestBuildWithDockerfile(t *testing.T) {
function TestBuildLocal (line 321) | func TestBuildLocal(t *testing.T) {
function TestBuildWithBuildArg (line 372) | func TestBuildWithBuildArg(t *testing.T) {
function TestBuildWithIIDFile (line 481) | func TestBuildWithIIDFile(t *testing.T) {
function TestBuildWithLabels (line 507) | func TestBuildWithLabels(t *testing.T) {
function TestBuildMultipleTags (line 533) | func TestBuildMultipleTags(t *testing.T) {
function TestBuildWithContainerfile (line 591) | func TestBuildWithContainerfile(t *testing.T) {
function TestBuildWithDockerFileAndContainerfile (line 619) | func TestBuildWithDockerFileAndContainerfile(t *testing.T) {
function TestBuildNoTag (line 649) | func TestBuildNoTag(t *testing.T) {
function TestBuildContextDockerImageAlias (line 676) | func TestBuildContextDockerImageAlias(t *testing.T) {
function TestBuildContextWithCopyFromDir (line 705) | func TestBuildContextWithCopyFromDir(t *testing.T) {
function TestBuildSourceDateEpoch (line 743) | func TestBuildSourceDateEpoch(t *testing.T) {
function TestBuildNetwork (line 800) | func TestBuildNetwork(t *testing.T) {
function TestBuildAttestation (line 854) | func TestBuildAttestation(t *testing.T) {
function TestBuildAddHost (line 996) | func TestBuildAddHost(t *testing.T) {
function TestBuildWithBuildkitConfig (line 1028) | func TestBuildWithBuildkitConfig(t *testing.T) {
FILE: cmd/nerdctl/builder/builder_builder_test.go
function TestBuilder (line 38) | func TestBuilder(t *testing.T) {
FILE: cmd/nerdctl/builder/builder_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/checkpoint/checkpoint.go
function Command (line 25) | func Command() *cobra.Command {
function lsCommand (line 44) | func lsCommand() *cobra.Command {
function rmCommand (line 50) | func rmCommand() *cobra.Command {
FILE: cmd/nerdctl/checkpoint/checkpoint_create.go
function createCommand (line 31) | func createCommand() *cobra.Command {
function processCreateFlags (line 46) | func processCreateFlags(cmd *cobra.Command) (types.CheckpointCreateOptio...
function createAction (line 72) | func createAction(cmd *cobra.Command, args []string) error {
function createShellComplete (line 91) | func createShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/checkpoint/checkpoint_create_linux_test.go
function TestCheckpointCreateErrors (line 31) | func TestCheckpointCreateErrors(t *testing.T) {
function TestCheckpointCreate (line 74) | func TestCheckpointCreate(t *testing.T) {
FILE: cmd/nerdctl/checkpoint/checkpoint_list.go
function listCommand (line 32) | func listCommand() *cobra.Command {
function processListFlags (line 46) | func processListFlags(cmd *cobra.Command) (types.CheckpointListOptions, ...
function listAction (line 67) | func listAction(cmd *cobra.Command, args []string) error {
function listShellComplete (line 93) | func listShellComplete(cmd *cobra.Command, args []string, toComplete str...
FILE: cmd/nerdctl/checkpoint/checkpoint_list_linux_test.go
function TestCheckpointListErrors (line 33) | func TestCheckpointListErrors(t *testing.T) {
function TestCheckpointList (line 73) | func TestCheckpointList(t *testing.T) {
FILE: cmd/nerdctl/checkpoint/checkpoint_remove.go
function removeCommand (line 31) | func removeCommand() *cobra.Command {
function processRemoveFlags (line 45) | func processRemoveFlags(cmd *cobra.Command) (types.CheckpointRemoveOptio...
function removeAction (line 66) | func removeAction(cmd *cobra.Command, args []string) error {
function removeShellComplete (line 85) | func removeShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/checkpoint/checkpoint_remove_linux_test.go
function TestCheckpointRemoveErrors (line 31) | func TestCheckpointRemoveErrors(t *testing.T) {
function TestCheckpointRemove (line 74) | func TestCheckpointRemove(t *testing.T) {
FILE: cmd/nerdctl/checkpoint/checkpoint_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/completion/completion.go
function ImageNames (line 36) | func ImageNames(cmd *cobra.Command) ([]string, cobra.ShellCompDirective) {
function ContainerNames (line 59) | func ContainerNames(cmd *cobra.Command, filterFunc func(containerd.Proce...
function NetworkNames (line 108) | func NetworkNames(cmd *cobra.Command, exclude []string) ([]string, cobra...
function VolumeNames (line 144) | func VolumeNames(cmd *cobra.Command) ([]string, cobra.ShellCompDirective) {
function Platforms (line 160) | func Platforms(cmd *cobra.Command, args []string, toComplete string) ([]...
function getVolumes (line 175) | func getVolumes(cmd *cobra.Command, globalOptions types.GlobalCommandOpt...
FILE: cmd/nerdctl/completion/completion_linux.go
function ApparmorProfiles (line 27) | func ApparmorProfiles(cmd *cobra.Command) ([]string, cobra.ShellCompDire...
function CgroupManagerNames (line 39) | func CgroupManagerNames(cmd *cobra.Command, args []string, toComplete st...
FILE: cmd/nerdctl/completion/completion_test.go
function TestMain (line 31) | func TestMain(m *testing.M) {
function TestCompletion (line 35) | func TestCompletion(t *testing.T) {
FILE: cmd/nerdctl/completion/completion_unix.go
function NetworkDrivers (line 32) | func NetworkDrivers(cmd *cobra.Command, args []string, toComplete string...
function IPAMDrivers (line 37) | func IPAMDrivers(cmd *cobra.Command, args []string, toComplete string) (...
function NetworkOptions (line 41) | func NetworkOptions(cmd *cobra.Command, args []string, toComplete string...
function NamespaceNames (line 84) | func NamespaceNames(cmd *cobra.Command, args []string, toComplete string...
function SnapshotterNames (line 110) | func SnapshotterNames(cmd *cobra.Command, args []string, toComplete stri...
FILE: cmd/nerdctl/completion/completion_unix_nolinux.go
function CgroupManagerNames (line 23) | func CgroupManagerNames(cmd *cobra.Command, args []string, toComplete st...
FILE: cmd/nerdctl/completion/completion_windows.go
function NamespaceNames (line 21) | func NamespaceNames(cmd *cobra.Command, args []string, toComplete string...
function SnapshotterNames (line 25) | func SnapshotterNames(cmd *cobra.Command, args []string, toComplete stri...
function CgroupManagerNames (line 29) | func CgroupManagerNames(cmd *cobra.Command, args []string, toComplete st...
function NetworkDrivers (line 33) | func NetworkDrivers(cmd *cobra.Command, args []string, toComplete string...
function IPAMDrivers (line 38) | func IPAMDrivers(cmd *cobra.Command, args []string, toComplete string) (...
function NetworkOptions (line 42) | func NetworkOptions(cmd *cobra.Command, args []string, toComplete string...
FILE: cmd/nerdctl/compose/compose.go
function Command (line 26) | func Command() *cobra.Command {
function getComposeOptions (line 72) | func getComposeOptions(cmd *cobra.Command, debugFull, experimental bool)...
FILE: cmd/nerdctl/compose/compose_build.go
function buildCommand (line 28) | func buildCommand() *cobra.Command {
function buildAction (line 43) | func buildAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_build_linux_test.go
function TestComposeBuild (line 31) | func TestComposeBuild(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_config.go
function configCommand (line 30) | func configCommand() *cobra.Command {
function configAction (line 48) | func configAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_config_test.go
function TestComposeConfig (line 33) | func TestComposeConfig(t *testing.T) {
function TestComposeConfigWithPrintServiceHash (line 80) | func TestComposeConfigWithPrintServiceHash(t *testing.T) {
function TestComposeConfigWithMultipleFile (line 126) | func TestComposeConfigWithMultipleFile(t *testing.T) {
function TestComposeConfigWithComposeFileEnv (line 199) | func TestComposeConfigWithComposeFileEnv(t *testing.T) {
function TestComposeConfigWithEnvFile (line 264) | func TestComposeConfigWithEnvFile(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_cp.go
function copyCommand (line 31) | func copyCommand() *cobra.Command {
function copyAction (line 48) | func copyAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_cp_linux_test.go
function TestComposeCopy (line 33) | func TestComposeCopy(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_create.go
function createCommand (line 30) | func createCommand() *cobra.Command {
function createAction (line 46) | func createAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_create_linux_test.go
function TestComposeCreate (line 39) | func TestComposeCreate(t *testing.T) {
function TestComposeCreateDependency (line 92) | func TestComposeCreateDependency(t *testing.T) {
function TestComposeCreatePull (line 153) | func TestComposeCreatePull(t *testing.T) {
function TestComposeCreatePullInvalidOption (line 221) | func TestComposeCreatePullInvalidOption(t *testing.T) {
function TestComposeCreateBuild (line 251) | func TestComposeCreateBuild(t *testing.T) {
function TestComposeCreateWritesConfigHashLabel (line 321) | func TestComposeCreateWritesConfigHashLabel(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_down.go
function downCommand (line 28) | func downCommand() *cobra.Command {
function downAction (line 42) | func downAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_down_linux_test.go
function TestComposeDownRemoveUsedNetwork (line 31) | func TestComposeDownRemoveUsedNetwork(t *testing.T) {
function TestComposeDownRemoveOrphans (line 89) | func TestComposeDownRemoveOrphans(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_exec.go
function execCommand (line 32) | func execCommand() *cobra.Command {
function execAction (line 64) | func execAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_exec_linux_test.go
function TestComposeExec (line 35) | func TestComposeExec(t *testing.T) {
function TestComposeExecTTY (line 177) | func TestComposeExecTTY(t *testing.T) {
function TestComposeExecWithIndex (line 264) | func TestComposeExecWithIndex(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_images.go
function imagesCommand (line 41) | func imagesCommand() *cobra.Command {
function imagesAction (line 54) | func imagesAction(cmd *cobra.Command, args []string) error {
function printComposeImageIDs (line 106) | func printComposeImageIDs(ctx context.Context, containers []containerd.C...
function printComposeImages (line 127) | func printComposeImages(ctx context.Context, cmd *cobra.Command, contain...
FILE: cmd/nerdctl/compose/compose_images_linux_test.go
function TestComposeImages (line 34) | func TestComposeImages(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_kill.go
function killCommand (line 28) | func killCommand() *cobra.Command {
function killAction (line 40) | func killAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_kill_linux_test.go
function TestComposeKill (line 33) | func TestComposeKill(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_logs.go
function logsCommand (line 28) | func logsCommand() *cobra.Command {
function logsAction (line 44) | func logsAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_pause.go
function pauseCommand (line 27) | func pauseCommand() *cobra.Command {
function pauseAction (line 39) | func pauseAction(cmd *cobra.Command, args []string) error {
function unpauseCommand (line 62) | func unpauseCommand() *cobra.Command {
function unpauseAction (line 74) | func unpauseAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_pause_linux_test.go
function TestComposePauseAndUnpause (line 34) | func TestComposePauseAndUnpause(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_port.go
function portCommand (line 31) | func portCommand() *cobra.Command {
function portAction (line 46) | func portAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_port_linux_test.go
function TestComposePort (line 33) | func TestComposePort(t *testing.T) {
function TestComposePortFailure (line 104) | func TestComposePortFailure(t *testing.T) {
function TestComposeMultiplePorts (line 174) | func TestComposeMultiplePorts(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_ps.go
function psCommand (line 43) | func psCommand() *cobra.Command {
type composeContainerPrintable (line 60) | type composeContainerPrintable struct
function psAction (line 76) | func psAction(cmd *cobra.Command, args []string) error {
function composeContainerPrintableTab (line 237) | func composeContainerPrintableTab(ctx context.Context, container contain...
function composeContainerPrintableJSON (line 279) | func composeContainerPrintableJSON(ctx context.Context, container contai...
type PortPublisher (line 339) | type PortPublisher struct
function formatPublishers (line 348) | func formatPublishers(portMappings []cni.PortMapping) []PortPublisher {
function statusForFilter (line 366) | func statusForFilter(ctx context.Context, c containerd.Container) string {
FILE: cmd/nerdctl/compose/compose_ps_linux_test.go
function TestComposePs (line 32) | func TestComposePs(t *testing.T) {
function TestComposePsJSON (line 105) | func TestComposePsJSON(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_pull.go
function pullCommand (line 28) | func pullCommand() *cobra.Command {
function pullAction (line 40) | func pullAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_pull_linux_test.go
function TestComposePullWithService (line 26) | func TestComposePullWithService(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_push.go
function pushCommand (line 28) | func pushCommand() *cobra.Command {
function pushAction (line 39) | func pushAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_restart.go
function restartCommand (line 28) | func restartCommand() *cobra.Command {
function restartAction (line 40) | func restartAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_restart_linux_test.go
function TestComposeRestart (line 26) | func TestComposeRestart(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_rm.go
function removeCommand (line 31) | func removeCommand() *cobra.Command {
function removeAction (line 45) | func removeAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_rm_linux_test.go
function TestComposeRemove (line 32) | func TestComposeRemove(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_run.go
function runCommand (line 31) | func runCommand() *cobra.Command {
function runAction (line 72) | func runAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_run_linux_test.go
function TestComposeRun (line 39) | func TestComposeRun(t *testing.T) {
function TestComposeRunWithServicePorts (line 115) | func TestComposeRunWithServicePorts(t *testing.T) {
function TestComposeRunWithPublish (line 176) | func TestComposeRunWithPublish(t *testing.T) {
function TestComposeRunWithEnv (line 235) | func TestComposeRunWithEnv(t *testing.T) {
function TestComposeRunWithUser (line 266) | func TestComposeRunWithUser(t *testing.T) {
function TestComposeRunWithLabel (line 296) | func TestComposeRunWithLabel(t *testing.T) {
function TestComposeRunWithArgs (line 333) | func TestComposeRunWithArgs(t *testing.T) {
function TestComposeRunWithEntrypoint (line 360) | func TestComposeRunWithEntrypoint(t *testing.T) {
function TestComposeRunWithVolume (line 389) | func TestComposeRunWithVolume(t *testing.T) {
function TestComposePushAndPullWithCosignVerify (line 427) | func TestComposePushAndPullWithCosignVerify(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_start.go
function startCommand (line 39) | func startCommand() *cobra.Command {
function startAction (line 51) | func startAction(cmd *cobra.Command, args []string) error {
function startContainers (line 101) | func startContainers(ctx context.Context, client *containerd.Client, con...
FILE: cmd/nerdctl/compose/compose_start_linux_test.go
function TestComposeStart (line 32) | func TestComposeStart(t *testing.T) {
function TestComposeStartFailWhenServicePause (line 78) | func TestComposeStartFailWhenServicePause(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_stop.go
function stopCommand (line 28) | func stopCommand() *cobra.Command {
function stopAction (line 40) | func stopAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_stop_linux_test.go
function TestComposeStop (line 31) | func TestComposeStop(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/compose/compose_top.go
function topCommand (line 35) | func topCommand() *cobra.Command {
function topAction (line 47) | func topAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_top_linux_test.go
function TestComposeTop (line 31) | func TestComposeTop(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_up.go
function upCommand (line 33) | func upCommand() *cobra.Command {
function upAction (line 57) | func upAction(cmd *cobra.Command, services []string) error {
FILE: cmd/nerdctl/compose/compose_up_linux_test.go
function TestComposeUp (line 43) | func TestComposeUp(t *testing.T) {
function TestComposeUpBuild (line 134) | func TestComposeUpBuild(t *testing.T) {
function TestComposeUpNetWithStaticIP (line 206) | func TestComposeUpNetWithStaticIP(t *testing.T) {
function TestComposeUpMultiNet (line 272) | func TestComposeUpMultiNet(t *testing.T) {
function TestComposeUpOsEnvVar (line 374) | func TestComposeUpOsEnvVar(t *testing.T) {
function TestComposeUpDotEnvFile (line 441) | func TestComposeUpDotEnvFile(t *testing.T) {
function TestComposeUpEnvFileNotFoundError (line 473) | func TestComposeUpEnvFileNotFoundError(t *testing.T) {
function TestComposeUpWithScale (line 506) | func TestComposeUpWithScale(t *testing.T) {
function TestComposeIPAMConfig (line 557) | func TestComposeIPAMConfig(t *testing.T) {
function TestComposeUpRemoveOrphans (line 603) | func TestComposeUpRemoveOrphans(t *testing.T) {
function TestComposeUpIdempotent (line 674) | func TestComposeUpIdempotent(t *testing.T) {
function TestComposeUpNoRecreateDependencies (line 711) | func TestComposeUpNoRecreateDependencies(t *testing.T) {
function TestComposeUpWithExternalNetwork (line 784) | func TestComposeUpWithExternalNetwork(t *testing.T) {
function TestComposeUpWithBypass4netns (line 843) | func TestComposeUpWithBypass4netns(t *testing.T) {
function TestComposeUpProfile (line 945) | func TestComposeUpProfile(t *testing.T) {
function TestComposeUpAbortOnContainerExit (line 1038) | func TestComposeUpAbortOnContainerExit(t *testing.T) {
function TestComposeUpPull (line 1127) | func TestComposeUpPull(t *testing.T) {
function TestComposeUpServicePullPolicy (line 1212) | func TestComposeUpServicePullPolicy(t *testing.T) {
function TestComposeTmpfsVolume (line 1248) | func TestComposeTmpfsVolume(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_up_test.go
function TestComposeUpDetailedError (line 35) | func TestComposeUpDetailedError(t *testing.T) {
function TestComposeUpBindCreateHostPath (line 66) | func TestComposeUpBindCreateHostPath(t *testing.T) {
FILE: cmd/nerdctl/compose/compose_version.go
function versionCommand (line 28) | func versionCommand() *cobra.Command {
function versionAction (line 45) | func versionAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/compose/compose_version_test.go
function TestComposeVersion (line 28) | func TestComposeVersion(t *testing.T) {
function TestComposeVersionShort (line 35) | func TestComposeVersionShort(t *testing.T) {
function TestComposeVersionJson (line 42) | func TestComposeVersionJson(t *testing.T) {
FILE: cmd/nerdctl/container/container.go
function Command (line 25) | func Command() *cobra.Command {
function listCommand (line 64) | func listCommand() *cobra.Command {
FILE: cmd/nerdctl/container/container_attach.go
function AttachCommand (line 34) | func AttachCommand() *cobra.Command {
function attachOptions (line 65) | func attachOptions(cmd *cobra.Command) (types.ContainerAttachOptions, er...
function attachAction (line 92) | func attachAction(cmd *cobra.Command, args []string) error {
function attachShellComplete (line 107) | func attachShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/container/container_attach_linux_test.go
function TestAttach (line 45) | func TestAttach(t *testing.T) {
function TestAttachDetachKeys (line 107) | func TestAttachDetachKeys(t *testing.T) {
function TestAttachForAutoRemovedContainer (line 168) | func TestAttachForAutoRemovedContainer(t *testing.T) {
function TestAttachNoStdin (line 216) | func TestAttachNoStdin(t *testing.T) {
FILE: cmd/nerdctl/container/container_commit.go
function CommitCommand (line 31) | func CommitCommand() *cobra.Command {
function commitOptions (line 57) | func commitOptions(cmd *cobra.Command) (types.ContainerCommitOptions, er...
function commitAction (line 154) | func commitAction(cmd *cobra.Command, args []string) error {
function commitShellComplete (line 168) | func commitShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/container/container_commit_linux_test.go
function TestKubeCommitSave (line 31) | func TestKubeCommitSave(t *testing.T) {
FILE: cmd/nerdctl/container/container_commit_test.go
function TestCommit (line 34) | func TestCommit(t *testing.T) {
function TestZstdCommit (line 94) | func TestZstdCommit(t *testing.T) {
FILE: cmd/nerdctl/container/container_cp_acid_linux_test.go
function TestCopyAcid (line 38) | func TestCopyAcid(t *testing.T) {
FILE: cmd/nerdctl/container/container_cp_linux.go
function copyCommand (line 34) | func copyCommand() *cobra.Command {
function copyAction (line 64) | func copyAction(cmd *cobra.Command, args []string) error {
function copyOptions (line 84) | func copyOptions(cmd *cobra.Command, args []string) (types.ContainerCpOp...
function AddCpCommand (line 130) | func AddCpCommand(rootCmd *cobra.Command) {
function parseCpFileSpec (line 136) | func parseCpFileSpec(arg string) (*copyFileSpec, error) {
type copyFileSpec (line 174) | type copyFileSpec struct
function copyShellComplete (line 179) | func copyShellComplete(cmd *cobra.Command, args []string, toComplete str...
FILE: cmd/nerdctl/container/container_cp_linux_test.go
constant complexify (line 46) | complexify = ""
constant pathDoesNotExistRelative (line 48) | pathDoesNotExistRelative = "does-not-exist" + complexify
constant pathDoesNotExistAbsolute (line 49) | pathDoesNotExistAbsolute = string(os.PathSeparator) + "does-not-exist" +...
constant pathIsAFileRelative (line 50) | pathIsAFileRelative = "is-a-file" + complexify
constant pathIsAFileAbsolute (line 51) | pathIsAFileAbsolute = string(os.PathSeparator) + "is-a-file" + comp...
constant pathIsADirRelative (line 52) | pathIsADirRelative = "is-a-dir" + complexify
constant pathIsADirAbsolute (line 53) | pathIsADirAbsolute = string(os.PathSeparator) + "is-a-dir" + compl...
constant pathIsAVolumeMount (line 54) | pathIsAVolumeMount = string(os.PathSeparator) + "is-a-volume-mount...
constant srcFileName (line 56) | srcFileName = "test-file" + complexify
constant tarballName (line 57) | tarballName = "test-tar" + complexify
constant cpFolderName (line 58) | cpFolderName = "nerdctl-cp-test"
constant containerCwd (line 62) | containerCwd = "/nerdctl/cp/test"
constant dirPerm (line 64) | dirPerm = 0o755
constant filePerm (line 65) | filePerm = 0o644
type testgroup (line 70) | type testgroup struct
type testcases (line 81) | type testcases struct
function TestCopyToContainer (line 93) | func TestCopyToContainer(t *testing.T) {
function TestCopyFromContainer (line 457) | func TestCopyFromContainer(t *testing.T) {
function assertCatHelper (line 810) | func assertCatHelper(base *testutil.Base, catPath string, fileContent []...
function cpTestHelper (line 833) | func cpTestHelper(t *testing.T, tg *testgroup) {
FILE: cmd/nerdctl/container/container_cp_nolinux.go
function AddCpCommand (line 23) | func AddCpCommand(rootCmd *cobra.Command) {
FILE: cmd/nerdctl/container/container_create.go
function CreateCommand (line 33) | func CreateCommand() *cobra.Command {
function createOptions (line 60) | func createOptions(cmd *cobra.Command) (types.ContainerCreateOptions, er...
function createAction (line 523) | func createAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/container/container_create_linux_test.go
function TestCreateWithLabel (line 45) | func TestCreateWithLabel(t *testing.T) {
function TestCreateWithMACAddress (line 58) | func TestCreateWithMACAddress(t *testing.T) {
function TestCreateWithTty (line 160) | func TestCreateWithTty(t *testing.T) {
function TestIssue2993 (line 184) | func TestIssue2993(t *testing.T) {
function TestCreateFromOCIArchive (line 303) | func TestCreateFromOCIArchive(t *testing.T) {
function TestUsernsMappingCreateCmd (line 334) | func TestUsernsMappingCreateCmd(t *testing.T) {
function getContainerHostUID (line 414) | func getContainerHostUID(helpers test.Helpers, containerName string) (st...
function appendUsernsConfig (line 431) | func appendUsernsConfig(userns string, hostUID string, helpers test.Help...
function addUser (line 469) | func addUser(username string, hostID string, helpers test.Helpers) {
function removeUsernsConfig (line 476) | func removeUsernsConfig(t *testing.T, userns string, helpers test.Helper...
function delUser (line 507) | func delUser(username string, helpers test.Helpers) {
function delGroup (line 511) | func delGroup(groupname string, helpers test.Helpers) {
FILE: cmd/nerdctl/container/container_create_test.go
function TestCreate (line 36) | func TestCreate(t *testing.T) {
function TestCreateHyperVContainer (line 68) | func TestCreateHyperVContainer(t *testing.T) {
FILE: cmd/nerdctl/container/container_diff.go
function DiffCommand (line 46) | func DiffCommand() *cobra.Command {
function diffOptions (line 59) | func diffOptions(cmd *cobra.Command) (types.ContainerDiffOptions, error) {
function diffAction (line 71) | func diffAction(cmd *cobra.Command, args []string) error {
function getChanges (line 121) | func getChanges(ctx context.Context, client *containerd.Client, containe...
function appendChanges (line 200) | func appendChanges(changes []fs.Change, fsChange fs.Change) []fs.Change {
function diffShellComplete (line 228) | func diffShellComplete(cmd *cobra.Command, args []string, toComplete str...
FILE: cmd/nerdctl/container/container_diff_test.go
function TestDiff (line 30) | func TestDiff(t *testing.T) {
FILE: cmd/nerdctl/container/container_exec.go
function ExecCommand (line 33) | func ExecCommand() *cobra.Command {
function execOptions (line 58) | func execOptions(cmd *cobra.Command) (types.ContainerExecOptions, error) {
function execAction (line 125) | func execAction(cmd *cobra.Command, args []string) error {
function execShellComplete (line 147) | func execShellComplete(cmd *cobra.Command, args []string, toComplete str...
FILE: cmd/nerdctl/container/container_exec_linux_test.go
function TestExecWithUser (line 29) | func TestExecWithUser(t *testing.T) {
function TestExecTTY (line 92) | func TestExecTTY(t *testing.T) {
FILE: cmd/nerdctl/container/container_exec_test.go
function TestExec (line 35) | func TestExec(t *testing.T) {
function TestExecWithDoubleDash (line 53) | func TestExecWithDoubleDash(t *testing.T) {
function TestExecStdin (line 72) | func TestExecStdin(t *testing.T) {
function TestExecEnv (line 94) | func TestExecEnv(t *testing.T) {
FILE: cmd/nerdctl/container/container_export.go
function ExportCommand (line 33) | func ExportCommand() *cobra.Command {
function exportAction (line 49) | func exportAction(cmd *cobra.Command, args []string) error {
function exportShellComplete (line 91) | func exportShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/container/container_export_test.go
function validateExportedTar (line 37) | func validateExportedTar(outFile string) test.Comparator {
function TestExportStoppedContainer (line 69) | func TestExportStoppedContainer(t *testing.T) {
function TestExportRunningContainer (line 115) | func TestExportRunningContainer(t *testing.T) {
function TestExportNonexistentContainer (line 160) | func TestExportNonexistentContainer(t *testing.T) {
FILE: cmd/nerdctl/container/container_health_check.go
function HealthCheckCommand (line 35) | func HealthCheckCommand() *cobra.Command {
function healthCheckAction (line 49) | func healthCheckAction(cmd *cobra.Command, args []string) error {
function healthCheckShellComplete (line 81) | func healthCheckShellComplete(cmd *cobra.Command, args []string, toCompl...
FILE: cmd/nerdctl/container/container_health_check_linux_test.go
function TestContainerHealthCheckBasic (line 41) | func TestContainerHealthCheckBasic(t *testing.T) {
function TestContainerHealthCheckDefaults (line 143) | func TestContainerHealthCheckDefaults(t *testing.T) {
function TestContainerHealthCheckAdvance (line 276) | func TestContainerHealthCheckAdvance(t *testing.T) {
function TestHealthCheck_SystemdIntegration_Basic (line 751) | func TestHealthCheck_SystemdIntegration_Basic(t *testing.T) {
function TestHealthCheck_GlobalFlags (line 935) | func TestHealthCheck_GlobalFlags(t *testing.T) {
function TestHealthCheck_SystemdIntegration_Advanced (line 1036) | func TestHealthCheck_SystemdIntegration_Advanced(t *testing.T) {
FILE: cmd/nerdctl/container/container_inspect.go
function inspectCommand (line 34) | func inspectCommand() *cobra.Command {
function InspectOptions (line 63) | func InspectOptions(cmd *cobra.Command) (opt types.ContainerInspectOptio...
function inspectAction (line 95) | func inspectAction(cmd *cobra.Command, args []string) error {
function containerInspectShellComplete (line 120) | func containerInspectShellComplete(cmd *cobra.Command, args []string, to...
FILE: cmd/nerdctl/container/container_inspect_linux_test.go
function TestContainerInspectContainsPortConfig (line 43) | func TestContainerInspectContainsPortConfig(t *testing.T) {
function TestContainerInspectContainsMounts (line 59) | func TestContainerInspectContainsMounts(t *testing.T) {
function TestContainerInspectContainsLabel (line 155) | func TestContainerInspectContainsLabel(t *testing.T) {
function TestContainerInspectContainsInternalLabel (line 171) | func TestContainerInspectContainsInternalLabel(t *testing.T) {
function TestContainerInspectConfigImage (line 190) | func TestContainerInspectConfigImage(t *testing.T) {
function TestContainerInspectState (line 219) | func TestContainerInspectState(t *testing.T) {
function TestContainerInspectHostConfig (line 272) | func TestContainerInspectHostConfig(t *testing.T) {
function TestContainerInspectHostConfigDefaults (line 317) | func TestContainerInspectHostConfigDefaults(t *testing.T) {
function TestContainerInspectHostConfigDNS (line 373) | func TestContainerInspectHostConfigDNS(t *testing.T) {
function TestContainerInspectHostConfigDNSDefaults (line 404) | func TestContainerInspectHostConfigDNSDefaults(t *testing.T) {
function TestContainerInspectHostConfigPID (line 421) | func TestContainerInspectHostConfigPID(t *testing.T) {
function TestContainerInspectHostConfigPIDDefaults (line 451) | func TestContainerInspectHostConfigPIDDefaults(t *testing.T) {
function TestContainerInspectDevices (line 464) | func TestContainerInspectDevices(t *testing.T) {
function TestContainerInspectBlkioSettings (line 501) | func TestContainerInspectBlkioSettings(t *testing.T) {
function TestContainerInspectUser (line 560) | func TestContainerInspectUser(t *testing.T) {
type hostConfigValues (line 589) | type hostConfigValues struct
FILE: cmd/nerdctl/container/container_inspect_windows_test.go
function TestInspectProcessContainerContainsLabel (line 34) | func TestInspectProcessContainerContainsLabel(t *testing.T) {
function TestInspectHyperVContainerContainsLabel (line 73) | func TestInspectHyperVContainerContainsLabel(t *testing.T) {
FILE: cmd/nerdctl/container/container_kill.go
function KillCommand (line 31) | func KillCommand() *cobra.Command {
function killAction (line 45) | func killAction(cmd *cobra.Command, args []string) error {
function killShellComplete (line 70) | func killShellComplete(cmd *cobra.Command, _ []string, _ string) ([]stri...
FILE: cmd/nerdctl/container/container_kill_linux_test.go
function TestKillCleanupForwards (line 36) | func TestKillCleanupForwards(t *testing.T) {
FILE: cmd/nerdctl/container/container_list.go
function PsCommand (line 36) | func PsCommand() *cobra.Command {
function processOptions (line 61) | func processOptions(cmd *cobra.Command) (types.ContainerListOptions, For...
function psAction (line 126) | func psAction(cmd *cobra.Command, args []string) error {
type FormattingAndPrintingOptions (line 147) | type FormattingAndPrintingOptions struct
function formatAndPrintContainerInfo (line 157) | func formatAndPrintContainerInfo(containers []container.ListItem, option...
FILE: cmd/nerdctl/container/container_list_linux_test.go
type psTestContainer (line 39) | type psTestContainer struct
function preparePsTestContainer (line 47) | func preparePsTestContainer(t *testing.T, identity string, keepAlive boo...
function TestContainerList (line 123) | func TestContainerList(t *testing.T) {
function TestContainerListWideMode (line 165) | func TestContainerListWideMode(t *testing.T) {
function TestContainerListWithLabels (line 205) | func TestContainerListWithLabels(t *testing.T) {
function TestContainerListWithNames (line 235) | func TestContainerListWithNames(t *testing.T) {
function TestContainerListWithFilter (line 253) | func TestContainerListWithFilter(t *testing.T) {
function TestContainerListCheckCreatedTime (line 648) | func TestContainerListCheckCreatedTime(t *testing.T) {
function TestContainerListStatusFilter (line 671) | func TestContainerListStatusFilter(t *testing.T) {
FILE: cmd/nerdctl/container/container_list_test.go
function TestContainerListWithFormatLabel (line 31) | func TestContainerListWithFormatLabel(t *testing.T) {
function TestContainerListWithJsonFormatLabel (line 59) | func TestContainerListWithJsonFormatLabel(t *testing.T) {
FILE: cmd/nerdctl/container/container_list_windows_test.go
type psTestContainer (line 32) | type psTestContainer struct
function preparePsTestContainer (line 38) | func preparePsTestContainer(t *testing.T, identity string, restart bool,...
function TestListProcessContainer (line 89) | func TestListProcessContainer(t *testing.T) {
function TestListHyperVContainer (line 128) | func TestListHyperVContainer(t *testing.T) {
function TestListProcessContainerWideMode (line 178) | func TestListProcessContainerWideMode(t *testing.T) {
function TestListProcessContainerWithLabels (line 218) | func TestListProcessContainerWithLabels(t *testing.T) {
FILE: cmd/nerdctl/container/container_logs.go
function LogsCommand (line 32) | func LogsCommand() *cobra.Command {
function logsOptions (line 60) | func logsOptions(cmd *cobra.Command) (types.ContainerLogsOptions, error) {
function logsAction (line 109) | func logsAction(cmd *cobra.Command, args []string) error {
function logsShellComplete (line 124) | func logsShellComplete(cmd *cobra.Command, args []string, toComplete str...
function getTailArgAsUint (line 130) | func getTailArgAsUint(arg string) (uint, error) {
FILE: cmd/nerdctl/container/container_logs_test.go
function TestLogs (line 40) | func TestLogs(t *testing.T) {
function TestLogsOutStreamsSeparated (line 135) | func TestLogsOutStreamsSeparated(t *testing.T) {
function TestLogsWithInheritedFlags (line 164) | func TestLogsWithInheritedFlags(t *testing.T) {
function TestLogsOfJournaldDriver (line 188) | func TestLogsOfJournaldDriver(t *testing.T) {
function TestLogsWithFailingContainer (line 242) | func TestLogsWithFailingContainer(t *testing.T) {
function TestLogsWithRunningContainer (line 271) | func TestLogsWithRunningContainer(t *testing.T) {
function TestLogsWithoutNewlineOrEOF (line 301) | func TestLogsWithoutNewlineOrEOF(t *testing.T) {
function TestLogsAfterRestartingContainer (line 327) | func TestLogsAfterRestartingContainer(t *testing.T) {
function TestLogsWithForegroundContainers (line 371) | func TestLogsWithForegroundContainers(t *testing.T) {
function TestLogsTailFollowRotate (line 438) | func TestLogsTailFollowRotate(t *testing.T) {
function TestLogsNoneLoggerHasNoLogURI (line 484) | func TestLogsNoneLoggerHasNoLogURI(t *testing.T) {
function TestLogsWithDetails (line 504) | func TestLogsWithDetails(t *testing.T) {
function TestLogsFollowNoExtraneousLineFeed (line 538) | func TestLogsFollowNoExtraneousLineFeed(t *testing.T) {
function TestLogsWithStartContainer (line 564) | func TestLogsWithStartContainer(t *testing.T) {
FILE: cmd/nerdctl/container/container_pause.go
function PauseCommand (line 31) | func PauseCommand() *cobra.Command {
function pauseOptions (line 44) | func pauseOptions(cmd *cobra.Command) (types.ContainerPauseOptions, erro...
function pauseAction (line 55) | func pauseAction(cmd *cobra.Command, args []string) error {
function pauseShellComplete (line 70) | func pauseShellComplete(cmd *cobra.Command, args []string, toComplete st...
FILE: cmd/nerdctl/container/container_port.go
function PortCommand (line 35) | func PortCommand() *cobra.Command {
function portAction (line 48) | func portAction(cmd *cobra.Command, args []string) error {
function portShellComplete (line 117) | func portShellComplete(cmd *cobra.Command, args []string, toComplete str...
FILE: cmd/nerdctl/container/container_prune.go
function pruneCommand (line 28) | func pruneCommand() *cobra.Command {
function pruneOptions (line 41) | func pruneOptions(cmd *cobra.Command) (types.ContainerPruneOptions, erro...
function grantPrunePermission (line 53) | func grantPrunePermission(cmd *cobra.Command) (bool, error) {
function pruneAction (line 65) | func pruneAction(cmd *cobra.Command, _ []string) error {
FILE: cmd/nerdctl/container/container_prune_linux_test.go
function TestPruneContainer (line 28) | func TestPruneContainer(t *testing.T) {
FILE: cmd/nerdctl/container/container_remove.go
function RemoveCommand (line 29) | func RemoveCommand() *cobra.Command {
function removeAction (line 45) | func removeAction(cmd *cobra.Command, args []string) error {
function rmShellComplete (line 74) | func rmShellComplete(cmd *cobra.Command, args []string, toComplete strin...
FILE: cmd/nerdctl/container/container_remove_linux_test.go
constant iptablesCheckCommand (line 36) | iptablesCheckCommand = "iptables -t nat -S && iptables -t filter -S && i...
function testContainerRmIptablesExecutor (line 39) | func testContainerRmIptablesExecutor(data test.Data, helpers test.Helper...
function TestContainerRmIptables (line 71) | func TestContainerRmIptables(t *testing.T) {
FILE: cmd/nerdctl/container/container_remove_test.go
function TestRemoveContainer (line 28) | func TestRemoveContainer(t *testing.T) {
FILE: cmd/nerdctl/container/container_remove_windows_test.go
function TestRemoveHyperVContainer (line 31) | func TestRemoveHyperVContainer(t *testing.T) {
FILE: cmd/nerdctl/container/container_rename.go
function RenameCommand (line 29) | func RenameCommand() *cobra.Command {
function renameOptions (line 42) | func renameOptions(cmd *cobra.Command) (types.ContainerRenameOptions, er...
function renameAction (line 53) | func renameAction(cmd *cobra.Command, args []string) error {
function renameShellComplete (line 65) | func renameShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/container/container_rename_linux_test.go
function TestRename (line 30) | func TestRename(t *testing.T) {
function TestRenameUpdateHosts (line 90) | func TestRenameUpdateHosts(t *testing.T) {
FILE: cmd/nerdctl/container/container_rename_windows_test.go
function TestRenameProcessContainer (line 29) | func TestRenameProcessContainer(t *testing.T) {
function TestRenameHyperVContainer (line 90) | func TestRenameHyperVContainer(t *testing.T) {
FILE: cmd/nerdctl/container/container_restart.go
function RestartCommand (line 30) | func RestartCommand() *cobra.Command {
function restartOptions (line 45) | func restartOptions(cmd *cobra.Command) (types.ContainerRestartOptions, ...
function restartAction (line 85) | func restartAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/container/container_restart_linux_test.go
function TestRestart (line 39) | func TestRestart(t *testing.T) {
function TestRestartPIDContainer (line 79) | func TestRestartPIDContainer(t *testing.T) {
function TestRestartIPCContainer (line 127) | func TestRestartIPCContainer(t *testing.T) {
function TestRestartWithTime (line 177) | func TestRestartWithTime(t *testing.T) {
function TestRestartWithSignal (line 220) | func TestRestartWithSignal(t *testing.T) {
FILE: cmd/nerdctl/container/container_run.go
constant tiniInitBinary (line 51) | tiniInitBinary = "tini"
function RunCommand (line 54) | func RunCommand() *cobra.Command {
function setCreateFlags (line 85) | func setCreateFlags(cmd *cobra.Command) {
function processCreateCommandFlagsInRun (line 323) | func processCreateCommandFlagsInRun(cmd *cobra.Command) (types.Container...
function runAction (line 369) | func runAction(cmd *cobra.Command, args []string) error {
function runShellComplete (line 525) | func runShellComplete(cmd *cobra.Command, args []string, toComplete stri...
FILE: cmd/nerdctl/container/container_run_cgroup_linux_test.go
function TestRunCgroupV2 (line 47) | func TestRunCgroupV2(t *testing.T) {
function TestRunCgroupV1 (line 138) | func TestRunCgroupV1(t *testing.T) {
function TestIssue3781 (line 183) | func TestIssue3781(t *testing.T) {
function TestRunDevice (line 229) | func TestRunDevice(t *testing.T) {
function TestParseDevice (line 325) | func TestParseDevice(t *testing.T) {
function TestRunCgroupConf (line 389) | func TestRunCgroupConf(t *testing.T) {
function TestRunCgroupParent (line 408) | func TestRunCgroupParent(t *testing.T) {
function TestRunBlkioWeightCgroupV2 (line 461) | func TestRunBlkioWeightCgroupV2(t *testing.T) {
function TestRunBlkioSettingCgroupV2 (line 484) | func TestRunBlkioSettingCgroupV2(t *testing.T) {
function TestRunCPURealTimeSettingCgroupV1 (line 700) | func TestRunCPURealTimeSettingCgroupV1(t *testing.T) {
function TestRunCPUSharesCgroupV2 (line 736) | func TestRunCPUSharesCgroupV2(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_gpus_test.go
function TestParseGpusOptAll (line 28) | func TestParseGpusOptAll(t *testing.T) {
function TestParseGpusOpts (line 44) | func TestParseGpusOpts(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_linux.go
function capShellComplete (line 27) | func capShellComplete(cmd *cobra.Command, args []string, toComplete stri...
FILE: cmd/nerdctl/container/container_run_linux_test.go
function TestRunCustomRootfs (line 49) | func TestRunCustomRootfs(t *testing.T) {
function prepareCustomRootfs (line 70) | func prepareCustomRootfs(base *testutil.Base, imageName string) string {
function TestRunShmSize (line 84) | func TestRunShmSize(t *testing.T) {
function TestRunShmSizeIPCShareable (line 92) | func TestRunShmSizeIPCShareable(t *testing.T) {
function TestRunIPCShareableRemoveMount (line 102) | func TestRunIPCShareableRemoveMount(t *testing.T) {
function TestRunIPCContainerNotExists (line 111) | func TestRunIPCContainerNotExists(t *testing.T) {
function TestRunShmSizeIPCContainer (line 124) | func TestRunShmSizeIPCContainer(t *testing.T) {
function TestRunIPCContainer (line 137) | func TestRunIPCContainer(t *testing.T) {
function TestRunPidHost (line 150) | func TestRunPidHost(t *testing.T) {
function TestRunUtsHost (line 158) | func TestRunUtsHost(t *testing.T) {
function TestRunPidContainer (line 175) | func TestRunPidContainer(t *testing.T) {
function TestRunIpcHost (line 187) | func TestRunIpcHost(t *testing.T) {
function TestRunAddHost (line 199) | func TestRunAddHost(t *testing.T) {
function TestRunAddHostWithCustomHostGatewayIP (line 247) | func TestRunAddHostWithCustomHostGatewayIP(t *testing.T) {
function TestRunUlimit (line 269) | func TestRunUlimit(t *testing.T) {
function TestRunWithInit (line 282) | func TestRunWithInit(t *testing.T) {
function TestRunTTY (line 315) | func TestRunTTY(t *testing.T) {
function TestRunSigProxy (line 384) | func TestRunSigProxy(t *testing.T) {
function TestRunWithFluentdLogDriver (line 449) | func TestRunWithFluentdLogDriver(t *testing.T) {
function TestRunWithFluentdLogDriverWithLogOpt (line 478) | func TestRunWithFluentdLogDriverWithLogOpt(t *testing.T) {
function TestRunWithOOMScoreAdj (line 507) | func TestRunWithOOMScoreAdj(t *testing.T) {
function TestRunWithDetachKeys (line 518) | func TestRunWithDetachKeys(t *testing.T) {
function TestRunWithTtyAndDetached (line 562) | func TestRunWithTtyAndDetached(t *testing.T) {
function TestIssue3568 (line 584) | func TestIssue3568(t *testing.T) {
function TestPortBindingWithCustomHost (line 631) | func TestPortBindingWithCustomHost(t *testing.T) {
function TestRunDeviceCDI (line 672) | func TestRunDeviceCDI(t *testing.T) {
function TestRunDeviceCDIWithNerdctlConfig (line 696) | func TestRunDeviceCDIWithNerdctlConfig(t *testing.T) {
function TestRunGPU (line 728) | func TestRunGPU(t *testing.T) {
function TestRunGPUWithOtherCDIDevices (line 831) | func TestRunGPUWithOtherCDIDevices(t *testing.T) {
function writeTestCDISpec (line 881) | func writeTestCDISpec(t *testing.T, spec string, fileName string, cdiSpe...
function TestSharedIpcSetup (line 889) | func TestSharedIpcSetup(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_log_driver_syslog_test.go
function runSyslogTest (line 36) | func runSyslogTest(t *testing.T, networks []string, syslogFacilities map...
function TestSyslogNetwork (line 121) | func TestSyslogNetwork(t *testing.T) {
function TestSyslogFacilities (line 154) | func TestSyslogFacilities(t *testing.T) {
function TestSyslogFormat (line 200) | func TestSyslogFormat(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_mount_linux_test.go
function TestRunVolume (line 40) | func TestRunVolume(t *testing.T) {
function TestRunAnonymousVolume (line 92) | func TestRunAnonymousVolume(t *testing.T) {
function TestRunVolumeRelativePath (line 103) | func TestRunVolumeRelativePath(t *testing.T) {
function TestRunAnonymousVolumeWithTypeMountFlag (line 114) | func TestRunAnonymousVolumeWithTypeMountFlag(t *testing.T) {
function TestRunAnonymousVolumeWithBuild (line 121) | func TestRunAnonymousVolumeWithBuild(t *testing.T) {
function TestRunCopyingUpInitialContentsOnVolume (line 140) | func TestRunCopyingUpInitialContentsOnVolume(t *testing.T) {
function TestRunCopyingUpInitialContentsOnDockerfileVolume (line 167) | func TestRunCopyingUpInitialContentsOnDockerfileVolume(t *testing.T) {
function TestRunCopyingUpInitialContentsOnVolumeShouldRetainSymlink (line 201) | func TestRunCopyingUpInitialContentsOnVolumeShouldRetainSymlink(t *testi...
function TestRunCopyingUpInitialContentsShouldNotResetTheCopiedContents (line 224) | func TestRunCopyingUpInitialContentsShouldNotResetTheCopiedContents(t *t...
function TestRunTmpfs (line 261) | func TestRunTmpfs(t *testing.T) {
function TestRunBindMountTmpfs (line 289) | func TestRunBindMountTmpfs(t *testing.T) {
function mountExistsWithOpt (line 310) | func mountExistsWithOpt(mountPoint, mountOpt string) test.Comparator {
function TestRunBindMountBind (line 338) | func TestRunBindMountBind(t *testing.T) {
function TestRunMountBindMode (line 411) | func TestRunMountBindMode(t *testing.T) {
function TestRunVolumeBindMode (line 476) | func TestRunVolumeBindMode(t *testing.T) {
function TestRunBindMountPropagation (line 542) | func TestRunBindMountPropagation(t *testing.T) {
function isRootfsShareableMount (line 663) | func isRootfsShareableMount() bool {
function TestRunVolumesFrom (line 686) | func TestRunVolumesFrom(t *testing.T) {
function TestBindMountWhenHostFolderDoesNotExist (line 739) | func TestBindMountWhenHostFolderDoesNotExist(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_mount_windows_test.go
function TestRunMountVolume (line 30) | func TestRunMountVolume(t *testing.T) {
function TestRunMountVolumeInspect (line 84) | func TestRunMountVolumeInspect(t *testing.T) {
function TestRunMountAnonymousVolume (line 179) | func TestRunMountAnonymousVolume(t *testing.T) {
function TestRunMountRelativePath (line 191) | func TestRunMountRelativePath(t *testing.T) {
function TestRunMountNamedPipeVolume (line 201) | func TestRunMountNamedPipeVolume(t *testing.T) {
function TestRunMountVolumeSpec (line 207) | func TestRunMountVolumeSpec(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_network.go
function loadNetworkFlags (line 34) | func loadNetworkFlags(cmd *cobra.Command, globalOpts types.GlobalCommand...
FILE: cmd/nerdctl/container/container_run_network_base_test.go
function baseTestRunPort (line 39) | func baseTestRunPort(t *testing.T, nginxImage string, nginxIndexHTMLSnip...
FILE: cmd/nerdctl/container/container_run_network_linux_test.go
function extractHostPort (line 50) | func extractHostPort(portMapping string, port string) (string, error) {
function valuesOfMapStringString (line 67) | func valuesOfMapStringString(m map[string]string) map[string]struct{} {
function TestRunInternetConnectivity (line 76) | func TestRunInternetConnectivity(t *testing.T) {
function TestRunHostLookup (line 120) | func TestRunHostLookup(t *testing.T) {
function TestRunPortWithNoHostPort (line 187) | func TestRunPortWithNoHostPort(t *testing.T) {
function TestUniqueHostPortAssignement (line 260) | func TestUniqueHostPortAssignement(t *testing.T) {
function TestHostPortAlreadyInUse (line 352) | func TestHostPortAlreadyInUse(t *testing.T) {
function TestRunPort (line 407) | func TestRunPort(t *testing.T) {
function TestRunWithManyPortsThenCleanUp (line 411) | func TestRunWithManyPortsThenCleanUp(t *testing.T) {
function TestRunContainerWithStaticIP (line 455) | func TestRunContainerWithStaticIP(t *testing.T) {
function TestRunDNS (line 532) | func TestRunDNS(t *testing.T) {
function TestRunNetworkHostHostname (line 550) | func TestRunNetworkHostHostname(t *testing.T) {
function TestRunNetworkHost2613 (line 562) | func TestRunNetworkHost2613(t *testing.T) {
function TestSharedNetworkSetup (line 568) | func TestSharedNetworkSetup(t *testing.T) {
function TestSharedNetworkWithNone (line 676) | func TestSharedNetworkWithNone(t *testing.T) {
function TestRunContainerInExistingNetNS (line 697) | func TestRunContainerInExistingNetNS(t *testing.T) {
function TestRunContainerWithMACAddress (line 732) | func TestRunContainerWithMACAddress(t *testing.T) {
function TestHostsFileMounts (line 803) | func TestHostsFileMounts(t *testing.T) {
function TestRunContainerWithStaticIP6 (line 840) | func TestRunContainerWithStaticIP6(t *testing.T) {
function TestNoneNetworkHostName (line 910) | func TestNoneNetworkHostName(t *testing.T) {
function TestHostNetworkHostName (line 935) | func TestHostNetworkHostName(t *testing.T) {
function TestHostNetworkDnsPreserved (line 960) | func TestHostNetworkDnsPreserved(t *testing.T) {
function TestDefaultNetworkDnsNoLocalhost (line 993) | func TestDefaultNetworkDnsNoLocalhost(t *testing.T) {
function TestNoneNetworkDnsConfigs (line 1010) | func TestNoneNetworkDnsConfigs(t *testing.T) {
function TestHostNetworkDnsConfigs (line 1030) | func TestHostNetworkDnsConfigs(t *testing.T) {
function TestDNSWithGlobalConfig (line 1050) | func TestDNSWithGlobalConfig(t *testing.T) {
function TestReservePorts (line 1137) | func TestReservePorts(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_network_windows_test.go
function TestRunInternetConnectivity (line 34) | func TestRunInternetConnectivity(t *testing.T) {
function TestRunPort (line 63) | func TestRunPort(t *testing.T) {
function listHnsEndpointsRegex (line 69) | func listHnsEndpointsRegex(hnsEndpointNameRegex string) ([]hcsshim.HNSEn...
function assertHnsEndpointsExistence (line 91) | func assertHnsEndpointsExistence(t *testing.T, shouldExist bool, contain...
function TestHnsEndpointsExistDuringContainerLifecycle (line 110) | func TestHnsEndpointsExistDuringContainerLifecycle(t *testing.T) {
function getTestingNetwork (line 150) | func getTestingNetwork() (*netutil.NetworkConfig, error) {
function TestHnsEndpointsRemovedAfterAttachedRun (line 161) | func TestHnsEndpointsRemovedAfterAttachedRun(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_nolinux.go
function capShellComplete (line 25) | func capShellComplete(cmd *cobra.Command, args []string, toComplete stri...
FILE: cmd/nerdctl/container/container_run_restart_linux_test.go
function TestRunRestart (line 35) | func TestRunRestart(t *testing.T) {
function TestRunRestartWithOnFailure (line 94) | func TestRunRestartWithOnFailure(t *testing.T) {
function TestRunRestartWithUnlessStopped (line 115) | func TestRunRestartWithUnlessStopped(t *testing.T) {
function TestUpdateRestartPolicy (line 139) | func TestUpdateRestartPolicy(t *testing.T) {
function TestAddRestartPolicy (line 162) | func TestAddRestartPolicy(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_runtime_linux_test.go
function TestRunSysctl (line 29) | func TestRunSysctl(t *testing.T) {
function TestRunSysctl_DefaultUnprivilegedPortStart (line 38) | func TestRunSysctl_DefaultUnprivilegedPortStart(t *testing.T) {
function TestRunSysctl_UnprivilegedPortStartOverride (line 50) | func TestRunSysctl_UnprivilegedPortStartOverride(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_security_linux_test.go
function getCapEff (line 34) | func getCapEff(base *testutil.Base, args ...string) uint64 {
constant CapNetRaw (line 53) | CapNetRaw = 13
constant CapIPCLock (line 54) | CapIPCLock = 14
function TestRunCap (line 57) | func TestRunCap(t *testing.T) {
function TestRunSecurityOptSeccomp (line 120) | func TestRunSecurityOptSeccomp(t *testing.T) {
function TestRunApparmor (line 172) | func TestRunApparmor(t *testing.T) {
function TestRunSeccompCapSysPtrace (line 190) | func TestRunSeccompCapSysPtrace(t *testing.T) {
function TestRunSystemPathsUnconfined (line 196) | func TestRunSystemPathsUnconfined(t *testing.T) {
function TestRunPrivileged (line 251) | func TestRunPrivileged(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_soci_linux_test.go
function TestRunSoci (line 34) | func TestRunSoci(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_stargz_linux_test.go
function TestRunStargz (line 29) | func TestRunStargz(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_systemd_linux_test.go
function TestRunWithSystemdAlways (line 31) | func TestRunWithSystemdAlways(t *testing.T) {
function TestRunWithSystemdTrueEnabled (line 68) | func TestRunWithSystemdTrueEnabled(t *testing.T) {
function TestRunWithSystemdTrueDisabled (line 111) | func TestRunWithSystemdTrueDisabled(t *testing.T) {
function TestRunWithSystemdFalse (line 136) | func TestRunWithSystemdFalse(t *testing.T) {
function TestRunWithNoSystemd (line 173) | func TestRunWithNoSystemd(t *testing.T) {
function TestRunWithSystemdPrivilegedError (line 210) | func TestRunWithSystemdPrivilegedError(t *testing.T) {
function TestRunWithSystemdPrivilegedSuccess (line 223) | func TestRunWithSystemdPrivilegedSuccess(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_test.go
function TestRunEntrypointWithBuild (line 48) | func TestRunEntrypointWithBuild(t *testing.T) {
function TestRunWorkdir (line 111) | func TestRunWorkdir(t *testing.T) {
function TestRunWithDoubleDash (line 126) | func TestRunWithDoubleDash(t *testing.T) {
function TestRunExitCode (line 138) | func TestRunExitCode(t *testing.T) {
function TestRunCIDFile (line 172) | func TestRunCIDFile(t *testing.T) {
function TestRunEnvFile (line 190) | func TestRunEnvFile(t *testing.T) {
function TestRunEnv (line 219) | func TestRunEnv(t *testing.T) {
function TestRunHostnameEnv (line 269) | func TestRunHostnameEnv(t *testing.T) {
function TestRunStdin (line 295) | func TestRunStdin(t *testing.T) {
function TestRunWithJsonFileLogDriver (line 311) | func TestRunWithJsonFileLogDriver(t *testing.T) {
function TestRunWithJsonFileLogDriverAndLogPathOpt (line 343) | func TestRunWithJsonFileLogDriverAndLogPathOpt(t *testing.T) {
function TestRunWithJournaldLogDriver (line 378) | func TestRunWithJournaldLogDriver(t *testing.T) {
function TestRunWithJournaldLogDriverAndLogOpt (line 437) | func TestRunWithJournaldLogDriverAndLogOpt(t *testing.T) {
function TestRunWithLogBinary (line 471) | func TestRunWithLogBinary(t *testing.T) {
function TestRunAddHostRemainsWhenAnotherContainerCreated (line 563) | func TestRunAddHostRemainsWhenAnotherContainerCreated(t *testing.T) {
function TestRunRmTime (line 600) | func TestRunRmTime(t *testing.T) {
function runAttachStdin (line 617) | func runAttachStdin(t *testing.T, testStr string, args []string) string {
function runAttach (line 644) | func runAttach(t *testing.T, testStr string, args []string) string {
function TestRunAttachFlag (line 670) | func TestRunAttachFlag(t *testing.T) {
function TestRunQuiet (line 737) | func TestRunQuiet(t *testing.T) {
function TestRunFromOCIArchive (line 764) | func TestRunFromOCIArchive(t *testing.T) {
function TestRunDomainname (line 792) | func TestRunDomainname(t *testing.T) {
function TestRunHealthcheckFlags (line 843) | func TestRunHealthcheckFlags(t *testing.T) {
function TestRunHealthcheckFromImage (line 995) | func TestRunHealthcheckFromImage(t *testing.T) {
function countFIFOFiles (line 1069) | func countFIFOFiles(root string) (int, error) {
function TestCleanupFIFOs (line 1082) | func TestCleanupFIFOs(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_user_linux_test.go
function TestRunUserGID (line 34) | func TestRunUserGID(t *testing.T) {
function TestRunUmask (line 61) | func TestRunUmask(t *testing.T) {
function TestRunAddGroup (line 69) | func TestRunAddGroup(t *testing.T) {
function TestRunAddGroup_CVE_2023_25173 (line 119) | func TestRunAddGroup_CVE_2023_25173(t *testing.T) {
function TestUsernsMappingRunCmd (line 164) | func TestUsernsMappingRunCmd(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_user_windows_test.go
function TestRunUserName (line 29) | func TestRunUserName(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_verify_linux_test.go
function TestRunVerifyCosign (line 32) | func TestRunVerifyCosign(t *testing.T) {
FILE: cmd/nerdctl/container/container_run_windows_test.go
function TestRunHostProcessContainer (line 34) | func TestRunHostProcessContainer(t *testing.T) {
function TestRunHostProcessContainerAsUser (line 57) | func TestRunHostProcessContainerAsUser(t *testing.T) {
function TestRunHostProcessContainerAsLocalService (line 65) | func TestRunHostProcessContainerAsLocalService(t *testing.T) {
function TestRunHostProcessContainerAsNetworkService (line 73) | func TestRunHostProcessContainerAsNetworkService(t *testing.T) {
function TestRunProcessIsolated (line 81) | func TestRunProcessIsolated(t *testing.T) {
function TestRunHyperVContainer (line 96) | func TestRunHyperVContainer(t *testing.T) {
function TestRunProcessContainer (line 120) | func TestRunProcessContainer(t *testing.T) {
function TestRunProcessContainerWithDevice (line 139) | func TestRunProcessContainerWithDevice(t *testing.T) {
function TestRunWithTtyAndDetached (line 154) | func TestRunWithTtyAndDetached(t *testing.T) {
FILE: cmd/nerdctl/container/container_start.go
function StartCommand (line 32) | func StartCommand() *cobra.Command {
function startOptions (line 52) | func startOptions(cmd *cobra.Command) (types.ContainerStartOptions, erro...
function startAction (line 88) | func startAction(cmd *cobra.Command, args []string) error {
function startShellComplete (line 105) | func startShellComplete(cmd *cobra.Command, args []string, toComplete st...
FILE: cmd/nerdctl/container/container_start_linux_test.go
function TestStartDetachKeys (line 39) | func TestStartDetachKeys(t *testing.T) {
function TestStartWithCheckpoint (line 84) | func TestStartWithCheckpoint(t *testing.T) {
FILE: cmd/nerdctl/container/container_start_test.go
function TestStart (line 30) | func TestStart(t *testing.T) {
function TestStartAttach (line 52) | func TestStartAttach(t *testing.T) {
FILE: cmd/nerdctl/container/container_stats.go
function StatsCommand (line 31) | func StatsCommand() *cobra.Command {
function addStatsFlags (line 46) | func addStatsFlags(cmd *cobra.Command) {
function processStatsCommandFlags (line 53) | func processStatsCommandFlags(cmd *cobra.Command) (types.ContainerStatsO...
function statsAction (line 90) | func statsAction(cmd *cobra.Command, args []string) error {
function statsShellComplete (line 105) | func statsShellComplete(cmd *cobra.Command, args []string, toComplete st...
FILE: cmd/nerdctl/container/container_stats_test.go
function TestStats (line 31) | func TestStats(t *testing.T) {
FILE: cmd/nerdctl/container/container_stop.go
function StopCommand (line 33) | func StopCommand() *cobra.Command {
function stopOptions (line 48) | func stopOptions(cmd *cobra.Command) (types.ContainerStopOptions, error) {
function stopAction (line 79) | func stopAction(cmd *cobra.Command, args []string) error {
function stopShellComplete (line 94) | func stopShellComplete(cmd *cobra.Command, args []string, toComplete str...
FILE: cmd/nerdctl/container/container_stop_linux_test.go
function TestStopStart (line 39) | func TestStopStart(t *testing.T) {
function TestStopWithStopSignal (line 79) | func TestStopWithStopSignal(t *testing.T) {
function TestStopCleanupForwards (line 99) | func TestStopCleanupForwards(t *testing.T) {
function TestStopCreated (line 146) | func TestStopCreated(t *testing.T) {
function TestStopWithLongTimeoutAndSIGKILL (line 167) | func TestStopWithLongTimeoutAndSIGKILL(t *testing.T) {
function TestStopWithTimeout (line 185) | func TestStopWithTimeout(t *testing.T) {
function TestStopCleanupFIFOs (line 202) | func TestStopCleanupFIFOs(t *testing.T) {
FILE: cmd/nerdctl/container/container_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/container/container_top.go
function TopCommand (line 37) | func TopCommand() *cobra.Command {
function topAction (line 51) | func topAction(cmd *cobra.Command, args []string) error {
function topShellComplete (line 86) | func topShellComplete(cmd *cobra.Command, args []string, toComplete stri...
FILE: cmd/nerdctl/container/container_top_test.go
function TestTop (line 30) | func TestTop(t *testing.T) {
function TestTopHyperVContainer (line 72) | func TestTopHyperVContainer(t *testing.T) {
FILE: cmd/nerdctl/container/container_unpause.go
function UnpauseCommand (line 31) | func UnpauseCommand() *cobra.Command {
function unpauseOptions (line 44) | func unpauseOptions(cmd *cobra.Command) (types.ContainerUnpauseOptions, ...
function unpauseAction (line 58) | func unpauseAction(cmd *cobra.Command, args []string) error {
function unpauseShellComplete (line 73) | func unpauseShellComplete(cmd *cobra.Command, args []string, toComplete ...
FILE: cmd/nerdctl/container/container_update.go
type updateResourceOptions (line 47) | type updateResourceOptions struct
function UpdateCommand (line 60) | func UpdateCommand() *cobra.Command {
function setUpdateFlags (line 75) | func setUpdateFlags(cmd *cobra.Command) {
function updateAction (line 94) | func updateAction(cmd *cobra.Command, args []string) error {
function getUpdateOption (line 122) | func getUpdateOption(cmd *cobra.Command, globalOptions types.GlobalComma...
function updateContainer (line 245) | func updateContainer(ctx context.Context, client *containerd.Client, id ...
function updateContainerSpec (line 382) | func updateContainerSpec(ctx context.Context, container containerd.Conta...
function copySpec (line 396) | func copySpec(spec *runtimespec.Spec) (*runtimespec.Spec, error) {
function updateShellComplete (line 412) | func updateShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/container/container_update_linux_test.go
function TestUpdateContainer (line 31) | func TestUpdateContainer(t *testing.T) {
FILE: cmd/nerdctl/container/container_wait.go
function WaitCommand (line 31) | func WaitCommand() *cobra.Command {
function waitOptions (line 44) | func waitOptions(cmd *cobra.Command) (types.ContainerWaitOptions, error) {
function waitAction (line 55) | func waitAction(cmd *cobra.Command, args []string) error {
function waitShellComplete (line 70) | func waitShellComplete(cmd *cobra.Command, args []string, toComplete str...
FILE: cmd/nerdctl/container/container_wait_test.go
function TestWait (line 29) | func TestWait(t *testing.T) {
FILE: cmd/nerdctl/container/multi_platform_linux_test.go
function testMultiPlatformRun (line 33) | func testMultiPlatformRun(base *testutil.Base, alpineImage string) {
function TestMultiPlatformRun (line 50) | func TestMultiPlatformRun(t *testing.T) {
function TestMultiPlatformBuildPush (line 55) | func TestMultiPlatformBuildPush(t *testing.T) {
function TestMultiPlatformBuildPushNoRun (line 82) | func TestMultiPlatformBuildPushNoRun(t *testing.T) {
function TestMultiPlatformPullPushAllPlatforms (line 106) | func TestMultiPlatformPullPushAllPlatforms(t *testing.T) {
function TestMultiPlatformComposeUpBuild (line 122) | func TestMultiPlatformComposeUpBuild(t *testing.T) {
FILE: cmd/nerdctl/helpers/cobra.go
function UnknownSubcommandAction (line 36) | func UnknownSubcommandAction(cmd *cobra.Command, args []string) error {
function IsExactArgs (line 52) | func IsExactArgs(number int) cobra.PositionalArgs {
function AddStringFlag (line 70) | func AddStringFlag(cmd *cobra.Command, name string, aliases []string, va...
function AddIntFlag (line 92) | func AddIntFlag(cmd *cobra.Command, name string, aliases []string, value...
function AddDurationFlag (line 118) | func AddDurationFlag(cmd *cobra.Command, name string, aliases []string, ...
function GlobalFlags (line 143) | func GlobalFlags(cmd *cobra.Command) (string, []string) {
function AddPersistentStringArrayFlag (line 172) | func AddPersistentStringArrayFlag(cmd *cobra.Command, name string, alias...
function AddPersistentStringFlag (line 205) | func AddPersistentStringFlag(cmd *cobra.Command, name string, aliases, l...
function AddPersistentBoolFlag (line 256) | func AddPersistentBoolFlag(cmd *cobra.Command, name string, aliases, non...
function HiddenPersistentStringArrayFlag (line 293) | func HiddenPersistentStringArrayFlag(cmd *cobra.Command, name string, va...
FILE: cmd/nerdctl/helpers/consts.go
constant Category (line 20) | Category = "category"
constant Management (line 21) | Management = "management"
FILE: cmd/nerdctl/helpers/flagutil.go
function VerifyOptions (line 28) | func VerifyOptions(cmd *cobra.Command) (opt types.ImageVerifyOptions, er...
function ValidateHealthcheckFlags (line 50) | func ValidateHealthcheckFlags(options types.ContainerCreateOptions) error {
function ProcessRootCmdFlags (line 79) | func ProcessRootCmdFlags(cmd *cobra.Command) (types.GlobalCommandOptions...
function CheckExperimental (line 186) | func CheckExperimental(feature string) func(cmd *cobra.Command, args []s...
FILE: cmd/nerdctl/helpers/prompt.go
function Confirm (line 26) | func Confirm(cmd *cobra.Command, message string) (bool, error) {
FILE: cmd/nerdctl/helpers/testing.go
function CreateBuildContext (line 31) | func CreateBuildContext(t *testing.T, dockerfile string) string {
function ExtractDockerArchive (line 38) | func ExtractDockerArchive(archiveTarPath, rootfsPath string) error {
type DockerArchiveManifestJSON (line 75) | type DockerArchiveManifestJSON
type DockerArchiveManifestJSONEntry (line 77) | type DockerArchiveManifestJSONEntry struct
function ExtractTarFile (line 83) | func ExtractTarFile(dirPath, tarFilePath string) error {
FILE: cmd/nerdctl/helpers/testing_linux.go
type CosignKeyPair (line 35) | type CosignKeyPair struct
function NewCosignKeyPair (line 41) | func NewCosignKeyPair(t testing.TB, path string, password string) *Cosig...
function ComposeUp (line 64) | func ComposeUp(t *testing.T, base *testutil.Base, dockerComposeYAML stri...
FILE: cmd/nerdctl/image/image.go
function Command (line 26) | func Command() *cobra.Command {
function imageLsCommand (line 56) | func imageLsCommand() *cobra.Command {
function imageRemoveCommand (line 63) | func imageRemoveCommand() *cobra.Command {
FILE: cmd/nerdctl/image/image_convert.go
constant imageConvertHelp (line 31) | imageConvertHelp = `Convert an image format.
function convertCommand (line 42) | func convertCommand() *cobra.Command {
function convertOptions (line 114) | func convertOptions(cmd *cobra.Command) (types.ImageConvertOptions, erro...
function imageConvertAction (line 325) | func imageConvertAction(cmd *cobra.Command, args []string) error {
function imageConvertShellComplete (line 342) | func imageConvertShellComplete(cmd *cobra.Command, args []string, toComp...
FILE: cmd/nerdctl/image/image_convert_linux_test.go
function TestImageConvert (line 32) | func TestImageConvert(t *testing.T) {
function TestImageConvertNydusVerify (line 138) | func TestImageConvertNydusVerify(t *testing.T) {
FILE: cmd/nerdctl/image/image_cryptutil.go
function registerImgcryptFlags (line 35) | func registerImgcryptFlags(cmd *cobra.Command, encrypt bool) {
function cryptOptions (line 58) | func cryptOptions(cmd *cobra.Command, args []string, encrypt bool) (type...
function getImgcryptAction (line 107) | func getImgcryptAction(encrypt bool) func(cmd *cobra.Command, args []str...
function imgcryptShellComplete (line 126) | func imgcryptShellComplete(cmd *cobra.Command, args []string, toComplete...
FILE: cmd/nerdctl/image/image_decrypt.go
constant imageDecryptHelp (line 23) | imageDecryptHelp = `Decrypt an image locally.
function decryptCommand (line 48) | func decryptCommand() *cobra.Command {
FILE: cmd/nerdctl/image/image_encrypt.go
constant imageEncryptHelp (line 23) | imageEncryptHelp = `Encrypt image layers.
function encryptCommand (line 48) | func encryptCommand() *cobra.Command {
FILE: cmd/nerdctl/image/image_encrypt_linux_test.go
function TestImageEncryptJWE (line 34) | func TestImageEncryptJWE(t *testing.T) {
FILE: cmd/nerdctl/image/image_history.go
function HistoryCommand (line 46) | func HistoryCommand() *cobra.Command {
function addHistoryFlags (line 60) | func addHistoryFlags(cmd *cobra.Command) {
type historyPrintable (line 70) | type historyPrintable struct
function historyAction (line 82) | func historyAction(cmd *cobra.Command, args []string) error {
type historyPrinter (line 159) | type historyPrinter struct
method printHistory (line 225) | func (x *historyPrinter) printHistory(printable historyPrintable) error {
function printHistory (line 165) | func printHistory(cmd *cobra.Command, historys []historyPrintable) error {
function historyShellComplete (line 273) | func historyShellComplete(cmd *cobra.Command, args []string, toComplete ...
FILE: cmd/nerdctl/image/image_history_test.go
type historyObj (line 38) | type historyObj struct
constant createdAt1 (line 47) | createdAt1 = "2021-03-31T10:21:21-07:00"
constant createdAt2 (line 48) | createdAt2 = "2021-03-31T10:21:23-07:00"
function decode (line 84) | func decode(stdout string) ([]historyObj, error) {
function TestImageHistory (line 100) | func TestImageHistory(t *testing.T) {
FILE: cmd/nerdctl/image/image_import.go
function ImportCommand (line 35) | func ImportCommand() *cobra.Command {
function importOptions (line 51) | func importOptions(cmd *cobra.Command, args []string) (types.ImageImport...
function importAction (line 103) | func importAction(cmd *cobra.Command, args []string) error {
function imageImportShellComplete (line 127) | func imageImportShellComplete(cmd *cobra.Command, args []string, toCompl...
function hasHTTPPrefix (line 131) | func hasHTTPPrefix(s string) bool {
FILE: cmd/nerdctl/image/image_import_linux_test.go
function minimalRootfsTar (line 40) | func minimalRootfsTar(t *testing.T) *bytes.Buffer {
function TestImageImportErrors (line 48) | func TestImageImportErrors(t *testing.T) {
function TestImageImport (line 71) | func TestImageImport(t *testing.T) {
FILE: cmd/nerdctl/image/image_inspect.go
function inspectCommand (line 34) | func inspectCommand() *cobra.Command {
function InspectOptions (line 62) | func InspectOptions(cmd *cobra.Command, platform *string) (types.ImageIn...
function imageInspectAction (line 91) | func imageInspectAction(cmd *cobra.Command, args []string) error {
function imageInspectShellComplete (line 122) | func imageInspectShellComplete(cmd *cobra.Command, args []string, toComp...
FILE: cmd/nerdctl/image/image_inspect_test.go
function TestImageInspectSimpleCases (line 38) | func TestImageInspectSimpleCases(t *testing.T) {
function TestImageInspectDifferentValidReferencesForTheSameImage (line 99) | func TestImageInspectDifferentValidReferencesForTheSameImage(t *testing....
FILE: cmd/nerdctl/image/image_list.go
function ImagesCommand (line 32) | func ImagesCommand() *cobra.Command {
function listOptions (line 73) | func listOptions(cmd *cobra.Command, args []string) (*types.ImageListOpt...
function imagesAction (line 128) | func imagesAction(cmd *cobra.Command, args []string) error {
function imagesShellComplete (line 146) | func imagesShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/image/image_list_test.go
function TestImages (line 41) | func TestImages(t *testing.T) {
function TestImagesFilter (line 138) | func TestImagesFilter(t *testing.T) {
function TestImagesFilterDangling (line 290) | func TestImagesFilterDangling(t *testing.T) {
function TestImagesKubeWithKubeHideDupe (line 331) | func TestImagesKubeWithKubeHideDupe(t *testing.T) {
FILE: cmd/nerdctl/image/image_load.go
function LoadCommand (line 29) | func LoadCommand() *cobra.Command {
function processLoadCommandFlags (line 53) | func processLoadCommandFlags(cmd *cobra.Command) (types.ImageLoadOptions...
function loadAction (line 85) | func loadAction(cmd *cobra.Command, _ []string) error {
FILE: cmd/nerdctl/image/image_load_test.go
function TestLoadStdinFromPipe (line 36) | func TestLoadStdinFromPipe(t *testing.T) {
function TestLoadStdinEmpty (line 75) | func TestLoadStdinEmpty(t *testing.T) {
function TestLoadQuiet (line 88) | func TestLoadQuiet(t *testing.T) {
FILE: cmd/nerdctl/image/image_prune.go
function pruneCommand (line 30) | func pruneCommand() *cobra.Command {
function pruneOptions (line 46) | func pruneOptions(cmd *cobra.Command) (types.ImagePruneOptions, error) {
function imagePruneAction (line 78) | func imagePruneAction(cmd *cobra.Command, _ []string) error {
FILE: cmd/nerdctl/image/image_prune_test.go
function TestImagePrune (line 36) | func TestImagePrune(t *testing.T) {
FILE: cmd/nerdctl/image/image_pull.go
function PullCommand (line 31) | func PullCommand() *cobra.Command {
function processPullCommandFlags (line 75) | func processPullCommandFlags(cmd *cobra.Command) (types.ImagePullOptions...
function pullAction (line 138) | func pullAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/image/image_pull_linux_test.go
function TestImagePullWithCosign (line 37) | func TestImagePullWithCosign(t *testing.T) {
function TestImagePullPlainHttpWithDefaultPort (line 113) | func TestImagePullPlainHttpWithDefaultPort(t *testing.T) {
function TestImagePullSoci (line 161) | func TestImagePullSoci(t *testing.T) {
function TestImagePullProcessOutput (line 253) | func TestImagePullProcessOutput(t *testing.T) {
FILE: cmd/nerdctl/image/image_push.go
constant allowNonDistFlag (line 30) | allowNonDistFlag = "allow-nondistributable-artifacts"
function PushCommand (line 33) | func PushCommand() *cobra.Command {
function pushOptions (line 75) | func pushOptions(cmd *cobra.Command) (types.ImagePushOptions, error) {
function pushAction (line 131) | func pushAction(cmd *cobra.Command, args []string) error {
function pushShellComplete (line 147) | func pushShellComplete(cmd *cobra.Command, args []string, toComplete str...
function signOptions (line 152) | func signOptions(cmd *cobra.Command) (opt types.ImageSignOptions, err er...
function sociOptions (line 165) | func sociOptions(cmd *cobra.Command) (opt types.SociOptions, err error) {
FILE: cmd/nerdctl/image/image_push_linux_test.go
function TestPush (line 36) | func TestPush(t *testing.T) {
FILE: cmd/nerdctl/image/image_remove.go
function RmiCommand (line 29) | func RmiCommand() *cobra.Command {
function removeOptions (line 45) | func removeOptions(cmd *cobra.Command) (types.ImageRemoveOptions, error) {
function rmiAction (line 68) | func rmiAction(cmd *cobra.Command, args []string) error {
function rmiShellComplete (line 83) | func rmiShellComplete(cmd *cobra.Command, args []string, toComplete stri...
FILE: cmd/nerdctl/image/image_remove_test.go
function TestRemove (line 36) | func TestRemove(t *testing.T) {
function TestIssue3016 (line 311) | func TestIssue3016(t *testing.T) {
function TestRemoveKubeWithKubeHideDupe (line 356) | func TestRemoveKubeWithKubeHideDupe(t *testing.T) {
FILE: cmd/nerdctl/image/image_save.go
function SaveCommand (line 33) | func SaveCommand() *cobra.Command {
function saveOptions (line 56) | func saveOptions(cmd *cobra.Command) (types.ImageSaveOptions, error) {
function saveAction (line 78) | func saveAction(cmd *cobra.Command, args []string) error {
function saveShellComplete (line 112) | func saveShellComplete(cmd *cobra.Command, args []string, toComplete str...
FILE: cmd/nerdctl/image/image_save_test.go
function TestSaveContent (line 38) | func TestSaveContent(t *testing.T) {
function TestSave (line 69) | func TestSave(t *testing.T) {
function TestSaveMultipleImagesWithSameIDAndLoad (line 147) | func TestSaveMultipleImagesWithSameIDAndLoad(t *testing.T) {
FILE: cmd/nerdctl/image/image_tag.go
function TagCommand (line 29) | func TagCommand() *cobra.Command {
function tagAction (line 42) | func tagAction(cmd *cobra.Command, args []string) error {
function tagShellComplete (line 63) | func tagShellComplete(cmd *cobra.Command, args []string, toComplete stri...
FILE: cmd/nerdctl/image/image_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/inspect/inspect.go
function Command (line 40) | func Command() *cobra.Command {
function addInspectFlags (line 61) | func addInspectFlags(cmd *cobra.Command) {
function inspectAction (line 78) | func inspectAction(cmd *cobra.Command, args []string) error {
function inspectShellComplete (line 186) | func inspectShellComplete(cmd *cobra.Command, args []string, toComplete ...
FILE: cmd/nerdctl/inspect/inspect_test.go
function TestMain (line 33) | func TestMain(m *testing.M) {
function TestInspectSimpleCase (line 37) | func TestInspectSimpleCase(t *testing.T) {
FILE: cmd/nerdctl/internal/internal.go
function Command (line 23) | func Command() *cobra.Command {
FILE: cmd/nerdctl/internal/internal_oci_hook.go
function newInternalOCIHookCommandCommand (line 30) | func newInternalOCIHookCommandCommand() *cobra.Command {
function internalOCIHookAction (line 41) | func internalOCIHookAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/ipfs/ipfs.go
function NewIPFSCommand (line 25) | func NewIPFSCommand() *cobra.Command {
FILE: cmd/nerdctl/ipfs/ipfs_compose_linux_test.go
function TestIPFSCompNoBuild (line 41) | func TestIPFSCompNoBuild(t *testing.T) {
function subtestTestIPFSCompNoB (line 86) | func subtestTestIPFSCompNoB(t *testing.T, stargz bool, byAddr bool) *tes...
function TestIPFSCompBuild (line 190) | func TestIPFSCompBuild(t *testing.T) {
function composeUP (line 272) | func composeUP(data test.Data, helpers test.Helpers, dockerComposeYAML s...
FILE: cmd/nerdctl/ipfs/ipfs_kubo_linux_test.go
function TestIPFSAddrWithKubo (line 33) | func TestIPFSAddrWithKubo(t *testing.T) {
FILE: cmd/nerdctl/ipfs/ipfs_registry.go
function newIPFSRegistryCommand (line 25) | func newIPFSRegistryCommand() *cobra.Command {
FILE: cmd/nerdctl/ipfs/ipfs_registry_linux_test.go
function pushToIPFS (line 38) | func pushToIPFS(helpers test.Helpers, name string, opts ...string) string {
function TestIPFSNerdctlRegistry (line 52) | func TestIPFSNerdctlRegistry(t *testing.T) {
FILE: cmd/nerdctl/ipfs/ipfs_registry_serve.go
constant defaultIPFSRegistry (line 28) | defaultIPFSRegistry = "localhost:5050"
constant defaultIPFSReadRetryNum (line 29) | defaultIPFSReadRetryNum = 0
constant defaultIPFSReadTimeoutDuration (line 30) | defaultIPFSReadTimeoutDuration = 0
function newIPFSRegistryServeCommand (line 33) | func newIPFSRegistryServeCommand() *cobra.Command {
function processIPFSRegistryServeOptions (line 50) | func processIPFSRegistryServeOptions(cmd *cobra.Command) (opts types.IPF...
function ipfsRegistryServeAction (line 75) | func ipfsRegistryServeAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/ipfs/ipfs_simple_linux_test.go
function TestIPFSSimple (line 31) | func TestIPFSSimple(t *testing.T) {
FILE: cmd/nerdctl/ipfs/ipfs_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/issues/issues_linux_test.go
function TestIssue3425 (line 33) | func TestIssue3425(t *testing.T) {
FILE: cmd/nerdctl/issues/main_linux_test.go
function TestMain (line 29) | func TestMain(m *testing.M) {
function TestIssue108 (line 35) | func TestIssue108(t *testing.T) {
FILE: cmd/nerdctl/login/login.go
function Command (line 33) | func Command() *cobra.Command {
function loginOptions (line 48) | func loginOptions(cmd *cobra.Command) (types.LoginCommandOptions, error) {
function loginAction (line 98) | func loginAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/login/login_linux_test.go
type Client (line 41) | type Client struct
method WithInsecure (line 46) | func (ag *Client) WithInsecure(value bool) *Client {
method WithHostsDir (line 51) | func (ag *Client) WithHostsDir(hostDirs string) *Client {
method WithCredentials (line 56) | func (ag *Client) WithCredentials(username, password string) *Client {
method WithConfigPath (line 66) | func (ag *Client) WithConfigPath(value string) *Client {
method GetConfigPath (line 71) | func (ag *Client) GetConfigPath() string {
method Run (line 75) | func (ag *Client) Run(base *testutil.Base, host string) *testutil.Cmd {
function TestLoginPersistence (line 93) | func TestLoginPersistence(t *testing.T) {
function TestLoginAgainstVariants (line 202) | func TestLoginAgainstVariants(t *testing.T) {
FILE: cmd/nerdctl/login/login_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/login/logout.go
function LogoutCommand (line 27) | func LogoutCommand() *cobra.Command {
function logoutAction (line 39) | func logoutAction(cmd *cobra.Command, args []string) error {
function logoutShellComplete (line 59) | func logoutShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/main.go
function usage (line 65) | func usage(c *cobra.Command) error {
function main (line 132) | func main() {
function xmain (line 139) | func xmain() error {
function initRootCmdFlags (line 153) | func initRootCmdFlags(rootCmd *cobra.Command, tomlPath string) (*pflag.F...
function newApp (line 202) | func newApp() (*cobra.Command, error) {
FILE: cmd/nerdctl/main_linux.go
function appNeedsRootlessParentMain (line 28) | func appNeedsRootlessParentMain(cmd *cobra.Command, args []string) bool {
function addApparmorCommand (line 67) | func addApparmorCommand(rootCmd *cobra.Command) {
function resetSavedSETUID (line 76) | func resetSavedSETUID() error {
FILE: cmd/nerdctl/main_nolinux.go
function appNeedsRootlessParentMain (line 25) | func appNeedsRootlessParentMain(cmd *cobra.Command, args []string) bool {
function addApparmorCommand (line 29) | func addApparmorCommand(rootCmd *cobra.Command) {
function resetSavedSETUID (line 33) | func resetSavedSETUID() error {
FILE: cmd/nerdctl/main_test.go
function TestMain (line 32) | func TestMain(m *testing.M) {
function TestUnknownCommand (line 37) | func TestUnknownCommand(t *testing.T) {
function TestNerdctlConfig (line 84) | func TestNerdctlConfig(t *testing.T) {
FILE: cmd/nerdctl/main_test_test.go
function TestTest (line 31) | func TestTest(t *testing.T) {
FILE: cmd/nerdctl/manifest/manifest.go
function Command (line 25) | func Command() *cobra.Command {
FILE: cmd/nerdctl/manifest/manifest_annotate.go
function annotateCommand (line 28) | func annotateCommand() *cobra.Command {
function processAnnotateFlags (line 46) | func processAnnotateFlags(cmd *cobra.Command) (types.ManifestAnnotateOpt...
function annotateAction (line 84) | func annotateAction(cmd *cobra.Command, args []string) error {
function annotateShellComplete (line 96) | func annotateShellComplete(cmd *cobra.Command, args []string, toComplete...
FILE: cmd/nerdctl/manifest/manifest_annotate_linux_test.go
function TestManifestAnnotateErrors (line 29) | func TestManifestAnnotateErrors(t *testing.T) {
function TestManifestAnnotate (line 75) | func TestManifestAnnotate(t *testing.T) {
FILE: cmd/nerdctl/manifest/manifest_create.go
function createCommand (line 30) | func createCommand() *cobra.Command {
function processCreateFlags (line 45) | func processCreateFlags(cmd *cobra.Command) (types.ManifestCreateOptions...
function createAction (line 66) | func createAction(cmd *cobra.Command, args []string) error {
function createShellComplete (line 85) | func createShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/manifest/manifest_create_linux_test.go
function TestManifestCreateErrors (line 30) | func TestManifestCreateErrors(t *testing.T) {
function TestManifestCreate (line 80) | func TestManifestCreate(t *testing.T) {
FILE: cmd/nerdctl/manifest/manifest_inspect.go
function inspectCommand (line 31) | func inspectCommand() *cobra.Command {
function processInspectFlags (line 46) | func processInspectFlags(cmd *cobra.Command) (types.ManifestInspectOptio...
function inspectAction (line 67) | func inspectAction(cmd *cobra.Command, args []string) error {
function inspectShellComplete (line 93) | func inspectShellComplete(cmd *cobra.Command, args []string, toComplete ...
FILE: cmd/nerdctl/manifest/manifest_inspect_linux_test.go
constant testImageName (line 35) | testImageName = "alpine"
constant testPlatform (line 36) | testPlatform = "linux/amd64"
type testData (line 39) | type testData struct
method imageWithDigest (line 59) | func (td *testData) imageWithDigest() string {
method isAmd64Platform (line 63) | func (td *testData) isAmd64Platform(platform *ocispec.Platform) bool {
function newTestData (line 48) | func newTestData(imageName, platform string) *testData {
function TestManifestInspect (line 69) | func TestManifestInspect(t *testing.T) {
FILE: cmd/nerdctl/manifest/manifest_push.go
function pushCommand (line 28) | func pushCommand() *cobra.Command {
function processPushFlags (line 43) | func processPushFlags(cmd *cobra.Command) (types.ManifestPushOptions, er...
function pushAction (line 66) | func pushAction(cmd *cobra.Command, args []string) error {
function pushShellComplete (line 78) | func pushShellComplete(cmd *cobra.Command, args []string, toComplete str...
FILE: cmd/nerdctl/manifest/manifest_push_linux_test.go
function TestManifestPushErrors (line 33) | func TestManifestPushErrors(t *testing.T) {
function TestManifestPush (line 64) | func TestManifestPush(t *testing.T) {
FILE: cmd/nerdctl/manifest/manifest_remove.go
function removeCommand (line 29) | func removeCommand() *cobra.Command {
function removeAction (line 42) | func removeAction(cmd *cobra.Command, refs []string) error {
function removeShellComplete (line 57) | func removeShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/manifest/manifest_remove_linux_test.go
function TestManifestsRemove (line 29) | func TestManifestsRemove(t *testing.T) {
FILE: cmd/nerdctl/manifest/manifest_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/namespace/namespace.go
function Command (line 25) | func Command() *cobra.Command {
FILE: cmd/nerdctl/namespace/namespace_create.go
function createCommand (line 28) | func createCommand() *cobra.Command {
function processNamespaceCreateCommandOption (line 42) | func processNamespaceCreateCommandOption(cmd *cobra.Command) (types.Name...
function createAction (line 57) | func createAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/namespace/namespace_inspect.go
function inspectCommand (line 29) | func inspectCommand() *cobra.Command {
function inspectOptions (line 46) | func inspectOptions(cmd *cobra.Command) (types.NamespaceInspectOptions, ...
function inspectAction (line 62) | func inspectAction(cmd *cobra.Command, args []string) error {
function namespaceInspectShellComplete (line 77) | func namespaceInspectShellComplete(cmd *cobra.Command, args []string, to...
FILE: cmd/nerdctl/namespace/namespace_list.go
function listCommand (line 28) | func listCommand() *cobra.Command {
function listOptions (line 42) | func listOptions(cmd *cobra.Command) (types.NamespaceListOptions, error) {
function listAction (line 63) | func listAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/namespace/namespace_remove.go
function removeCommand (line 29) | func removeCommand() *cobra.Command {
function removeOptions (line 44) | func removeOptions(cmd *cobra.Command) (types.NamespaceRemoveOptions, er...
function removeAction (line 60) | func removeAction(cmd *cobra.Command, args []string) error {
function namespaceRemoveShellComplete (line 75) | func namespaceRemoveShellComplete(cmd *cobra.Command, args []string, toC...
FILE: cmd/nerdctl/namespace/namespace_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/namespace/namespace_update.go
function updateCommand (line 29) | func updateCommand() *cobra.Command {
function processNamespaceUpdateCommandOption (line 44) | func processNamespaceUpdateCommandOption(cmd *cobra.Command) (types.Name...
function updateAction (line 59) | func updateAction(cmd *cobra.Command, args []string) error {
function namespaceUpdateShellComplete (line 74) | func namespaceUpdateShellComplete(cmd *cobra.Command, args []string, toC...
FILE: cmd/nerdctl/network/network.go
function Command (line 25) | func Command() *cobra.Command {
FILE: cmd/nerdctl/network/network_create.go
function createCommand (line 32) | func createCommand() *cobra.Command {
function createAction (line 58) | func createAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/network/network_create_linux_test.go
function TestNetworkCreate (line 37) | func TestNetworkCreate(t *testing.T) {
function TestNetworkCreateICC (line 164) | func TestNetworkCreateICC(t *testing.T) {
FILE: cmd/nerdctl/network/network_create_unix.go
constant DefaultNetworkDriver (line 21) | DefaultNetworkDriver = "bridge"
FILE: cmd/nerdctl/network/network_create_windows.go
constant DefaultNetworkDriver (line 19) | DefaultNetworkDriver = "nat"
FILE: cmd/nerdctl/network/network_inspect.go
function inspectCommand (line 29) | func inspectCommand() *cobra.Command {
function inspectAction (line 50) | func inspectAction(cmd *cobra.Command, args []string) error {
function networkInspectShellComplete (line 81) | func networkInspectShellComplete(cmd *cobra.Command, args []string, toCo...
FILE: cmd/nerdctl/network/network_inspect_test.go
function TestNetworkInspect (line 40) | func TestNetworkInspect(t *testing.T) {
FILE: cmd/nerdctl/network/network_list.go
function listCommand (line 27) | func listCommand() *cobra.Command {
function listAction (line 46) | func listAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/network/network_list_linux_test.go
function TestNetworkLsFilter (line 31) | func TestNetworkLsFilter(t *testing.T) {
FILE: cmd/nerdctl/network/network_prune.go
function pruneCommand (line 33) | func pruneCommand() *cobra.Command {
function pruneAction (line 46) | func pruneAction(cmd *cobra.Command, _ []string) error {
FILE: cmd/nerdctl/network/network_prune_linux_test.go
function TestNetworkPrune (line 29) | func TestNetworkPrune(t *testing.T) {
FILE: cmd/nerdctl/network/network_remove.go
function removeCommand (line 30) | func removeCommand() *cobra.Command {
function removeAction (line 45) | func removeAction(cmd *cobra.Command, args []string) error {
function networkRmShellComplete (line 66) | func networkRmShellComplete(cmd *cobra.Command, args []string, toComplet...
FILE: cmd/nerdctl/network/network_remove_linux_test.go
function TestNetworkRemove (line 33) | func TestNetworkRemove(t *testing.T) {
FILE: cmd/nerdctl/network/network_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/search/search.go
function Command (line 27) | func Command() *cobra.Command {
function processSearchFlags (line 46) | func processSearchFlags(cmd *cobra.Command) (types.SearchOptions, error) {
function runSearch (line 79) | func runSearch(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/search/search_linux_test.go
function TestSearch (line 46) | func TestSearch(t *testing.T) {
function TestSearchWithFilter (line 153) | func TestSearchWithFilter(t *testing.T) {
function TestSearchFilterErrors (line 194) | func TestSearchFilterErrors(t *testing.T) {
FILE: cmd/nerdctl/search/search_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/system/system.go
function Command (line 25) | func Command() *cobra.Command {
FILE: cmd/nerdctl/system/system_events.go
function EventsCommand (line 28) | func EventsCommand() *cobra.Command {
function eventsOptions (line 48) | func eventsOptions(cmd *cobra.Command) (types.SystemEventsOptions, error) {
function eventsAction (line 69) | func eventsAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/system/system_events_linux_test.go
function testEventFilterExecutor (line 31) | func testEventFilterExecutor(data test.Data, helpers test.Helpers) test....
function TestEventFilters (line 41) | func TestEventFilters(t *testing.T) {
FILE: cmd/nerdctl/system/system_info.go
function InfoCommand (line 28) | func InfoCommand() *cobra.Command {
function infoOptions (line 48) | func infoOptions(cmd *cobra.Command) (types.SystemInfoOptions, error) {
function infoAction (line 71) | func infoAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/system/system_info_test.go
function testInfoComparator (line 38) | func testInfoComparator(stdout string, t tig.T) {
function TestInfo (line 46) | func TestInfo(t *testing.T) {
FILE: cmd/nerdctl/system/system_prune.go
function pruneCommand (line 35) | func pruneCommand() *cobra.Command {
function pruneOptions (line 50) | func pruneOptions(cmd *cobra.Command) (types.SystemPruneOptions, error) {
function grantSystemPrunePermission (line 83) | func grantSystemPrunePermission(cmd *cobra.Command, options types.System...
function pruneAction (line 120) | func pruneAction(cmd *cobra.Command, _ []string) error {
FILE: cmd/nerdctl/system/system_prune_linux_test.go
function TestSystemPrune (line 35) | func TestSystemPrune(t *testing.T) {
FILE: cmd/nerdctl/system/system_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: cmd/nerdctl/version.go
function versionCommand (line 38) | func versionCommand() *cobra.Command {
function versionAction (line 54) | func versionAction(cmd *cobra.Command, args []string) error {
function versionInfo (line 121) | func versionInfo(cmd *cobra.Command, ns, address string) (dockercompat.V...
FILE: cmd/nerdctl/volume/volume.go
function Command (line 25) | func Command() *cobra.Command {
FILE: cmd/nerdctl/volume/volume_create.go
function createCommand (line 31) | func createCommand() *cobra.Command {
function createOptions (line 44) | func createOptions(cmd *cobra.Command) (types.VolumeCreateOptions, error) {
function createAction (line 66) | func createAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/volume/volume_create_test.go
function TestVolumeCreate (line 31) | func TestVolumeCreate(t *testing.T) {
FILE: cmd/nerdctl/volume/volume_inspect.go
function inspectCommand (line 28) | func inspectCommand() *cobra.Command {
function inspectOptions (line 46) | func inspectOptions(cmd *cobra.Command) (types.VolumeInspectOptions, err...
function inspectAction (line 67) | func inspectAction(cmd *cobra.Command, args []string) error {
function volumeInspectShellComplete (line 75) | func volumeInspectShellComplete(cmd *cobra.Command, args []string, toCom...
FILE: cmd/nerdctl/volume/volume_inspect_test.go
function createFileWithSize (line 39) | func createFileWithSize(mountPoint string, size int64) error {
function TestVolumeInspect (line 46) | func TestVolumeInspect(t *testing.T) {
FILE: cmd/nerdctl/volume/volume_list.go
function listCommand (line 27) | func listCommand() *cobra.Command {
function listOptions (line 48) | func listOptions(cmd *cobra.Command) (types.VolumeListOptions, error) {
function listAction (line 79) | func listAction(cmd *cobra.Command, args []string) error {
FILE: cmd/nerdctl/volume/volume_list_test.go
function TestVolumeLsSize (line 35) | func TestVolumeLsSize(t *testing.T) {
function TestVolumeLsFilter (line 93) | func TestVolumeLsFilter(t *testing.T) {
FILE: cmd/nerdctl/volume/volume_namespace_test.go
function TestVolumeNamespace (line 31) | func TestVolumeNamespace(t *testing.T) {
FILE: cmd/nerdctl/volume/volume_prune.go
function pruneCommand (line 31) | func pruneCommand() *cobra.Command {
function pruneOptions (line 45) | func pruneOptions(cmd *cobra.Command) (types.VolumePruneOptions, error) {
function pruneAction (line 70) | func pruneAction(cmd *cobra.Command, _ []string) error {
FILE: cmd/nerdctl/volume/volume_prune_linux_test.go
function TestVolumePrune (line 31) | func TestVolumePrune(t *testing.T) {
FILE: cmd/nerdctl/volume/volume_remove.go
function removeCommand (line 29) | func removeCommand() *cobra.Command {
function removeOptions (line 45) | func removeOptions(cmd *cobra.Command) (types.VolumeRemoveOptions, error) {
function removeAction (line 61) | func removeAction(cmd *cobra.Command, args []string) error {
function removeShellComplete (line 76) | func removeShellComplete(cmd *cobra.Command, args []string, toComplete s...
FILE: cmd/nerdctl/volume/volume_remove_linux_test.go
function TestVolumeRemove (line 38) | func TestVolumeRemove(t *testing.T) {
FILE: cmd/nerdctl/volume/volume_test.go
function TestMain (line 25) | func TestMain(m *testing.M) {
FILE: examples/nerdctl-as-a-library/run-container/main.go
function main (line 34) | func main() {
FILE: mod/tigron/expect/comparators.go
function All (line 31) | func All(comparators ...test.Comparator) test.Comparator {
function Contains (line 43) | func Contains(compare string, more ...string) test.Comparator {
function DoesNotContain (line 56) | func DoesNotContain(compare string, more ...string) test.Comparator {
function Equals (line 79) | func Equals(compare string) test.Comparator {
function Match (line 87) | func Match(reg *regexp.Regexp) test.Comparator {
function DoesNotMatch (line 95) | func DoesNotMatch(reg *regexp.Regexp) test.Comparator {
function JSON (line 104) | func JSON[T any](obj T, verifier func(T, tig.T)) test.Comparator {
FILE: mod/tigron/expect/comparators_test.go
function TestExpect (line 32) | func TestExpect(t *testing.T) {
FILE: mod/tigron/expect/exit.go
constant ExitCodeSuccess (line 21) | ExitCodeSuccess = 0
constant ExitCodeSigkill (line 23) | ExitCodeSigkill = 137
constant ExitCodeGenericFail (line 26) | ExitCodeGenericFail = -10
constant ExitCodeNoCheck (line 28) | ExitCodeNoCheck = -11
constant ExitCodeTimeout (line 30) | ExitCodeTimeout = -12
constant ExitCodeSignaled (line 32) | ExitCodeSignaled = -13
FILE: mod/tigron/internal/assertive/assertive.go
constant markLineLength (line 35) | markLineLength = 20
constant expectedSuccessDecorator (line 36) | expectedSuccessDecorator = "✅️ does verify:\t\t"
constant expectedFailDecorator (line 37) | expectedFailDecorator = "❌ FAILED!\t\t"
constant receivedDecorator (line 38) | receivedDecorator = "👀 testing:\t\t"
constant annotationDecorator (line 39) | annotationDecorator = "🖊️"
constant hyperlinkDecorator (line 40) | hyperlinkDecorator = "🔗"
function ErrorIsNil (line 44) | func ErrorIsNil(testing tig.T, err error, msg ...string) {
function ErrorIs (line 51) | func ErrorIs(testing tig.T, err, expected error, msg ...string) {
function IsEqual (line 58) | func IsEqual[T comparable](testing tig.T, actual, expected T, msg ...str...
function IsNotEqual (line 65) | func IsNotEqual[T comparable](testing tig.T, actual, expected T, msg ......
function Contains (line 72) | func Contains(testing tig.T, actual, contains string, msg ...string) {
function DoesNotContain (line 84) | func DoesNotContain(testing tig.T, actual, contains string, msg ...strin...
function HasSuffix (line 96) | func HasSuffix(testing tig.T, actual, suffix string, msg ...string) {
function HasPrefix (line 108) | func HasPrefix(testing tig.T, actual, prefix string, msg ...string) {
function Match (line 120) | func Match(testing tig.T, actual string, reg *regexp.Regexp, msg ...stri...
function DoesNotMatch (line 127) | func DoesNotMatch(testing tig.T, actual string, reg *regexp.Regexp, msg ...
function IsLessThan (line 134) | func IsLessThan[T ~int | ~float64 | time.Duration](
function IsMoreThan (line 145) | func IsMoreThan[T ~int | ~float64 | time.Duration](
function True (line 156) | func True(testing tig.T, comp bool, msg ...string) bool {
function WithFailLater (line 168) | func WithFailLater(t tig.T) tig.T {
function WithSilentSuccess (line 178) | func WithSilentSuccess(t tig.T) tig.T {
type failLater (line 184) | type failLater struct
type silentSuccess (line 187) | type silentSuccess struct
function evaluate (line 191) | func evaluate(testing tig.T, isSuccess bool, actual, expected any, msg ....
function decorate (line 205) | func decorate(testing tig.T, isSuccess bool, actual, expected any, msg ....
function getTopFrameFile (line 246) | func getTopFrameFile() string {
FILE: mod/tigron/internal/assertive/assertive_test.go
function TestAssertivePass (line 33) | func TestAssertivePass(t *testing.T) {
function TestAssertiveFailBehavior (line 96) | func TestAssertiveFailBehavior(t *testing.T) {
function TestAssertiveFailLater (line 169) | func TestAssertiveFailLater(t *testing.T) {
function TestAssertiveSilentSuccess (line 186) | func TestAssertiveSilentSuccess(t *testing.T) {
FILE: mod/tigron/internal/com/command.go
constant defaultTimeout (line 34) | defaultTimeout = 10 * time.Second
constant delayAfterWait (line 35) | delayAfterWait = 100 * time.Millisecond
type contextKey (line 61) | type contextKey
constant LoggerKey (line 64) | LoggerKey = contextKey("logger")
type Result (line 67) | type Result struct
type execution (line 76) | type execution struct
type Command (line 87) | type Command struct
method Clone (line 113) | func (gc *Command) Clone() *Command {
method WithPTY (line 144) | func (gc *Command) WithPTY(stdin, stdout, stderr bool) {
method WithFeeder (line 154) | func (gc *Command) WithFeeder(writers ...func() io.Reader) {
method Feed (line 161) | func (gc *Command) Feed(reader io.Reader) {
method Run (line 169) | func (gc *Command) Run(parentCtx context.Context) error {
method Wait (line 273) | func (gc *Command) Wait() (*Result, error) {
method Signal (line 305) | func (gc *Command) Signal(sig os.Signal) error {
method wrap (line 321) | func (gc *Command) wrap() error {
method buildCommand (line 382) | func (gc *Command) buildCommand(ctx context.Context) *exec.Cmd {
FILE: mod/tigron/internal/com/command_other.go
function addAttr (line 26) | func addAttr(cmd *exec.Cmd) func() error {
FILE: mod/tigron/internal/com/command_test.go
constant windows (line 37) | windows = "windows"
function TestFaultyDoubleRunWait (line 41) | func TestFaultyDoubleRunWait(t *testing.T) {
function TestFaultyRunDoubleWait (line 67) | func TestFaultyRunDoubleWait(t *testing.T) {
function TestFailRun (line 96) | func TestFailRun(t *testing.T) {
function TestBasicRunWait (line 126) | func TestBasicRunWait(t *testing.T) {
function TestBasicFail (line 146) | func TestBasicFail(t *testing.T) {
function TestWorkingDir (line 166) | func TestWorkingDir(t *testing.T) {
function TestEnvBlacklist (line 194) | func TestEnvBlacklist(t *testing.T) {
function TestEnvWhiteList (line 282) | func TestEnvWhiteList(t *testing.T) {
function TestEnvBlacklistWhiteList (line 327) | func TestEnvBlacklistWhiteList(t *testing.T) {
function TestEnvAdd (line 355) | func TestEnvAdd(t *testing.T) {
function TestStdoutStderr (line 391) | func TestStdoutStderr(t *testing.T) {
function TestTimeoutPlain (line 411) | func TestTimeoutPlain(t *testing.T) {
function TestTimeoutDelayed (line 439) | func TestTimeoutDelayed(t *testing.T) {
function TestPTYStdout (line 470) | func TestPTYStdout(t *testing.T) {
function TestPTYStderr (line 501) | func TestPTYStderr(t *testing.T) {
function TestPTYBoth (line 532) | func TestPTYBoth(t *testing.T) {
function TestWriteStdin (line 561) | func TestWriteStdin(t *testing.T) {
function TestWritePTYStdin (line 593) | func TestWritePTYStdin(t *testing.T) {
function TestSignalOnCompleted (line 628) | func TestSignalOnCompleted(t *testing.T) {
function TestSignalNormal (line 674) | func TestSignalNormal(t *testing.T) {
FILE: mod/tigron/internal/com/command_windows.go
function addAttr (line 23) | func addAttr(_ *exec.Cmd) func() error {
FILE: mod/tigron/internal/com/package_benchmark_test.go
function BenchmarkCommandParallel (line 38) | func BenchmarkCommandParallel(b *testing.B) {
FILE: mod/tigron/internal/com/package_example_test.go
function ExampleCommand (line 31) | func ExampleCommand() {
function ExampleCommand_Signal (line 65) | func ExampleCommand_Signal() {
function ExampleCommand_WithPTY (line 105) | func ExampleCommand_WithPTY() {
function ExampleCommand_Feed (line 148) | func ExampleCommand_Feed() {
function ExampleErrTimeout (line 196) | func ExampleErrTimeout() {
function ExampleErrFailedStarting (line 227) | func ExampleErrFailedStarting() {
function ExampleErrExecutionFailed (line 243) | func ExampleErrExecutionFailed() {
FILE: mod/tigron/internal/com/package_test.go
function TestMain (line 27) | func TestMain(m *testing.M) {
FILE: mod/tigron/internal/com/pipes.go
type pipe (line 42) | type pipe struct
type stdPipes (line 47) | type stdPipes struct
method closeCallee (line 57) | func (pipes *stdPipes) closeCallee() {
method closeCaller (line 86) | func (pipes *stdPipes) closeCaller() {
function newStdPipes (line 109) | func newStdPipes(
FILE: mod/tigron/internal/exit.go
constant ExitCodeSuccess (line 21) | ExitCodeSuccess = 0
constant ExitCodeGenericFail (line 22) | ExitCodeGenericFail = -10
constant ExitCodeNoCheck (line 23) | ExitCodeNoCheck = -11
constant ExitCodeTimeout (line 24) | ExitCodeTimeout = -12
constant ExitCodeSignaled (line 25) | ExitCodeSignaled = -13
FILE: mod/tigron/internal/formatter/formatter.go
constant maxLineLength (line 27) | maxLineLength = 110
constant maxLines (line 28) | maxLines = 50
constant kMaxLength (line 29) | kMaxLength = 7
constant spacer (line 30) | spacer = " "
function Table (line 36) | func Table(data [][]any, mark string) string {
function chunk (line 63) | func chunk(s string, maxLength, maxLines int) []string {
FILE: mod/tigron/internal/formatter/osc8.go
type OSC8 (line 22) | type OSC8 struct
method String (line 28) | func (o *OSC8) String() string {
FILE: mod/tigron/internal/highk/fileleak.go
function SnapshotOpenFiles (line 40) | func SnapshotOpenFiles(file *os.File) ([]byte, error) {
function Diff (line 63) | func Diff(one, two string) []string {
FILE: mod/tigron/internal/highk/goroutines.go
function FindGoRoutines (line 26) | func FindGoRoutines() error {
FILE: mod/tigron/internal/logger/logger.go
type Logger (line 24) | type Logger interface
type ConcreteLogger (line 30) | type ConcreteLogger struct
method Set (line 36) | func (cl *ConcreteLogger) Set(key, value string) *ConcreteLogger {
method Log (line 44) | func (cl *ConcreteLogger) Log(args ...any) {
method Helper (line 55) | func (cl *ConcreteLogger) Helper() {
function NewLogger (line 62) | func NewLogger(logger Logger) *ConcreteLogger {
FILE: mod/tigron/internal/mimicry/mimicry.go
constant callStackMaxDepth (line 26) | callStackMaxDepth = 5
type Mocked (line 31) | type Mocked interface
type Consumer (line 41) | type Consumer interface
type Designer (line 48) | type Designer interface
type Core (line 54) | type Core struct
method Reset (line 60) | func (mi *Core) Reset() {
method Report (line 65) | func (mi *Core) Report(fun any) []*Call {
method Retrieve (line 81) | func (mi *Core) Retrieve(args ...any) any {
method Register (line 130) | func (mi *Core) Register(fun, handler any) {
function getFunID (line 138) | func getFunID(fun any) string {
FILE: mod/tigron/internal/mimicry/print.go
constant maxLineLength (line 27) | maxLineLength = 110
constant sourceLineAround (line 28) | sourceLineAround = 2
constant breakpointDecorator (line 29) | breakpointDecorator = "🔴"
constant frameDecorator (line 30) | frameDecorator = "⬆️"
function PrintCall (line 34) | func PrintCall(call *Call) string {
FILE: mod/tigron/internal/mimicry/stack.go
constant hyperlinkDecorator (line 32) | hyperlinkDecorator = "🔗"
constant intoDecorator (line 33) | intoDecorator = "↪"
type Call (line 39) | type Call struct
type Frame (line 46) | type Frame struct
method String (line 56) | func (f *Frame) String() string {
method Excerpt (line 86) | func (f *Frame) Excerpt(add int, marker string) string {
function isStd (line 128) | func isStd(in string) bool {
FILE: mod/tigron/internal/mocks/t.go
type T (line 28) | type T interface
type THelperIn (line 34) | type THelperIn struct
type THelperOut (line 35) | type THelperOut struct
type TFailIn (line 37) | type TFailIn struct
type TFailOut (line 38) | type TFailOut struct
type TFailNowIn (line 40) | type TFailNowIn struct
type TFailNowOut (line 41) | type TFailNowOut struct
type TLogIn (line 43) | type TLogIn
type TLogOut (line 44) | type TLogOut struct
type TNameIn (line 46) | type TNameIn struct
type TTempDirIn (line 49) | type TTempDirIn struct
type TSkipIn (line 52) | type TSkipIn
type TSkipOut (line 53) | type TSkipOut struct
type MockT (line 56) | type MockT struct
method Helper (line 60) | func (m *MockT) Helper() {
method FailNow (line 66) | func (m *MockT) FailNow() {
method Fail (line 72) | func (m *MockT) Fail() {
method Log (line 78) | func (m *MockT) Log(args ...any) {
method Name (line 84) | func (m *MockT) Name() string {
method TempDir (line 92) | func (m *MockT) TempDir() string {
method Skip (line 100) | func (m *MockT) Skip(args ...any) {
FILE: mod/tigron/internal/pty/pty.go
function Open (line 38) | func Open() (pty, tty *os.File, err error) {
FILE: mod/tigron/require/requirement.go
function Binary (line 28) | func Binary(name string) *test.Requirement {
function OS (line 44) | func OS(os string) *test.Requirement {
function Arch (line 53) | func Arch(arch string) *test.Requirement {
function Not (line 77) | func Not(requirement *test.Requirement) *test.Requirement {
function All (line 88) | func All(requirements ...*test.Requirement) *test.Requirement {
FILE: mod/tigron/require/requirement_test.go
constant darwin (line 28) | darwin = "darwin"
constant windows (line 29) | windows = "windows"
constant linux (line 30) | linux = "linux"
function TestRequire (line 33) | func TestRequire(t *testing.T) {
function TestNot (line 63) | func TestNot(t *testing.T) {
function TestAllSuccess (line 82) | func TestAllSuccess(t *testing.T) {
function TestAllOneFail (line 105) | func TestAllOneFail(t *testing.T) {
FILE: mod/tigron/test/case.go
type Case (line 34) | type Case struct
method Run (line 81) | func (test *Case) Run(t *testing.T) {
constant startDecorator (line 72) | startDecorator = "🚀"
constant cleanDecorator (line 73) | cleanDecorator = "🧽"
constant setupDecorator (line 74) | setupDecorator = "🏗"
constant subinDecorator (line 75) | subinDecorator = "⤵️"
constant suboutDecorator (line 76) | suboutDecorator = "↩️"
constant tempDecorator (line 77) | tempDecorator = "⏳"
FILE: mod/tigron/test/command.go
constant defaultExecutionTimeout (line 36) | defaultExecutionTimeout = 3 * time.Minute
constant commandDecorator (line 37) | commandDecorator = "⚙️"
constant errorDecorator (line 38) | errorDecorator = "🚫"
constant exitDecorator (line 39) | exitDecorator = "⚠️"
constant stdoutDecorator (line 40) | stdoutDecorator = "🟢"
constant stderrDecorator (line 41) | stderrDecorator = "🟠"
constant timeoutDecorator (line 42) | timeoutDecorator = "⏰"
constant cwdDecorator (line 43) | cwdDecorator = "📁"
constant envDecorator (line 44) | envDecorator = "🌱"
constant sigDecorator (line 45) | sigDecorator = "⚡"
type CustomizableCommand (line 54) | type CustomizableCommand interface
function NewGenericCommand (line 87) | func NewGenericCommand() CustomizableCommand {
type GenericCommand (line 100) | type GenericCommand struct
method WithBinary (line 113) | func (gc *GenericCommand) WithBinary(binary string) {
method WithArgs (line 117) | func (gc *GenericCommand) WithArgs(args ...string) {
method WithWrapper (line 121) | func (gc *GenericCommand) WithWrapper(binary string, args ...string) {
method WithPseudoTTY (line 126) | func (gc *GenericCommand) WithPseudoTTY() {
method Feed (line 130) | func (gc *GenericCommand) Feed(r io.Reader) {
method Setenv (line 134) | func (gc *GenericCommand) Setenv(key, value string) {
method WithFeeder (line 138) | func (gc *GenericCommand) WithFeeder(fun func() io.Reader) {
method WithCwd (line 142) | func (gc *GenericCommand) WithCwd(path string) {
method WithBlacklist (line 146) | func (gc *GenericCommand) WithBlacklist(env []string) {
method WithWhitelist (line 150) | func (gc *GenericCommand) WithWhitelist(env []string) {
method WithTimeout (line 154) | func (gc *GenericCommand) WithTimeout(timeout time.Duration) {
method PrependArgs (line 158) | func (gc *GenericCommand) PrependArgs(args ...string) {
method Background (line 162) | func (gc *GenericCommand) Background() {
method Signal (line 168) | func (gc *GenericCommand) Signal(sig os.Signal) error {
method Run (line 173) | func (gc *GenericCommand) Run(expect *Expected) {
method Stderr (line 303) | func (gc *GenericCommand) Stderr() string {
method withEnv (line 307) | func (gc *GenericCommand) withEnv(env map[string]string) {
method withTempDir (line 313) | func (gc *GenericCommand) withTempDir(path string) {
method withConfig (line 317) | func (gc *GenericCommand) withConfig(config Config) {
method Clone (line 321) | func (gc *GenericCommand) Clone() TestableCommand {
method T (line 340) | func (gc *GenericCommand) T() tig.T {
method clear (line 344) | func (gc *GenericCommand) clear() TestableCommand {
method withT (line 364) | func (gc *GenericCommand) withT(t tig.T) {
method read (line 369) | func (gc *GenericCommand) read(key ConfigKey) ConfigValue {
method write (line 373) | func (gc *GenericCommand) write(key ConfigKey, value ConfigValue) {
FILE: mod/tigron/test/config.go
function WithConfig (line 20) | func WithConfig(key ConfigKey, value ConfigValue) Config {
function configureConfig (line 28) | func configureConfig(cfg, parent Config) Config {
type config (line 44) | type config struct
method Write (line 48) | func (cfg *config) Write(key ConfigKey, value ConfigValue) Config {
method Read (line 58) | func (cfg *config) Read(key ConfigKey) ConfigValue {
method adopt (line 70) | func (cfg *config) adopt(parent Config) {
FILE: mod/tigron/test/config_test.go
function TestConfig (line 27) | func TestConfig(t *testing.T) {
FILE: mod/tigron/test/consts.go
constant FilePermissionsDefault (line 22) | FilePermissionsDefault = 0o644
constant DirPermissionsDefault (line 25) | DirPermissionsDefault = 0o755
FILE: mod/tigron/test/data.go
constant identifierMaxLength (line 33) | identifierMaxLength = 76
constant identifierSeparator (line 34) | identifierSeparator = "-"
constant identifierSignatureLength (line 35) | identifierSignatureLength = 8
function WithLabels (line 39) | func WithLabels(in map[string]string) Data {
type labels (line 50) | type labels struct
method Get (line 54) | func (lb *labels) Get(key string) string {
method Set (line 58) | func (lb *labels) Set(key, value string) {
type temp (line 62) | type temp struct
method Load (line 67) | func (tp *temp) Load(key ...string) string {
method Exists (line 84) | func (tp *temp) Exists(key ...string) {
method Save (line 98) | func (tp *temp) Save(value string, key ...string) string {
method SaveToWriter (line 120) | func (tp *temp) SaveToWriter(writer func(file io.Writer) error, key .....
method Dir (line 155) | func (tp *temp) Dir(key ...string) string {
method Path (line 170) | func (tp *temp) Path(key ...string) string {
type data (line 176) | type data struct
method Identifier (line 182) | func (dt *data) Identifier(suffix ...string) string {
method Labels (line 186) | func (dt *data) Labels() DataLabels {
method Temp (line 190) | func (dt *data) Temp() DataTemp {
function newData (line 197) | func newData(t tig.T, seed, parent Data) Data {
function defaultIdentifierHashing (line 250) | func defaultIdentifierHashing(names ...string) string {
FILE: mod/tigron/test/data_test.go
function TestLabels (line 27) | func TestLabels(t *testing.T) {
function TestTemp (line 42) | func TestTemp(t *testing.T) {
function TestDataIdentifier (line 62) | func TestDataIdentifier(t *testing.T) {
function TestDataIdentifierThatIsReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLong (line 77) | func TestDataIdentifierThatIsReallyReallyReallyReallyReallyReallyReallyR...
FILE: mod/tigron/test/expected.go
function Command (line 21) | func Command(args ...string) Executor {
function Expects (line 29) | func Expects(exitCode int, errors []error, output Comparator) Manager {
FILE: mod/tigron/test/funct.go
type Evaluator (line 24) | type Evaluator
type Butler (line 28) | type Butler
type Comparator (line 35) | type Comparator
type Manager (line 38) | type Manager
type Executor (line 41) | type Executor
FILE: mod/tigron/test/helpers.go
type helpersInternal (line 26) | type helpersInternal struct
method Ensure (line 33) | func (help *helpersInternal) Ensure(args ...string) {
method Anyhow (line 41) | func (help *helpersInternal) Anyhow(args ...string) {
method Fail (line 49) | func (help *helpersInternal) Fail(args ...string) {
method Capture (line 57) | func (help *helpersInternal) Capture(args ...string) string {
method Err (line 71) | func (help *helpersInternal) Err(args ...string) string {
method Command (line 80) | func (help *helpersInternal) Command(args ...string) TestableCommand {
method Custom (line 89) | func (help *helpersInternal) Custom(binary string, args ...string) Tes...
method Read (line 97) | func (help *helpersInternal) Read(key ConfigKey) ConfigValue {
method Write (line 101) | func (help *helpersInternal) Write(key ConfigKey, value ConfigValue) {
method T (line 105) | func (help *helpersInternal) T() tig.T {
FILE: mod/tigron/test/interfaces.go
type DataLabels (line 29) | type DataLabels interface
type DataTemp (line 37) | type DataTemp interface
type Data (line 64) | type Data interface
type Helpers (line 72) | type Helpers interface
type TestableCommand (line 104) | type TestableCommand interface
type Config (line 142) | type Config interface
FILE: mod/tigron/test/package_test.go
function TestMain (line 27) | func TestMain(m *testing.M) {
FILE: mod/tigron/test/test.go
type Testable (line 24) | type Testable interface
function Customize (line 35) | func Customize(testable Testable) {
FILE: mod/tigron/test/types.go
type ConfigKey (line 21) | type ConfigKey
type ConfigValue (line 23) | type ConfigValue
type Requirement (line 28) | type Requirement struct
type Expected (line 41) | type Expected struct
FILE: mod/tigron/tig/t.go
type T (line 33) | type T interface
FILE: mod/tigron/utils/testca/ca.go
constant keyLength (line 39) | keyLength = 4096
constant caRoot (line 40) | caRoot = "ca"
constant certsRoot (line 41) | certsRoot = "certs"
constant organization (line 42) | organization = "tigron volatile testing organization"
constant lifetime (line 43) | lifetime = 24 * time.Hour
constant serialSize (line 44) | serialSize = 60
function NewX509 (line 50) | func NewX509(data test.Data, helpers test.Helpers) *Cert {
type Cert (line 68) | type Cert struct
method GenerateServerX509 (line 77) | func (ca *Cert) GenerateServerX509(data test.Data, helpers test.Helper...
method GenerateCustomX509 (line 103) | func (ca *Cert) GenerateCustomX509(
function createCert (line 131) | func createCert(
function serialNumber (line 173) | func serialNumber() *big.Int {
FILE: mod/tigron/utils/utilities.go
function RandomStringBase64 (line 25) | func RandomStringBase64(desiredLength int) string {
FILE: pkg/annotations/annotations.go
constant Prefix (line 22) | Prefix = "nerdctl/"
constant Bypass4netns (line 27) | Bypass4netns = Prefix + "bypass4netns"
constant Bypass4netnsIgnoreSubnets (line 31) | Bypass4netnsIgnoreSubnets = Bypass4netns + "-ignore-subnets"
constant Bypass4netnsIgnoreBind (line 35) | Bypass4netnsIgnoreBind = Bypass4netns + "-ignore-bind"
FILE: pkg/api/types/apparmor_types.go
type ApparmorListOptions (line 22) | type ApparmorListOptions struct
type ApparmorInspectOptions (line 31) | type ApparmorInspectOptions struct
FILE: pkg/api/types/builder_types.go
type BuilderBuildOptions (line 22) | type BuilderBuildOptions struct
type BuilderPruneOptions (line 82) | type BuilderPruneOptions struct
FILE: pkg/api/types/checkpoint_types.go
type CheckpointCreateOptions (line 22) | type CheckpointCreateOptions struct
type CheckpointListOptions (line 31) | type CheckpointListOptions struct
type CheckpointRemoveOptions (line 39) | type CheckpointRemoveOptions struct
type CheckpointSummary (line 45) | type CheckpointSummary struct
FILE: pkg/api/types/container_network_types.go
type NetworkOptions (line 24) | type NetworkOptions struct
FILE: pkg/api/types/container_types.go
type ContainerStartOptions (line 25) | type ContainerStartOptions struct
type ContainerKillOptions (line 46) | type ContainerKillOptions struct
type ContainerExportOptions (line 56) | type ContainerExportOptions struct
type ContainerCreateOptions (line 63) | type ContainerCreateOptions struct
type ContainerStopOptions (line 315) | type ContainerStopOptions struct
type ContainerRestartOptions (line 329) | type ContainerRestartOptions struct
type ContainerPauseOptions (line 343) | type ContainerPauseOptions struct
type ContainerPruneOptions (line 350) | type ContainerPruneOptions struct
type ContainerUnpauseOptions (line 357) | type ContainerUnpauseOptions struct
type ContainerRemoveOptions (line 367) | type ContainerRemoveOptions struct
type ContainerRenameOptions (line 378) | type ContainerRenameOptions struct
type ContainerTopOptions (line 385) | type ContainerTopOptions struct
type ContainerInspectOptions (line 395) | type ContainerInspectOptions struct
type ContainerCommitOptions (line 408) | type ContainerCommitOptions struct
type CompressionType (line 430) | type CompressionType
constant Zstd (line 433) | Zstd CompressionType = "zstd"
constant Gzip (line 434) | Gzip CompressionType = "gzip"
type ImageFormat (line 437) | type ImageFormat
constant ImageFormatDocker (line 441) | ImageFormatDocker ImageFormat = "docker"
constant ImageFormatOCI (line 443) | ImageFormatOCI ImageFormat = "oci"
type ContainerDiffOptions (line 447) | type ContainerDiffOptions struct
type ContainerLogsOptions (line 454) | type ContainerLogsOptions struct
type ContainerWaitOptions (line 475) | type ContainerWaitOptions struct
type ContainerAttachOptions (line 482) | type ContainerAttachOptions struct
type ContainerExecOptions (line 494) | type ContainerExecOptions struct
type ContainerListOptions (line 515) | type ContainerListOptions struct
type ContainerCpOptions (line 532) | type ContainerCpOptions struct
type ContainerStatsOptions (line 551) | type ContainerStatsOptions struct
FILE: pkg/api/types/cri/metadata_types.go
constant metadataVersion (line 34) | metadataVersion = "v1"
type ContainerVersionedMetadata (line 38) | type ContainerVersionedMetadata struct
type criContainerMetadataInternal (line 46) | type criContainerMetadataInternal
type ContainerMetadata (line 49) | type ContainerMetadata struct
method MarshalJSON (line 55) | func (c *ContainerMetadata) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 63) | func (c *ContainerMetadata) UnmarshalJSON(data []byte) error {
FILE: pkg/api/types/global.go
type GlobalCommandOptions (line 21) | type GlobalCommandOptions
FILE: pkg/api/types/image_types.go
type ImageListOptions (line 26) | type ImageListOptions struct
type ImageConvertOptions (line 49) | type ImageConvertOptions struct
type EstargzOptions (line 81) | type EstargzOptions struct
type ZstdOptions (line 101) | type ZstdOptions struct
type ZstdChunkedOptions (line 109) | type ZstdChunkedOptions struct
type NydusOptions (line 121) | type NydusOptions struct
type OverlaybdOptions (line 135) | type OverlaybdOptions struct
type SociConvertOptions (line 145) | type SociConvertOptions struct
type ImageCryptOptions (line 154) | type ImageCryptOptions struct
type ImageInspectOptions (line 174) | type ImageInspectOptions struct
type ImagePushOptions (line 186) | type ImagePushOptions struct
type RemoteSnapshotterFlags (line 210) | type RemoteSnapshotterFlags struct
type ImagePullOptions (line 215) | type ImagePullOptions struct
type ImageTagOptions (line 239) | type ImageTagOptions struct
type ImageRemoveOptions (line 249) | type ImageRemoveOptions struct
type ImagePruneOptions (line 260) | type ImagePruneOptions struct
type ImageSaveOptions (line 273) | type ImageSaveOptions struct
type ImageSignOptions (line 284) | type ImageSignOptions struct
type ImageVerifyOptions (line 295) | type ImageVerifyOptions struct
type SociOptions (line 311) | type SociOptions struct
FILE: pkg/api/types/import_types.go
type ImageImportOptions (line 22) | type ImageImportOptions struct
FILE: pkg/api/types/ipfs_types.go
type IPFSRegistryServeOptions (line 24) | type IPFSRegistryServeOptions struct
FILE: pkg/api/types/load_types.go
type ImageLoadOptions (line 22) | type ImageLoadOptions struct
FILE: pkg/api/types/login_types.go
type LoginCommandOptions (line 19) | type LoginCommandOptions struct
FILE: pkg/api/types/manifest_types.go
type ManifestAnnotateOptions (line 22) | type ManifestAnnotateOptions struct
type ManifestCreateOptions (line 33) | type ManifestCreateOptions struct
type ManifestInspectOptions (line 43) | type ManifestInspectOptions struct
type ManifestPushOptions (line 53) | type ManifestPushOptions struct
FILE: pkg/api/types/namespace_types.go
type NamespaceCreateOptions (line 22) | type NamespaceCreateOptions struct
type NamespaceUpdateOptions (line 29) | type NamespaceUpdateOptions
type NamespaceRemoveOptions (line 32) | type NamespaceRemoveOptions struct
type NamespaceInspectOptions (line 40) | type NamespaceInspectOptions struct
type NamespaceListOptions (line 48) | type NamespaceListOptions struct
FILE: pkg/api/types/network_types.go
type NetworkCreateOptions (line 24) | type NetworkCreateOptions struct
type NetworkInspectOptions (line 42) | type NetworkInspectOptions struct
type NetworkListOptions (line 55) | type NetworkListOptions struct
type NetworkPruneOptions (line 68) | type NetworkPruneOptions struct
type NetworkRemoveOptions (line 77) | type NetworkRemoveOptions struct
FILE: pkg/api/types/search_types.go
type SearchOptions (line 23) | type SearchOptions struct
FILE: pkg/api/types/system_types.go
type SystemInfoOptions (line 22) | type SystemInfoOptions struct
type SystemEventsOptions (line 34) | type SystemEventsOptions struct
type SystemPruneOptions (line 45) | type SystemPruneOptions struct
FILE: pkg/api/types/volume_types.go
type VolumeCreateOptions (line 22) | type VolumeCreateOptions struct
type VolumeInspectOptions (line 30) | type VolumeInspectOptions struct
type VolumeListOptions (line 40) | type VolumeListOptions struct
type VolumePruneOptions (line 54) | type VolumePruneOptions struct
type VolumeRemoveOptions (line 64) | type VolumeRemoveOptions struct
FILE: pkg/apparmorutil/apparmorutil_linux.go
function hostSupports (line 40) | func hostSupports() bool {
function CanLoadNewProfile (line 73) | func CanLoadNewProfile() bool {
function CanApplyExistingProfile (line 91) | func CanApplyExistingProfile() bool {
function CanApplySpecificExistingProfile (line 104) | func CanApplySpecificExistingProfile(profileName string) bool {
type Profile (line 117) | type Profile struct
function Profiles (line 128) | func Profiles() ([]Profile, error) {
function Unload (line 158) | func Unload(target string) error {
FILE: pkg/buildkitutil/buildkitutil.go
constant DefaultDockerfileName (line 48) | DefaultDockerfileName string = "Dockerfile"
constant ContainerfileName (line 49) | ContainerfileName string = "Containerfile"
constant TempDockerfileName (line 51) | TempDockerfileName string = "docker-build-tempdockerfile-"
function BuildctlBinary (line 54) | func BuildctlBinary() (string, error) {
function BuildctlBaseArgs (line 58) | func BuildctlBaseArgs(buildkitHost string) []string {
function GetBuildkitHost (line 62) | func GetBuildkitHost(namespace string) (string, error) {
function GetWorkerLabels (line 90) | func GetWorkerLabels(buildkitHost string) (labels map[string]string, _ e...
function getHint (line 125) | func getHint() string {
function PingBKDaemon (line 133) | func PingBKDaemon(buildkitHost string) error {
function pingBKDaemon (line 143) | func pingBKDaemon(buildkitHost string) (output string, _ error) {
function WriteTempDockerfile (line 163) | func WriteTempDockerfile(rc io.Reader) (dockerfileDir string, err error) {
function BuildKitFile (line 189) | func BuildKitFile(dir, inputfile string) (absDir string, file string, er...
FILE: pkg/buildkitutil/buildkitutil_linux.go
function getRuntimeVariableDataDir (line 26) | func getRuntimeVariableDataDir() (string, error) {
FILE: pkg/buildkitutil/buildkitutil_test.go
function TestBuildKitFile (line 36) | func TestBuildKitFile(t *testing.T) {
FILE: pkg/buildkitutil/buildkitutil_unix.go
function getBuildkitHostCandidates (line 26) | func getBuildkitHostCandidates(namespace string) ([]string, error) {
FILE: pkg/buildkitutil/buildkitutil_unix_nolinux.go
function getRuntimeVariableDataDir (line 21) | func getRuntimeVariableDataDir() (string, error) {
FILE: pkg/buildkitutil/buildkitutil_windows.go
function getBuildkitHostCandidates (line 19) | func getBuildkitHostCandidates(namespace string) ([]string, error) {
FILE: pkg/buildkitutil/types.go
type UsageInfo (line 28) | type UsageInfo struct
type UsageRecordType (line 44) | type UsageRecordType
FILE: pkg/bypass4netnsutil/bypass.go
function NewBypass4netnsCNIBypassManager (line 36) | func NewBypass4netnsCNIBypassManager(client client.Client, rlkClient rlk...
type Bypass4netnsCNIBypassManager (line 62) | type Bypass4netnsCNIBypassManager struct
method StartBypass (line 69) | func (b4nnm *Bypass4netnsCNIBypassManager) StartBypass(ctx context.Con...
method StopBypass (line 120) | func (b4nnm *Bypass4netnsCNIBypassManager) StopBypass(ctx context.Cont...
FILE: pkg/bypass4netnsutil/bypass4netnsutil.go
function generateSecurityOpt (line 35) | func generateSecurityOpt(listenerPath string) (oci.SpecOpts, error) {
function GenerateBypass4netnsOpts (line 51) | func GenerateBypass4netnsOpts(securityOptsMaps map[string]string, annota...
function CreateSocketDir (line 86) | func CreateSocketDir() error {
function GetBypass4NetnsdDefaultSocketPath (line 102) | func GetBypass4NetnsdDefaultSocketPath() (string, error) {
function GetSocketPathByID (line 111) | func GetSocketPathByID(id string) (string, error) {
function GetPidFilePathByID (line 121) | func GetPidFilePathByID(id string) (string, error) {
function IsBypass4netnsEnabled (line 137) | func IsBypass4netnsEnabled(annotationsMap map[string]string) (enabled, b...
FILE: pkg/checkpointutil/checkpointutil.go
function GetCheckpointDir (line 25) | func GetCheckpointDir(checkpointDir, checkpointID, containerID string, c...
FILE: pkg/cioutil/container_io.go
constant binaryIOProcTermTimeout (line 37) | binaryIOProcTermTimeout = 12 * time.Second
type ncio (line 40) | type ncio struct
method Config (line 55) | func (c *ncio) Config() cio.Config {
method Wait (line 59) | func (c *ncio) Wait() {
method Close (line 65) | func (c *ncio) Close() error {
method Cancel (line 112) | func (c *ncio) Cancel() {
function NewContainerIO (line 118) | func NewContainerIO(namespace string, logURI string, tty bool, stdin io....
FILE: pkg/cioutil/container_io_unix.go
type pipes (line 33) | type pipes struct
method closers (line 39) | func (p *pipes) closers() []io.Closer {
function copyIO (line 44) | func copyIO(cmd *exec.Cmd, fifos *cio.FIFOSet, ioset *cio.Streams) (*nci...
function openFifos (line 103) | func openFifos(ctx context.Context, fifos *cio.FIFOSet) (f pipes, retErr...
FILE: pkg/cioutil/container_io_windows.go
function copyIO (line 31) | func copyIO(_ *exec.Cmd, fifos *cio.FIFOSet, ioset *cio.Streams) (_ *nci...
FILE: pkg/clientutil/client.go
function NewClient (line 38) | func NewClient(ctx context.Context, namespace, address string, opts ...c...
function NewClientWithPlatform (line 60) | func NewClientWithPlatform(ctx context.Context, namespace, address, plat...
function DataStore (line 84) | func DataStore(dataRoot, address string) (string, error) {
function getAddrHash (line 99) | func getAddrHash(addr string) (string, error) {
FILE: pkg/cmd/apparmor/inspect_linux.go
function Inspect (line 28) | func Inspect(options types.ApparmorInspectOptions) error {
FILE: pkg/cmd/apparmor/list_linux.go
function List (line 31) | func List(options types.ApparmorListOptions) error {
FILE: pkg/cmd/apparmor/load_linux.go
function Load (line 26) | func Load() error {
FILE: pkg/cmd/apparmor/unload_linux.go
function Unload (line 25) | func Unload(target string) error {
FILE: pkg/cmd/builder/build.go
type PlatformParser (line 50) | type PlatformParser interface
type platformParser (line 55) | type platformParser struct
method Parse (line 57) | func (p platformParser) Parse(platform string) (platforms.Platform, er...
method DefaultSpec (line 61) | func (p platformParser) DefaultSpec() platforms.Platform {
function Build (line 65) | func Build(ctx context.Context, client *containerd.Client, options types...
type readCounter (line 148) | type readCounter struct
function loadImage (line 153) | func loadImage(ctx context.Context, in io.Reader, namespace, address, sn...
function GetEffectiveSourcePolicyFile (line 200) | func GetEffectiveSourcePolicyFile(optionValue string) string {
function generateBuildctlArgs (line 207) | func generateBuildctlArgs(ctx context.Context, client *containerd.Client...
function getDigestFromMetaFile (line 493) | func getDigestFromMetaFile(path string) (string, error) {
function isMatchingRuntimePlatform (line 517) | func isMatchingRuntimePlatform(platform string, parser PlatformParser) b...
function isBuildPlatformDefault (line 531) | func isBuildPlatformDefault(platform []string, parser PlatformParser) bo...
function isImageSharable (line 540) | func isImageSharable(buildkitHost, namespace, uuid, snapshotter string, ...
function parseContextNames (line 570) | func parseContextNames(values []string) (map[string]string, error) {
function parseBuildContextFromOCILayout (line 590) | func parseBuildContextFromOCILayout(name, path string) ([]string, error) {
function readOCIIndexFromPath (line 623) | func readOCIIndexFromPath(path string) (*ocispec.Index, error) {
FILE: pkg/cmd/builder/build_test.go
type MockParse (line 31) | type MockParse struct
method EXPECT (line 46) | func (m *MockParse) EXPECT() *MockParseRecorder {
method Parse (line 50) | func (m *MockParse) Parse(platform string) (specs.Platform, error) {
method DefaultSpec (line 63) | func (m *MockParse) DefaultSpec() specs.Platform {
type MockParseRecorder (line 36) | type MockParseRecorder struct
method Parse (line 58) | func (m *MockParseRecorder) Parse(platform string) *gomock.Call {
method DefaultSpec (line 70) | func (m *MockParseRecorder) DefaultSpec() *gomock.Call {
function newMockParser (line 40) | func newMockParser(ctrl *gomock.Controller) *MockParse {
function TestIsMatchingRuntimePlatform (line 75) | func TestIsMatchingRuntimePlatform(t *testing.T) {
function TestIsBuildPlatformDefault (line 139) | func TestIsBuildPlatformDefault(t *testing.T) {
function TestParseBuildctlArgsForOCILayout (line 194) | func TestParseBuildctlArgsForOCILayout(t *testing.T) {
function TestGetEffectiveSourcePolicyFile (line 242) | func TestGetEffectiveSourcePolicyFile(t *testing.T) {
FILE: pkg/cmd/builder/prune.go
function Prune (line 33) | func Prune(ctx context.Context, options types.BuilderPruneOptions) ([]bu...
FILE: pkg/cmd/checkpoint/create.go
function Create (line 40) | func Create(ctx context.Context, client *containerd.Client, containerID ...
function withCheckpointOpts (line 125) | func withCheckpointOpts(rt string, exit bool) containerd.CheckpointTaskO...
FILE: pkg/cmd/checkpoint/list.go
function List (line 31) | func List(ctx context.Context, client *containerd.Client, containerID st...
FILE: pkg/cmd/checkpoint/remove.go
function Remove (line 31) | func Remove(ctx context.Context, client *containerd.Client, containerID ...
FILE: pkg/cmd/compose/compose.go
function New (line 50) | func New(client *containerd.Client, globalOptions types.GlobalCommandOpt...
function imageVerifyOptionsFromCompose (line 163) | func imageVerifyOptionsFromCompose(ps *serviceparser.Service) types.Imag...
FILE: pkg/cmd/container/attach.go
function Attach (line 42) | func Attach(ctx context.Context, client *containerd.Client, req string, ...
FILE: pkg/cmd/container/commit.go
function Commit (line 35) | func Commit(ctx context.Context, client *containerd.Client, rawRef strin...
function parseChanges (line 81) | func parseChanges(userChanges []string) (commit.Changes, error) {
FILE: pkg/cmd/container/cp_linux.go
function Cp (line 31) | func Cp(ctx context.Context, client *containerd.Client, options types.Co...
FILE: pkg/cmd/container/create.go
function Create (line 73) | func Create(ctx context.Context, client *containerd.Client, args []strin...
function generateRootfsOpts (line 442) | func generateRootfsOpts(args []string, id string, ensured *imgutil.Ensur...
function GenerateLogURI (line 566) | func GenerateLogURI(dataStore string) (*url.URL, error) {
function isHostNetwork (line 578) | func isHostNetwork(netOpts types.NetworkOptions) bool {
function withDefaultUnprivilegedPortSysctl (line 586) | func withDefaultUnprivilegedPortSysctl() oci.SpecOpts {
function withNerdctlOCIHook (line 604) | func withNerdctlOCIHook(cmd string, args []string) (oci.SpecOpts, error) {
function withContainerLabels (line 652) | func withContainerLabels(label, labelFile []string, ensuredImage *imguti...
function readKVStringsMapfFromLabel (line 678) | func readKVStringsMapfFromLabel(label, labelFile []string) (map[string]s...
function parseKVStringsMapFromLogOpt (line 689) | func parseKVStringsMapFromLogOpt(logOpt []string, logDriver string) (map...
function withStop (line 703) | func withStop(stopSignal string, stopTimeout int, ensuredImage *imgutil....
type internalLabels (line 723) | type internalLabels struct
method loadNetOpts (line 950) | func (il *internalLabels) loadNetOpts(opts types.NetworkOptions) {
function withInternalLabels (line 771) | func withInternalLabels(internalLabels internalLabels) (containerd.NewCo...
function withHealthcheck (line 891) | func withHealthcheck(options types.ContainerCreateOptions, ensuredImage ...
function dockercompatMounts (line 962) | func dockercompatMounts(mountPoints []*mountutil.Processed) []dockercomp...
function processeds (line 989) | func processeds(mountPoints []dockercompat.MountPoint) []*mountutil.Proc...
function propagateInternalContainerdLabelsToOCIAnnotations (line 1006) | func propagateInternalContainerdLabelsToOCIAnnotations() oci.SpecOpts {
function writeCIDFile (line 1018) | func writeCIDFile(path, id string) error {
function generateLogConfig (line 1038) | func generateLogConfig(dataStore string, id string, logDriver string, lo...
function generateRemoveStateDirFunc (line 1084) | func generateRemoveStateDirFunc(ctx context.Context, id string, internal...
function generateRemoveOrphanedDirsFunc (line 1092) | func generateRemoveOrphanedDirsFunc(ctx context.Context, id, dataStore s...
function generateGcFunc (line 1107) | func generateGcFunc(ctx context.Context, container containerd.Container,...
FILE: pkg/cmd/container/create_userns_opts_darwin.go
function getUserNamespaceOpts (line 30) | func getUserNamespaceOpts(
function getContainerUserNamespaceNetOpts (line 40) | func getContainerUserNamespaceNetOpts(
FILE: pkg/cmd/container/create_userns_opts_freebsd.go
function getUserNamespaceOpts (line 30) | func getUserNamespaceOpts(
function getContainerUserNamespaceNetOpts (line 40) | func getContainerUserNamespaceNetOpts(
FILE: pkg/cmd/container/create_userns_opts_linux.go
type IDMap (line 46) | type IDMap struct
type IdentityMapping (line 54) | type IdentityMapping struct
constant capabRemapIDs (line 60) | capabRemapIDs = "remap-ids"
function getUserNamespaceOpts (line 63) | func getUserNamespaceOpts(
function getContainerUserNamespaceNetOpts (line 97) | func getContainerUserNamespaceNetOpts(
function getNamespacePathFromNetworkSlice (line 155) | func getNamespacePathFromNetworkSlice(netOpts types.NetworkOptions) (str...
function getUserNamespacePathFromNetNsPath (line 166) | func getUserNamespacePathFromNetNsPath(netNsPath string) (string, error) {
function convertIDMapToLinuxIDMapping (line 201) | func convertIDMapToLinuxIDMapping(idMaps []IDMap) []specs.LinuxIDMapping {
function findContainer (line 219) | func findContainer(
function validateContainerStatus (line 247) | func validateContainerStatus(ctx context.Context, container containerd.C...
function getUserNamespacePath (line 266) | func getUserNamespacePath(ctx context.Context, container containerd.Cont...
function isDefaultUserns (line 276) | func isDefaultUserns(options *types.ContainerCreateOptions) bool {
function createDefaultSnapshotOpts (line 281) | func createDefaultSnapshotOpts(id string, image imgutil.EnsuredImage) []...
function parseGroup (line 288) | func parseGroup(identifier string) (user.Group, bool, error) {
function parseUser (line 306) | func parseUser(identifier string) (user.User, bool, error) {
function getUserAndGroup (line 323) | func getUserAndGroup(spec string) (user.User, user.Group, error) {
function LoadIdentityMapping (line 358) | func LoadIdentityMapping(spec string) (IdentityMapping, error) {
function lookupUserSubRangesFile (line 379) | func lookupUserSubRangesFile(path string, usr user.User) ([]IDMap, error) {
function lookupGroupSubRangesFile (line 405) | func lookupGroupSubRangesFile(path string, grp user.Group) ([]IDMap, err...
function loadAndValidateIDMapping (line 431) | func loadAndValidateIDMapping(userNS string) (IdentityMapping, error) {
function validIDMapping (line 443) | func validIDMapping(mapping IdentityMapping) bool {
function convertMappings (line 448) | func convertMappings(mapping IdentityMapping) ([]specs.LinuxIDMapping, [...
function getUserNamespaceSpecOpts (line 454) | func getUserNamespaceSpecOpts(
function createSnapshotOpts (line 461) | func createSnapshotOpts(
function WithUserNSRemapperLabels (line 472) | func WithUserNSRemapperLabels(uidmaps, gidmaps []specs.LinuxIDMapping) s...
function isValidMapping (line 484) | func isValidMapping(uidMaps, gidMaps []specs.LinuxIDMapping) bool {
function getContainerNameFromNetworkSlice (line 488) | func getContainerNameFromNetworkSlice(netOpts types.NetworkOptions) (str...
function snapshotterSupportsRemapLabels (line 497) | func snapshotterSupportsRemapLabels(
function hasCapability (line 510) | func hasCapability(caps []string, capability string) bool {
FILE: pkg/cmd/container/create_userns_opts_linux_test.go
function TestCreateSnapshotOpts (line 30) | func TestCreateSnapshotOpts(t *testing.T) {
function TestGetContainerNameFromNetworkSlice (line 90) | func TestGetContainerNameFromNetworkSlice(t *testing.T) {
FILE: pkg/cmd/container/create_userns_opts_windows.go
function getUserNamespaceOpts (line 30) | func getUserNamespaceOpts(
function getContainerUserNamespaceNetOpts (line 40) | func getContainerUserNamespaceNetOpts(
FILE: pkg/cmd/container/exec.go
function Exec (line 43) | func Exec(ctx context.Context, client *containerd.Client, args []string,...
function execActionWithContainer (line 63) | func execActionWithContainer(ctx context.Context, client *containerd.Cli...
function generateExecProcessSpec (line 151) | func generateExecProcessSpec(ctx context.Context, client *containerd.Cli...
FILE: pkg/cmd/container/exec_linux.go
function setExecCapabilities (line 25) | func setExecCapabilities(pspec *specs.Process) error {
FILE: pkg/cmd/container/exec_nolinux.go
function setExecCapabilities (line 25) | func setExecCapabilities(pspec *specs.Process) error {
FILE: pkg/cmd/container/export.go
function Export (line 35) | func Export(ctx context.Context, client *containerd.Client, containerReq...
function exportContainer (line 59) | func exportContainer(ctx context.Context, client *containerd.Client, con...
function createTarArchiveWithWriteDiff (line 98) | func createTarArchiveWithWriteDiff(ctx context.Context, rootPath string,...
FILE: pkg/cmd/container/health_check.go
function HealthCheck (line 31) | func HealthCheck(ctx context.Context, client *containerd.Client, contain...
function isContainerRunning (line 70) | func isContainerRunning(ctx context.Context, container containerd.Contai...
function timeoutWithDefault (line 90) | func timeoutWithDefault(configuredValue time.Duration, defaultValue time...
FILE: pkg/cmd/container/idmap.go
constant invalidID (line 27) | invalidID = 1<<32 - 1
type User (line 34) | type User struct
type ContainerdIDMap (line 42) | type ContainerdIDMap struct
method RootPair (line 48) | func (i *ContainerdIDMap) RootPair() (User, error) {
method ToHost (line 61) | func (i *ContainerdIDMap) ToHost(pair User) (User, error) {
method Marshal (line 79) | func (i *ContainerdIDMap) Marshal() (string, string) {
method Unmarshal (line 92) | func (i *ContainerdIDMap) Unmarshal(uidMap, gidMap string) error {
function toHost (line 119) | func toHost(contID uint32, idMap []specs.LinuxIDMapping) (uint32, error) {
function safeSum (line 140) | func safeSum(x, y uint32) (uint32, error) {
function serializeLinuxIDMapping (line 149) | func serializeLinuxIDMapping(m specs.LinuxIDMapping) string {
function deserializeLinuxIDMapping (line 154) | func deserializeLinuxIDMapping(str string) (specs.LinuxIDMapping, error) {
FILE: pkg/cmd/container/inspect.go
function Inspect (line 38) | func Inspect(ctx context.Context, client *containerd.Client, containers ...
type containerInspector (line 65) | type containerInspector struct
method Handler (line 74) | func (x *containerInspector) Handler(ctx context.Context, found contai...
FILE: pkg/cmd/container/kill.go
function Kill (line 48) | func Kill(ctx context.Context, client *containerd.Client, reqs []string,...
function killContainer (line 82) | func killContainer(ctx context.Context, container containerd.Container, ...
function cleanupNetwork (line 130) | func cleanupNetwork(ctx context.Context, container containerd.Container,...
FILE: pkg/cmd/container/list.go
function List (line 45) | func List(ctx context.Context, client *containerd.Client, options types....
function filterContainers (line 59) | func filterContainers(ctx context.Context, client *containerd.Client, fi...
type ListItem (line 116) | type ListItem struct
method Label (line 133) | func (x *ListItem) Label(s string) string {
function prepareContainers (line 137) | func prepareContainers(ctx context.Context, client *containerd.Client, c...
function getContainerNetworks (line 209) | func getContainerNetworks(containerLables map[string]string) []string {
function getContainerSize (line 219) | func getContainerSize(ctx context.Context, snapshotter snapshots.Snapsho...
FILE: pkg/cmd/container/list_util.go
function foldContainerFilters (line 35) | func foldContainerFilters(ctx context.Context, containers []containerd.C...
type containerFilterContext (line 41) | type containerFilterContext struct
method MatchesFilters (line 57) | func (cl *containerFilterContext) MatchesFilters(ctx context.Context) ...
method foldFilters (line 72) | func (cl *containerFilterContext) foldFilters(ctx context.Context, fil...
method foldExitedFilter (line 106) | func (cl *containerFilterContext) foldExitedFilter(_ context.Context, ...
method foldStatusFilter (line 118) | func (cl *containerFilterContext) foldStatusFilter(_ context.Context, ...
method foldBeforeFilter (line 137) | func (cl *containerFilterContext) foldBeforeFilter(ctx context.Context...
method foldSinceFilter (line 147) | func (cl *containerFilterContext) foldSinceFilter(ctx context.Context,...
method foldIDFilter (line 157) | func (cl *containerFilterContext) foldIDFilter(_ context.Context, filt...
method foldNameFilter (line 167) | func (cl *containerFilterContext) foldNameFilter(_ context.Context, fi...
method foldLabelFilter (line 181) | func (cl *containerFilterContext) foldLabelFilter(_ context.Context, f...
method foldVolumeFilter (line 200) | func (cl *containerFilterContext) foldVolumeFilter(_ context.Context, ...
method foldNetworkFilter (line 214) | func (cl *containerFilterContext) foldNetworkFilter(_ context.Context,...
method matchesInfoFilters (line 226) | func (cl *containerFilterContext) matchesInfoFilters(ctx context.Conte...
method matchesTaskFilters (line 237) | func (cl *containerFilterContext) matchesTaskFilters(ctx context.Conte...
method matchesExitedFilter (line 260) | func (cl *containerFilterContext) matchesExitedFilter(status container...
method matchesStatusFilter (line 276) | func (cl *containerFilterContext) matchesStatusFilter(status container...
method matchesIDFilter (line 290) | func (cl *containerFilterContext) matchesIDFilter(info containers.Cont...
method matchesNameFilter (line 303) | func (cl *containerFilterContext) matchesNameFilter(info containers.Co...
method matchesSinceFilter (line 317) | func (cl *containerFilterContext) matchesSinceFilter(info containers.C...
method matchesBeforeFilter (line 330) | func (cl *containerFilterContext) matchesBeforeFilter(info containers....
method matchesLabelFilter (line 343) | func (cl *containerFilterContext) matchesLabelFilter(info containers.C...
method matchesVolumeFilter (line 352) | func (cl *containerFilterContext) matchesVolumeFilter(info containers....
method matchesNetworkFilter (line 366) | func (cl *containerFilterContext) matchesNetworkFilter(info containers...
function idOrNameFilter (line 380) | func idOrNameFilter(ctx context.Context, containers []containerd.Contain...
FILE: pkg/cmd/container/logs.go
function Logs (line 42) | func Logs(ctx context.Context, client *containerd.Client, container stri...
function getLogPath (line 178) | func getLogPath(ctx context.Context, container containerd.Container) (st...
function getContainerEnvs (line 195) | func getContainerEnvs(ctx context.Context, container containerd.Containe...
function getLogOpts (line 217) | func getLogOpts(logOpts map[string]string) ([]string, []string) {
FILE: pkg/cmd/container/pause.go
function Pause (line 31) | func Pause(ctx context.Context, client *containerd.Client, reqs []string...
FILE: pkg/cmd/container/prune.go
function Prune (line 32) | func Prune(ctx context.Context, client *containerd.Client, options types...
FILE: pkg/cmd/container/remove.go
type ErrContainerStatus (line 51) | type ErrContainerStatus struct
method Error (line 56) | func (e ErrContainerStatus) Error() string {
function NewStatusError (line 61) | func NewStatusError(id string, status containerd.ProcessStatus) error {
function Remove (line 69) | func Remove(ctx context.Context, client *containerd.Client, containers [...
function RemoveContainer (line 105) | func RemoveContainer(ctx context.Context, c containerd.Container, global...
FILE: pkg/cmd/container/rename.go
function Rename (line 37) | func Rename(ctx context.Context, client *containerd.Client, containerID,...
function renameContainer (line 70) | func renameContainer(ctx context.Context, container containerd.Container...
FILE: pkg/cmd/container/restart.go
function Restart (line 34) | func Restart(ctx context.Context, client *containerd.Client, containers ...
FILE: pkg/cmd/container/run_blkio_linux.go
type WeightDevice (line 39) | type WeightDevice struct
method String (line 44) | func (w *WeightDevice) String() string {
type ThrottleDevice (line 49) | type ThrottleDevice struct
method String (line 54) | func (t *ThrottleDevice) String() string {
function toOCIWeightDevices (line 58) | func toOCIWeightDevices(weightDevices []*WeightDevice) ([]specs.LinuxWei...
function toOCIThrottleDevices (line 77) | func toOCIThrottleDevices(devs []*ThrottleDevice) ([]specs.LinuxThrottle...
function withBlkioWeight (line 95) | func withBlkioWeight(blkioWeight uint16) oci.SpecOpts {
function withBlkioWeightDevice (line 105) | func withBlkioWeightDevice(weightDevices []specs.LinuxWeightDevice) oci....
function withBlkioReadBpsDevice (line 115) | func withBlkioReadBpsDevice(devices []specs.LinuxThrottleDevice) oci.Spe...
function withBlkioWriteBpsDevice (line 125) | func withBlkioWriteBpsDevice(devices []specs.LinuxThrottleDevice) oci.Sp...
function withBlkioReadIOPSDevice (line 135) | func withBlkioReadIOPSDevice(devices []specs.LinuxThrottleDevice) oci.Sp...
function withBlkioWriteIOPSDevice (line 145) | func withBlkioWriteIOPSDevice(devices []specs.LinuxThrottleDevice) oci.S...
function BlkioOCIOpts (line 155) | func BlkioOCIOpts(options types.ContainerCreateOptions) ([]oci.SpecOpts,...
function validateWeightDevices (line 265) | func validateWeightDevices(vals []string) ([]*WeightDevice, error) {
function validateThrottleBpsDevices (line 294) | func validateThrottleBpsDevices(vals []string) ([]*ThrottleDevice, error) {
function validateThrottleIOpsDevices (line 324) | func validateThrottleIOpsDevices(vals []string) ([]*ThrottleDevice, erro...
FILE: pkg/cmd/container/run_cdi.go
function detectGPUVendorFromCDI (line 32) | func detectGPUVendorFromCDI() string {
function withStaticCDIRegistry (line 49) | func withStaticCDIRegistry(cdiSpecDirs []string) oci.SpecOpts {
function withCDIDevices (line 68) | func withCDIDevices(devices ...string) oci.SpecOpts {
function withGPUs (line 80) | func withGPUs(gpuOpts ...string) oci.SpecOpts {
FILE: pkg/cmd/container/run_cgroup_linux.go
type customMemoryOptions (line 39) | type customMemoryOptions struct
function generateCgroupOpts (line 45) | func generateCgroupOpts(id string, options types.ContainerCreateOptions,...
function generateCgroupPath (line 230) | func generateCgroupPath(id, cgroupManager, cgroupParent string) (string,...
function ParseDevice (line 269) | func ParseDevice(s string) (hostDevPath string, containerPath string, mo...
function validateDeviceMode (line 303) | func validateDeviceMode(mode string) error {
function withUnified (line 314) | func withUnified(unified map[string]string) oci.SpecOpts {
function withCustomMemoryResources (line 327) | func withCustomMemoryResources(memoryOptions customMemoryOptions) oci.Sp...
FILE: pkg/cmd/container/run_gpus.go
type GPUReq (line 28) | type GPUReq struct
method toCDIDeviceIDs (line 34) | func (req *GPUReq) toCDIDeviceIDs(vendor string) []string {
method normalizeDeviceIDs (line 42) | func (req *GPUReq) normalizeDeviceIDs() []string {
function ParseGPUOptCSV (line 58) | func ParseGPUOptCSV(value string) (*GPUReq, error) {
function parseGPUOpts (line 119) | func parseGPUOpts(gpuOpts []string) ([]string, error) {
function parseCount (line 140) | func parseCount(s string) (int, error) {
FILE: pkg/cmd/container/run_linux.go
function WithoutRunMount (line 42) | func WithoutRunMount() func(ctx context.Context, client oci.Client, c *c...
function setPlatformOptions (line 46) | func setPlatformOptions(ctx context.Context, client *containerd.Client, ...
function generateNamespaceOpts (line 121) | func generateNamespaceOpts(
function generateIPCOpts (line 157) | func generateIPCOpts(ctx context.Context, client *containerd.Client, ipc...
function generatePIDOpts (line 176) | func generatePIDOpts(ctx context.Context, client *containerd.Client, pid...
function setOOMScoreAdj (line 225) | func setOOMScoreAdj(opts []oci.SpecOpts, oomScoreAdjChanged bool, oomSco...
function withOOMScoreAdj (line 252) | func withOOMScoreAdj(score int) oci.SpecOpts {
FILE: pkg/cmd/container/run_mount.go
function withMounts (line 56) | func withMounts(mounts []specs.Mount) oci.SpecOpts {
function parseMountFlags (line 95) | func parseMountFlags(volStore volumestore.VolumeStore, options types.Con...
function generateMountOpts (line 127) | func generateMountOpts(ctx context.Context, client *containerd.Client, e...
function copyExistingContents (line 361) | func copyExistingContents(source, destination string) error {
FILE: pkg/cmd/container/run_restart.go
function checkRestartCapabilities (line 30) | func checkRestartCapabilities(ctx context.Context, client *containerd.Cl...
function generateRestartOpts (line 54) | func generateRestartOpts(ctx context.Context, client *containerd.Client,...
function UpdateContainerRestartPolicyLabel (line 78) | func UpdateContainerRestartPolicyLabel(ctx context.Context, client *cont...
FILE: pkg/cmd/container/run_runtime.go
function generateRuntimeCOpts (line 34) | func generateRuntimeCOpts(cgroupManager, runtimeStr string) ([]container...
function WithSysctls (line 68) | func WithSysctls(sysctls map[string]string) oci.SpecOpts {
FILE: pkg/cmd/container/run_security_linux.go
constant systemPathsUnconfined (line 51) | systemPathsUnconfined = "unconfined"
function generateSecurityOpts (line 54) | func generateSecurityOpts(privileged bool, securityOptsMap map[string]st...
function canonicalizeCapName (line 144) | func canonicalizeCapName(s string) string {
function isKnownCapName (line 164) | func isKnownCapName(s string) bool {
function generateCapOpts (line 176) | func generateCapOpts(capAdd, capDrop []string) ([]oci.SpecOpts, error) {
FILE: pkg/cmd/container/run_ulimit_linux.go
function generateUlimitsOpts (line 32) | func generateUlimitsOpts(ulimits []string) ([]oci.SpecOpts, error) {
function withRlimits (line 53) | func withRlimits(rlimits []specs.POSIXRlimit) oci.SpecOpts {
FILE: pkg/cmd/container/run_unix_nolinux.go
function WithoutRunMount (line 31) | func WithoutRunMount() func(ctx context.Context, client oci.Client, c *c...
function setPlatformOptions (line 36) | func setPlatformOptions(
FILE: pkg/cmd/container/run_user.go
function generateUserOpts (line 28) | func generateUserOpts(user string) ([]oci.SpecOpts, error) {
function generateUmaskOpts (line 36) | func generateUmaskOpts(umask string) ([]oci.SpecOpts, error) {
function generateGroupsOpts (line 49) | func generateGroupsOpts(groups []string) ([]oci.SpecOpts, error) {
function withResetAdditionalGIDs (line 58) | func withResetAdditionalGIDs() oci.SpecOpts {
function withAdditionalUmask (line 65) | func withAdditionalUmask(umask uint32) oci.SpecOpts {
FILE: pkg/cmd/container/run_windows.go
constant hostProcessInheritUser (line 37) | hostProcessInheritUser = "microsoft.com/hostprocess-inherit-user"
constant hostProcessContainer (line 40) | hostProcessContainer = "microsoft.com/hostprocess-container"
constant uvmMemorySizeInMB (line 41) | uvmMemorySizeInMB = "io.microsoft.virtualmachine.computetopology.memo...
constant uvmCPUCount (line 42) | uvmCPUCount = "io.microsoft.virtualmachine.computetopology.proc...
function setPlatformOptions (line 45) | func setPlatformOptions(
function WithWindowsProcessIsolated (line 126) | func WithWindowsProcessIsolated() oci.SpecOpts {
FILE: pkg/cmd/container/start.go
function Start (line 34) | func Start(ctx context.Context, client *containerd.Client, reqs []string...
FILE: pkg/cmd/container/stats.go
type stats (line 49) | type stats struct
method add (line 55) | func (s *stats) add(cs *statsutil.Stats) bool {
method remove (line 66) | func (s *stats) remove(id string) {
method isKnownContainer (line 75) | func (s *stats) isKnownContainer(cid string) (int, bool) {
function Stats (line 85) | func Stats(ctx context.Context, client *containerd.Client, containerIDs ...
function collect (line 343) | func collect(ctx context.Context, globalOptions types.GlobalCommandOptio...
FILE: pkg/cmd/container/stats_linux.go
constant clockTicksPerSecond (line 45) | clockTicksPerSecond = 100
constant nanoSecondsPerSecond (line 46) | nanoSecondsPerSecond = 1e9
function setContainerStatsAndRenderStatsEntry (line 50) | func setContainerStatsAndRenderStatsEntry(previousStats *statsutil.Conta...
function getSystemCPUUsage (line 136) | func getSystemCPUUsage() (cpuUsage uint64, cpuNum uint32, _ error) {
function readSystemCPUUsage (line 150) | func readSystemCPUUsage(r io.Reader) (cpuUsage uint64, cpuNum uint32, _ ...
FILE: pkg/cmd/container/stats_nolinux.go
function setContainerStatsAndRenderStatsEntry (line 26) | func setContainerStatsAndRenderStatsEntry(previousStats *statsutil.Conta...
function getSystemCPUUsage (line 32) | func getSystemCPUUsage() (uint64, uint32, error) {
FILE: pkg/cmd/container/stop.go
function Stop (line 33) | func Stop(ctx context.Context, client *containerd.Client, reqs []string,...
FILE: pkg/cmd/container/top.go
type ContainerTopOKBody (line 41) | type ContainerTopOKBody struct
function Top (line 55) | func Top(ctx context.Context, client *containerd.Client, containers []st...
FILE: pkg/cmd/container/top_unix.go
function containerTop (line 53) | func containerTop(ctx context.Context, stdio io.Writer, client *containe...
function appendProcess2ProcList (line 127) | func appendProcess2ProcList(procList *ContainerTopOKBody, fields []strin...
function psPidsArg (line 140) | func psPidsArg(pids []uint32) string {
function validatePSArgs (line 152) | func validatePSArgs(psArgs string) error {
function fieldsASCII (line 173) | func fieldsASCII(s string) []string {
function hasPid (line 185) | func hasPid(procs []uint32, pid int) bool {
function parsePSOutput (line 195) | func parsePSOutput(output []byte, procs []uint32) (*ContainerTopOKBody, ...
FILE: pkg/cmd/container/top_windows.go
function containerTop (line 40) | func containerTop(ctx context.Context, stdio io.Writer, client *containe...
FILE: pkg/cmd/container/unpause.go
function Unpause (line 32) | func Unpause(ctx context.Context, client *containerd.Client, reqs []stri...
FILE: pkg/cmd/container/wait.go
function Wait (line 32) | func Wait(ctx context.Context, client *containerd.Client, reqs []string,...
function waitContainer (line 60) | func waitContainer(ctx context.Context, w io.Writer, container container...
FILE: pkg/cmd/image/convert.go
function Convert (line 57) | func Convert(ctx context.Context, client *containerd.Client, srcRawRef, ...
function getESGZConverter (line 258) | func getESGZConverter(options types.ImageConvertOptions) (convertFunc co...
function addDescriptorsToJobs (line 289) | func addDescriptorsToJobs(ctx context.Context, client *containerd.Client...
function getESGZConvertOpts (line 313) | func getESGZConvertOpts(options types.ImageConvertOptions) ([]estargz.Op...
function getZstdConverter (line 345) | func getZstdConverter(options types.ImageConvertOptions) (converter.Conv...
function getZstdchunkedConverter (line 349) | func getZstdchunkedConverter(options types.ImageConvertOptions) (convert...
function getNydusConvertOpts (line 372) | func getNydusConvertOpts(options types.ImageConvertOptions) (*nydusconve...
function getOBDConvertOpts (line 393) | func getOBDConvertOpts(options types.ImageConvertOptions) ([]overlaybdco...
function readPathsFromRecordFile (line 401) | func readPathsFromRecordFile(filename string) ([]string, error) {
function printConvertedImage (line 423) | func printConvertedImage(stdout io.Writer, options types.ImageConvertOpt...
FILE: pkg/cmd/image/crypt.go
function Crypt (line 38) | func Crypt(ctx context.Context, client *containerd.Client, srcRawRef, ta...
function parseImgcryptFlags (line 106) | func parseImgcryptFlags(options types.ImageCryptOptions, encrypt bool) (...
function composeConvertFunc (line 124) | func composeConvertFunc(a, b converter.ConvertFunc) converter.ConvertFunc {
FILE: pkg/cmd/image/ensure.go
function EnsureAllContent (line 41) | func EnsureAllContent(ctx context.Context, client *containerd.Client, sr...
function ensureOne (line 66) | func ensureOne(ctx context.Context, client *containerd.Client, rawRef st...
FILE: pkg/cmd/image/import.go
function Import (line 51) | func Import(ctx context.Context, client *containerd.Client, options type...
function ensureOCIArchive (line 103) | func ensureOCIArchive(ctx context.Context, client *containerd.Client, r ...
function detectStandardImageArchive (line 133) | func detectStandardImageArchive(r io.Reader) (bool, error) {
function convertRootfsToOCIArchive (line 154) | func convertRootfsToOCIArchive(ctx context.Context, client *containerd.C...
function compressAndWriteLayer (line 199) | func compressAndWriteLayer(ctx context.Context, w content.Writer, r io.R...
function buildImageConfig (line 243) | func buildImageConfig(diffID digest.Digest, options types.ImageImportOpt...
function readLayerContent (line 278) | func readLayerContent(ctx context.Context, cs content.Store, layerDigest...
function buildDockerArchive (line 292) | func buildDockerArchive(configJSON []byte, configDigest digest.Digest, l...
function randomRef (line 348) | func randomRef(prefix string) string {
FILE: pkg/cmd/image/inspect.go
function inspectIdentifier (line 38) | func inspectIdentifier(ctx context.Context, client *containerd.Client, i...
function Inspect (line 89) | func Inspect(ctx context.Context, client *containerd.Client, identifiers...
FILE: pkg/cmd/image/list.go
function ListCommandHandler (line 52) | func ListCommandHandler(ctx context.Context, client *containerd.Client, ...
function List (line 73) | func List(ctx context.Context, client *containerd.Client, filters, nameA...
type imagePrintable (line 116) | type imagePrintable struct
function printImages (line 131) | func printImages(ctx context.Context, client *containerd.Client, imageLi...
type imagePrinter (line 230) | type imagePrinter struct
method printImage (line 344) | func (x *imagePrinter) printImage(ctx context.Context, img images.Imag...
method printImageSinglePlatform (line 359) | func (x *imagePrinter) printImageSinglePlatform(desc ocispec.Descripto...
type image (line 239) | type image struct
function readManifest (line 246) | func readManifest(ctx context.Context, provider content.Provider, snapsh...
function readIndex (line 298) | func readIndex(ctx context.Context, provider content.Provider, snapshott...
function read (line 328) | func read(ctx context.Context, provider content.Provider, snapshotter sn...
function isAttestationManifestDescriptor (line 427) | func isAttestationManifestDescriptor(desc ocispec.Descriptor) bool {
FILE: pkg/cmd/image/prune.go
function Prune (line 35) | func Prune(ctx context.Context, client *containerd.Client, options types...
FILE: pkg/cmd/image/pull.go
function Pull (line 36) | func Pull(ctx context.Context, client *containerd.Client, rawRef string,...
function EnsureImage (line 46) | func EnsureImage(ctx context.Context, client *containerd.Client, rawRef ...
FILE: pkg/cmd/image/push.go
function Push (line 61) | func Push(ctx context.Context, client *containerd.Client, rawRef string,...
function eStargzConvertFunc (line 202) | func eStargzConvertFunc() converter.ConvertFunc {
function isReusableESGZ (line 219) | func isReusableESGZ(ctx context.Context, cs content.Store, desc ocispec....
function pushImageWithLocal (line 243) | func pushImageWithLocal(ctx context.Context, client *containerd.Client, ...
FILE: pkg/cmd/image/remove.go
function Remove (line 36) | func Remove(ctx context.Context, client *containerd.Client, args []strin...
FILE: pkg/cmd/image/save.go
function Save (line 41) | func Save(ctx context.Context, client *containerd.Client, images []strin...
type nopWriteCloser (line 116) | type nopWriteCloser struct
method Close (line 120) | func (nopWriteCloser) Close() error {
FILE: pkg/cmd/image/tag.go
function Tag (line 30) | func Tag(ctx context.Context, client *containerd.Client, options types.I...
FILE: pkg/cmd/ipfs/registry_serve.go
function RegistryServe (line 31) | func RegistryServe(options types.IPFSRegistryServeOptions) error {
FILE: pkg/cmd/login/login.go
constant unencryptedPasswordWarning (line 39) | unencryptedPasswordWarning = `WARNING: Your password will be stored unen...
function Login (line 44) | func Login(ctx context.Context, options types.LoginCommandOptions, stdou...
function loginClientSide (line 111) | func loginClientSide(ctx context.Context, globalOptions types.GlobalComm...
function tryLoginWithRegHost (line 166) | func tryLoginWithRegHost(ctx context.Context, rh docker.RegistryHost) er...
FILE: pkg/cmd/login/prompt.go
function promptUserForAuthentication (line 46) | func promptUserForAuthentication(credentials *dockerconfigresolver.Crede...
function readUsername (line 97) | func readUsername() (string, error) {
FILE: pkg/cmd/login/prompt_unix.go
function readPassword (line 31) | func readPassword() (string, error) {
FILE: pkg/cmd/login/prompt_windows.go
function readPassword (line 26) | func readPassword() (string, error) {
FILE: pkg/cmd/logout/logout.go
function Logout (line 25) | func Logout(ctx context.Context, logoutServer string) (map[string]error,...
function ShellCompletion (line 39) | func ShellCompletion() ([]string, error) {
FILE: pkg/cmd/manifest/annotate.go
function Annotate (line 32) | func Annotate(ctx context.Context, listRef string, manifestRef string, o...
function appendIfUnique (line 83) | func appendIfUnique(list []string, str string) []string {
FILE: pkg/cmd/manifest/create.go
function Create (line 34) | func Create(ctx context.Context, listRef string, manifestRefs []string, ...
FILE: pkg/cmd/manifest/inspect.go
function Inspect (line 34) | func Inspect(ctx context.Context, rawRef string, options types.ManifestI...
function formatVerboseOutput (line 54) | func formatVerboseOutput(ctx context.Context, parsedRef *referenceutil.I...
function verboseEntriesForManifests (line 80) | func verboseEntriesForManifests(ctx context.Context, parsedRef *referenc...
FILE: pkg/cmd/manifest/push.go
function Push (line 40) | func Push(ctx context.Context, listRef string, options types.ManifestPus...
function buildManifestList (line 90) | func buildManifestList(manifests []*manifesttypes.DockerManifestEntry) (...
function pushIndividualManifests (line 128) | func pushIndividualManifests(ctx context.Context, resolver remotes.Resol...
function pushManifest (line 159) | func pushManifest(ctx context.Context, resolver remotes.Resolver, ref st...
function pushManifestList (line 193) | func pushManifestList(ctx context.Context, resolver remotes.Resolver, ta...
FILE: pkg/cmd/manifest/rm.go
function Remove (line 30) | func Remove(ctx context.Context, ref string, options types.GlobalCommand...
FILE: pkg/cmd/namespace/common.go
function objectWithLabelArgs (line 30) | func objectWithLabelArgs(args []string) map[string]string {
function labelArgs (line 39) | func labelArgs(labelStrings []string) map[string]string {
function namespaceExists (line 53) | func namespaceExists(ctx context.Context, store namespaces.Store, namesp...
FILE: pkg/cmd/namespace/create.go
function Create (line 27) | func Create(ctx context.Context, client *containerd.Client, namespace st...
FILE: pkg/cmd/namespace/inspect.go
function Inspect (line 31) | func Inspect(ctx context.Context, client *containerd.Client, inspectedNa...
FILE: pkg/cmd/namespace/list.go
function List (line 39) | func List(ctx context.Context, client *containerd.Client, options types....
type namespace (line 147) | type namespace struct
FILE: pkg/cmd/namespace/namespace_linux.go
function namespaceDeleteOpts (line 24) | func namespaceDeleteOpts(cgroup bool) ([]namespaces.DeleteOpts, error) {
FILE: pkg/cmd/namespace/namespace_nolinux.go
function namespaceDeleteOpts (line 25) | func namespaceDeleteOpts(cgroup bool) ([]namespaces.DeleteOpts, error) {
FILE: pkg/cmd/namespace/remove.go
function Remove (line 30) | func Remove(ctx context.Context, client *containerd.Client, deletedNames...
FILE: pkg/cmd/namespace/update.go
function Update (line 27) | func Update(ctx context.Context, client *containerd.Client, namespace st...
FILE: pkg/cmd/network/create.go
function Create (line 29) | func Create(options types.NetworkCreateOptions, stdout io.Writer) error {
FILE: pkg/cmd/network/inspect.go
function Inspect (line 37) | func Inspect(ctx context.Context, client *containerd.Client, options typ...
FILE: pkg/cmd/network/list.go
type networkPrintable (line 34) | type networkPrintable struct
function List (line 42) | func List(ctx context.Context, options types.NetworkListOptions) error {
function getNetworkFilterFuncs (line 145) | func getNetworkFilterFuncs(filters []string) ([]func(*map[string]string)...
function networkMatchesFilter (line 183) | func networkMatchesFilter(net *netutil.NetworkConfig, labelFilterFuncs [...
FILE: pkg/cmd/network/prune.go
function Prune (line 31) | func Prune(ctx context.Context, client *containerd.Client, options types...
FILE: pkg/cmd/network/remove.go
function Remove (line 31) | func Remove(ctx context.Context, client *containerd.Client, options type...
FILE: pkg/cmd/search/search.go
type SearchResult (line 39) | type SearchResult struct
function Search (line 46) | func Search(ctx context.Context, term string, options types.SearchOption...
function splitReposSearchTerm (line 122) | func splitReposSearchTerm(reposName string) (registryHost string, search...
function buildSearchURL (line 139) | func buildSearchURL(registryHost, term, scheme string) string {
function createHTTPClient (line 157) | func createHTTPClient(hostOpts *dockerconfig.HostOptions) *http.Client {
function validateFilterValue (line 168) | func validateFilterValue(key, value string) error {
function validateAndParseFilters (line 185) | func validateAndParseFilters(filters []string) (map[string]string, error) {
function applyFilters (line 202) | func applyFilters(results []SearchResult, filterMap map[string]string, l...
function truncateDescription (line 231) | func truncateDescription(desc string, noTrunc bool) string {
function printSearchResults (line 238) | func printSearchResults(stdout io.Writer, results []SearchResult, option...
FILE: pkg/cmd/system/events.go
type EventOut (line 40) | type EventOut struct
type Status (line 49) | type Status
constant START (line 52) | START Status = "start"
constant UNKNOWN (line 53) | UNKNOWN Status = "unknown"
function isStatus (line 58) | func isStatus(status string) bool {
function TopicToStatus (line 70) | func TopicToStatus(topic string) Status {
type EventFilter (line 79) | type EventFilter
function generateEventFilter (line 83) | func generateEventFilter(filter, filterValue string) (func(e *EventOut) ...
function parseFilter (line 100) | func parseFilter(filter string) (string, string, error) {
function applyFilters (line 110) | func applyFilters(event *EventOut, filterMap map[string][]EventFilter) b...
function generateEventFilters (line 128) | func generateEventFilters(filters []string) (map[string][]EventFilter, e...
function Events (line 148) | func Events(ctx context.Context, client *containerd.Client, options type...
FILE: pkg/cmd/system/info.go
function Info (line 45) | func Info(ctx context.Context, client *containerd.Client, options types....
function fulfillNativeInfo (line 103) | func fulfillNativeInfo(di *native.DaemonInfo, globalOptions types.Global...
function prettyPrintInfoNative (line 114) | func prettyPrintInfoNative(w io.Writer, info *native.Info) error {
function prettyPrintInfoDockerCompat (line 147) | func prettyPrintInfoDockerCompat(stdout io.Writer, stderr io.Writer, inf...
function printF (line 184) | func printF(w io.Writer, label string, dockerCompatInfo string) {
function printSecurityOptions (line 191) | func printSecurityOptions(w io.Writer, securityOptions []string) {
FILE: pkg/cmd/system/prune.go
function Prune (line 35) | func Prune(ctx context.Context, client *containerd.Client, options types...
FILE: pkg/cmd/volume/create.go
function Create (line 30) | func Create(name string, options types.VolumeCreateOptions) (*native.Vol...
FILE: pkg/cmd/volume/inspect.go
function Inspect (line 29) | func Inspect(ctx context.Context, volumes []string, options types.Volume...
FILE: pkg/cmd/volume/list.go
type volumePrintable (line 37) | type volumePrintable struct
function List (line 47) | func List(options types.VolumeListOptions) error {
function hasSizeFilter (line 75) | func hasSizeFilter(filters []string) bool {
function removeSizeFilters (line 84) | func removeSizeFilters(filters []string) []string {
function lsPrintOutput (line 94) | func lsPrintOutput(vols map[string]native.Volume, options types.VolumeLi...
function Volumes (line 168) | func Volumes(ns string, dataRoot string, address string, volumeSize bool...
function getVolumeFilterFuncs (line 193) | func getVolumeFilterFuncs(filters []string) ([]func(*map[string]string) ...
function volumeMatchesFilter (line 267) | func volumeMatchesFilter(vol native.Volume, labelFilterFuncs []func(*map...
function anyMatch (line 287) | func anyMatch[T any](vol T, filters []func(T) bool) bool {
FILE: pkg/cmd/volume/prune.go
function Prune (line 31) | func Prune(ctx context.Context, client *containerd.Client, options types...
FILE: pkg/cmd/volume/rm.go
function Remove (line 35) | func Remove(ctx context.Context, client *containerd.Client, volumes []st...
function usedVolumes (line 82) | func usedVolumes(ctx context.Context, containers []containerd.Container)...
FILE: pkg/cmd/volume/volume.go
function Store (line 26) | func Store(ns string, dataRoot string, address string) (volumestore.Volu...
FILE: pkg/composer/build.go
type BuildOptions (line 31) | type BuildOptions struct
method Build (line 37) | func (c *Composer) Build(ctx context.Context, bo BuildOptions, services ...
method buildServiceImage (line 50) | func (c *Composer) buildServiceImage(ctx context.Context, image string, ...
FILE: pkg/composer/composer.go
type Options (line 39) | type Options struct
function New (line 58) | func New(o Options, client *containerd.Client, cfg *config.Config) (*Com...
type Composer (line 129) | type Composer struct
method createNerdctlCmd (line 136) | func (c *Composer) createNerdctlCmd(ctx context.Context, args ...strin...
method runNerdctlCmd (line 140) | func (c *Composer) runNerdctlCmd(ctx context.Context, args ...string) ...
method Services (line 152) | func (c *Composer) Services(ctx context.Context, svcs ...string) ([]*s...
method ServiceNames (line 169) | func (c *Composer) ServiceNames(svcs ...string) ([]string, error) {
FILE: pkg/composer/config.go
type ConfigOptions (line 38) | type ConfigOptions struct
method Config (line 44) | func (c *Composer) Config(ctx context.Context, w io.Writer, co ConfigOpt...
function ServiceHash (line 80) | func ServiceHash(o types.ServiceConfig) (string, error) {
FILE: pkg/composer/container.go
method Containers (line 29) | func (c *Composer) Containers(ctx context.Context, services ...string) (...
method containerExists (line 46) | func (c *Composer) containerExists(ctx context.Context, name, service st...
method containerID (line 67) | func (c *Composer) containerID(ctx context.Context, name, service string...
FILE: pkg/composer/copy.go
type CopyOptions (line 33) | type CopyOptions struct
type copyDirection (line 41) | type copyDirection
constant fromService (line 44) | fromService copyDirection = 0
constant toService (line 45) | toService copyDirection = 1
method Copy (line 48) | func (c *Composer) Copy(ctx context.Context, co CopyOptions) error {
method logCopyMsg (line 99) | func (c *Composer) logCopyMsg(ctx context.Context, container containerd....
method listContainersTargetedForCopy (line 119) | func (c *Composer) listContainersTargetedForCopy(ctx context.Context, in...
function splitCpArg (line 148) | func splitCpArg(arg string) (container, path string) {
FILE: pkg/composer/create.go
constant RecreateNever (line 39) | RecreateNever = "never"
constant RecreateForce (line 41) | RecreateForce = "force"
constant RecreateDiverged (line 46) | RecreateDiverged = "diverged"
type CreateOptions (line 50) | type CreateOptions struct
method recreateStrategy (line 58) | func (opts CreateOptions) recreateStrategy() string {
method Create (line 70) | func (c *Composer) Create(ctx context.Context, opt CreateOptions, servic...
method createService (line 137) | func (c *Composer) createService(ctx context.Context, ps *serviceparser....
method createServiceContainer (line 159) | func (c *Composer) createServiceContainer(ctx context.Context, service *...
FILE: pkg/composer/down.go
type DownOptions (line 28) | type DownOptions struct
method Down (line 33) | func (c *Composer) Down(ctx context.Context, downOptions DownOptions) er...
method downNetwork (line 89) | func (c *Composer) downNetwork(ctx context.Context, shortName string) er...
method downVolume (line 120) | func (c *Composer) downVolume(ctx context.Context, shortName string) err...
FILE: pkg/composer/exec.go
type ExecOptions (line 35) | type ExecOptions struct
method Exec (line 51) | func (c *Composer) Exec(ctx context.Context, eo ExecOptions) error {
method exec (line 86) | func (c *Composer) exec(ctx context.Context, container containerd.Contai...
FILE: pkg/composer/kill.go
type KillOptions (line 27) | type KillOptions struct
method Kill (line 31) | func (c *Composer) Kill(ctx context.Context, opts KillOptions, services ...
FILE: pkg/composer/lock.go
function Lock (line 29) | func Lock(dataRoot string, address string) error {
function Unlock (line 46) | func Unlock() error {
FILE: pkg/composer/logs.go
type LogsOptions (line 37) | type LogsOptions struct
method Logs (line 47) | func (c *Composer) Logs(ctx context.Context, lo LogsOptions, services []...
method logs (line 71) | func (c *Composer) logs(ctx context.Context, containers []containerd.Con...
FILE: pkg/composer/orphans.go
method getOrphanContainers (line 29) | func (c *Composer) getOrphanContainers(ctx context.Context, parsedServic...
function containerShortIDs (line 59) | func containerShortIDs(containers []containerd.Container) []string {
FILE: pkg/composer/pause.go
method Pause (line 34) | func (c *Composer) Pause(ctx context.Context, services []string, writer ...
method Unpause (line 70) | func (c *Composer) Unpause(ctx context.Context, services []string, write...
FILE: pkg/composer/pipetagger/pipetagger.go
function ChooseColorAttrs (line 29) | func ChooseColorAttrs(tag string) []color.Attribute {
function New (line 74) | func New(w io.Writer, r io.Reader, tag string, width int, noColor bool) ...
type PipeTagger (line 88) | type PipeTagger struct
method Run (line 96) | func (x *PipeTagger) Run() error {
FILE: pkg/composer/port.go
type PortOptions (line 30) | type PortOptions struct
method Port (line 41) | func (c *Composer) Port(ctx context.Context, writer io.Writer, po PortOp...
FILE: pkg/composer/pull.go
type PullOptions (line 31) | type PullOptions struct
method Pull (line 35) | func (c *Composer) Pull(ctx context.Context, po PullOptions, services []...
method pullServiceImage (line 45) | func (c *Composer) pullServiceImage(ctx context.Context, image string, p...
FILE: pkg/composer/push.go
type PushOptions (line 31) | type PushOptions struct
method Push (line 34) | func (c *Composer) Push(ctx context.Context, po PushOptions, services []...
method pushServiceImage (line 44) | func (c *Composer) pushServiceImage(ctx context.Context, image string, p...
FILE: pkg/composer/restart.go
type RestartOptions (line 33) | type RestartOptions struct
method Restart (line 39) | func (c *Composer) Restart(ctx context.Context, opt RestartOptions, serv...
method restartContainers (line 51) | func (c *Composer) restartContainers(ctx context.Context, containers []c...
FILE: pkg/composer/rm.go
type RemoveOptions (line 36) | type RemoveOptions struct
method Remove (line 42) | func (c *Composer) Remove(ctx context.Context, opt RemoveOptions, servic...
method removeContainers (line 66) | func (c *Composer) removeContainers(ctx context.Context, containers []co...
method removeContainersFromParsedServices (line 99) | func (c *Composer) removeContainersFromParsedServices(ctx context.Contex...
FILE: pkg/composer/run.go
type RunOptions (line 35) | type RunOptions struct
method Run (line 63) | func (c *Composer) Run(ctx context.Context, ro RunOptions) error {
method runServices (line 211) | func (c *Composer) runServices(ctx context.Context, parsedServices []*se...
FILE: pkg/composer/serviceparser/build.go
function parseBuildConfig (line 35) | func parseBuildConfig(c *types.BuildConfig, project *types.Project, imag...
FILE: pkg/composer/serviceparser/build_test.go
function lastOf (line 29) | func lastOf(ss []string) string {
function TestParseBuild (line 33) | func TestParseBuild(t *testing.T) {
FILE: pkg/composer/serviceparser/serviceparser.go
constant ComposeVerify (line 41) | ComposeVerify = "x-nerdctl-verify"
constant ComposeCosignPublicKey (line 42) | ComposeCosignPublicKey = "x-nerdctl-cosign-public-key"
constant ComposeSign (line 43) | ComposeSign = "x-nerdctl-sign"
constant ComposeCosignPrivateKey (line 44) | ComposeCosignPrivateKey = "x-nerdctl-cosign-private-key"
constant ComposeCosignCertificateIdentity (line 45) | ComposeCosignCertificateIdentity = "x-nerdctl-cosign-certificate...
constant ComposeCosignCertificateIdentityRegexp (line 46) | ComposeCosignCertificateIdentityRegexp = "x-nerdctl-cosign-certificate...
constant ComposeCosignCertificateOidcIssuer (line 47) | ComposeCosignCertificateOidcIssuer = "x-nerdctl-cosign-certificate...
constant ComposeCosignCertificateOidcIssuerRegexp (line 48) | ComposeCosignCertificateOidcIssuerRegexp = "x-nerdctl-cosign-certificate...
constant Separator (line 53) | Separator = "-"
function warnUnknownFields (line 55) | func warnUnknownFields(svc types.ServiceConfig) {
type Container (line 190) | type Container struct
type Build (line 196) | type Build struct
type Service (line 203) | type Service struct
function getReplicas (line 211) | func getReplicas(svc types.ServiceConfig) (int, error) {
function getCPULimit (line 227) | func getCPULimit(svc types.ServiceConfig) (string, error) {
function getMemLimit (line 244) | func getMemLimit(svc types.ServiceConfig) (types.UnitBytes, error) {
function getGPUs (line 261) | func getGPUs(svc types.ServiceConfig) (reqs []string, _ error) {
function getRestart (line 329) | func getRestart(svc types.ServiceConfig) (string, error) {
type networkNamePair (line 367) | type networkNamePair struct
function getNetworks (line 373) | func getNetworks(project *types.Project, svc types.ServiceConfig) ([]net...
function Parse (line 420) | func Parse(project *types.Project, svc types.ServiceConfig) (*Service, e...
function newContainer (line 475) | func newContainer(project *types.Project, parsed *Service, i int) (*Cont...
function servicePortConfigToFlagP (line 755) | func servicePortConfigToFlagP(c types.ServicePortConfig) (string, error) {
function serviceVolumeConfigToFlagV (line 787) | func serviceVolumeConfigToFlagV(c types.ServiceVolumeConfig, project *ty...
function fileReferenceConfigToFlagV (line 888) | func fileReferenceConfigToFlagV(c types.FileReferenceConfig, project *ty...
function DefaultImageName (line 958) | func DefaultImageName(projectName string, serviceName string) string {
function DefaultContainerName (line 963) | func DefaultContainerName(projectName, serviceName, suffix string) string {
FILE: pkg/composer/serviceparser/serviceparser_test.go
function TestServicePortConfigToFlagP (line 34) | func TestServicePortConfigToFlagP(t *testing.T) {
function TestParse (line 81) | func TestParse(t *testing.T) {
function TestParseDeprecated (line 205) | func TestParseDeprecated(t *testing.T) {
function TestParseDeploy (line 240) | func TestParseDeploy(t *testing.T) {
function TestParseDevices (line 340) | func TestParseDevices(t *testing.T) {
function TestParseRelative (line 370) | func TestParseRelative(t *testing.T) {
function TestParseVolumeLongSyntax (line 406) | func TestParseVolumeLongSyntax(t *testing.T) {
function TestTmpfsVolumeLongSyntax (line 442) | func TestTmpfsVolumeLongSyntax(t *testing.T) {
function TestParseNetworkMode (line 479) | func TestParseNetworkMode(t *testing.T) {
function TestParseConfigs (line 522) | func TestParseConfigs(t *testing.T) {
function TestParseRestartPolicy (line 581) | func TestParseRestartPolicy(t *testing.T) {
FILE: pkg/composer/stop.go
type StopOptions (line 33) | type StopOptions struct
method Stop (line 39) | func (c *Composer) Stop(ctx context.Context, opt StopOptions, services [...
method stopContainers (line 57) | func (c *Composer) stopContainers(ctx context.Context, containers []cont...
method stopContainersFromParsedServices (line 87) | func (c *Composer) stopContainersFromParsedServices(ctx context.Context,...
FILE: pkg/composer/up.go
type UpOptions (line 32) | type UpOptions struct
method recreateStrategy (line 48) | func (opts UpOptions) recreateStrategy() string {
method Up (line 59) | func (c *Composer) Up(ctx context.Context, uo UpOptions, services []stri...
function validateFileObjectConfig (line 126) | func validateFileObjectConfig(obj types.FileObjectConfig, shortName, obj...
FILE: pkg/composer/up_network.go
method upNetwork (line 29) | func (c *Composer) upNetwork(ctx context.Context, shortName string) error {
FILE: pkg/composer/up_service.go
method upServices (line 38) | func (c *Composer) upServices(ctx context.Context, parsedServices []*ser...
method ensureServiceImage (line 105) | func (c *Composer) ensureServiceImage(ctx context.Context, ps *servicepa...
method upServiceContainer (line 129) | func (c *Composer) upServiceContainer(ctx context.Context, service *serv...
method executeUpCmd (line 236) | func (c *Composer) executeUpCmd(ctx context.Context, cmd *exec.Cmd, cont...
FILE: pkg/composer/up_volume.go
method upVolume (line 29) | func (c *Composer) upVolume(ctx context.Context, shortName string) error {
FILE: pkg/config/config.go
type Config (line 28) | type Config struct
function New (line 54) | func New() *Config {
FILE: pkg/consoleutil/consoleutil.go
function Current (line 28) | func Current() (c console.Console, err error) {
type resizer (line 38) | type resizer interface
FILE: pkg/consoleutil/consoleutil_unix.go
function HandleConsoleResize (line 34) | func HandleConsoleResize(ctx context.Context, task resizer, con console....
FILE: pkg/consoleutil/consoleutil_windows.go
function HandleConsoleResize (line 29) | func HandleConsoleResize(ctx context.Context, task resizer, con console....
FILE: pkg/consoleutil/detach.go
constant DefaultDetachKeys (line 29) | DefaultDetachKeys = "ctrl-p,ctrl-q"
type detachableStdin (line 31) | type detachableStdin struct
method Read (line 53) | func (ds *detachableStdin) Read(p []byte) (int, error) {
function NewDetachableStdin (line 39) | func NewDetachableStdin(stdin io.Reader, keys string, closer func()) (io...
FILE: pkg/containerdutil/co
Condensed preview — 916 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,703K chars).
[
{
"path": ".dockerignore",
"chars": 86,
"preview": "# artifacts\n/nerdctl\n_output\n*.gomodjail\n\n# golangci-lint\n/build\n\n# vagrant\n/.vagrant\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yaml",
"chars": 1534,
"preview": "name: Bug report\ndescription: Create a bug report to help improve nerdctl\nlabels: kind/unconfirmed-bug-claim\nbody:\n - t"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 606,
"preview": "blank_issues_enabled: true\ncontact_links:\n - name: Ask a question (GitHub Discussions)\n url: https://github.com/cont"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yaml",
"chars": 666,
"preview": "name: Feature request\ndescription: Suggest an idea for nerdctl\nlabels: kind/feature\nbody:\n - type: textarea\n attribu"
},
{
"path": ".github/dependabot.yml",
"chars": 1588,
"preview": "# -----------------------------------------------------------------------------\n# Forked from https://raw.githubusercont"
},
{
"path": ".github/workflows/ghcr-image-build-and-publish.yml",
"chars": 2372,
"preview": "name: image\n\n# This workflow uses actions that are not certified by GitHub.\n# They are provided by a third-party and are"
},
{
"path": ".github/workflows/job-build.yml",
"chars": 3371,
"preview": "# This job just builds nerdctl for the golang versions we support (as a smoke test)\nname: job-build\n\non:\n workflow_call"
},
{
"path": ".github/workflows/job-lint-go.yml",
"chars": 2387,
"preview": "# This job runs golangci-lint\n# Note that technically, `make lint-go-all` would run the linter for all targets, and coul"
},
{
"path": ".github/workflows/job-lint-other.yml",
"chars": 745,
"preview": "# This job runs any subsidiary linter not part of golangci (shell, yaml, etc)\nname: job-lint-other\n\non:\n workflow_call:"
},
{
"path": ".github/workflows/job-lint-project.yml",
"chars": 2102,
"preview": "# This job runs containerd shared project-checks, that verifies licenses, headers, and commits.\n# To run locally, you ma"
},
{
"path": ".github/workflows/job-test-dependencies.yml",
"chars": 2087,
"preview": "# This job pre-heats the cache for the test image by building all dependencies\nname: job-test-dependencies\n\non:\n workfl"
},
{
"path": ".github/workflows/job-test-in-container.yml",
"chars": 9345,
"preview": "# This job runs integration tests inside a container, for all supported variants (ipv6, canary, etc)\n# Note that it is l"
},
{
"path": ".github/workflows/job-test-in-host.yml",
"chars": 8894,
"preview": "# This currently test docker and nerdctl on windows (w/o canary)\n# Structure is in to allow testing nerdctl on linux as "
},
{
"path": ".github/workflows/job-test-in-lima.yml",
"chars": 4966,
"preview": "# Currently, Lima job test only for EL, though in the future it could be used to also test FreeBSD or other linux-es\nnam"
},
{
"path": ".github/workflows/job-test-in-vagrant.yml",
"chars": 2661,
"preview": "# Right now, this is testing solely FreeBSD, but could be used to test other targets.\n# Alternatively, this might get re"
},
{
"path": ".github/workflows/job-test-unit.yml",
"chars": 2806,
"preview": "# Note: freebsd tests are not ran here (see integration instead)\nname: job-test-unit\n\non:\n workflow_call:\n inputs:\n "
},
{
"path": ".github/workflows/release.yml",
"chars": 2611,
"preview": "# See https://github.com/containerd/nerdctl/blob/main/MAINTAINERS_GUIDE.md for how to make a release.\nname: Release\non:\n"
},
{
"path": ".github/workflows/workflow-flaky.yml",
"chars": 1907,
"preview": "# This workflow puts together all known \"flaky\" and experimental targets\nname: \"[flaky, see #3988]\"\n\non:\n push:\n bra"
},
{
"path": ".github/workflows/workflow-lint.yml",
"chars": 2314,
"preview": "name: lint\n\non:\n push:\n branches:\n - main\n - 'release/**'\n pull_request:\n\njobs:\n # Runs golangci to ensu"
},
{
"path": ".github/workflows/workflow-test.yml",
"chars": 5160,
"preview": "name: test\n\non:\n push:\n branches:\n - main\n - 'release/**'\n pull_request:\n paths-ignore:\n - '**.md"
},
{
"path": ".github/workflows/workflow-tigron.yml",
"chars": 2897,
"preview": "name: tigron\n\non:\n push:\n branches:\n - main\n - 'release/**'\n pull_request:\n paths: 'mod/tigron/**'\n\nen"
},
{
"path": ".gitignore",
"chars": 98,
"preview": "# artifacts\n/nerdctl\n_output\n*.gomodjail\n\n# golangci-lint\n/build\n\n# vagrant\n/.vagrant\nVagrantfile\n"
},
{
"path": ".golangci.yml",
"chars": 9242,
"preview": "version: \"2\"\n\nrun:\n modules-download-mode: readonly\n\nissues:\n max-issues-per-linter: 0\n max-same-issues: 0\n\nlinters:\n"
},
{
"path": ".yamllint",
"chars": 234,
"preview": "---\n\nextends: default\n\nrules:\n indentation:\n spaces: 2\n indent-sequences: consistent\n truthy:\n allowed-values"
},
{
"path": "BUILDING.md",
"chars": 452,
"preview": "# Building nerdctl\n\nTo build nerdctl, use `make`:\n\n```bash\nmake\nsudo make install\n```\n\nAlternatively, nerdctl can be als"
},
{
"path": "Dockerfile",
"chars": 22808,
"preview": "# Copyright The containerd Authors.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/SHA256SUMS",
"chars": 554,
"preview": "3edc52986c442576da856a66b59a61d16cf765359712c5ecf2d147c69f0df6e9 rootlesskit-aarch64.tar.gz\n6ce9eed50f9e12f18f3e5197cf9"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/buildg-v0.5.3",
"chars": 406,
"preview": "cf4c40c58ca795eeb6e75e2c6a0e5bb3a6a9c0623d51bc3b85163e5d483eeade buildg-full-v0.5.3-linux-amd64.tar.gz\n47c479f2e5150c9c"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/buildkit-v0.26.3",
"chars": 204,
"preview": "249ae16ba4be59fadb51a49ff4d632bbf37200e2b6e187fa8574f0f1bce8166b buildkit-v0.26.3.linux-amd64.tar.gz\na98829f1b1b9ec596e"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/cni-plugins-v1.9.0",
"chars": 202,
"preview": "58c03705426e929658f45a851df15a86d06ef680cacbf3f2dc127731ca265c28 cni-plugins-linux-amd64-v1.9.0.tgz\n2596ef56329dd126902"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/containerd-fuse-overlayfs-v2.1.7",
"chars": 707,
"preview": "d54148043c22381af89cec2a167431e40668716404a1eb682ca69dfb890376f3 containerd-fuse-overlayfs-2.1.7-linux-amd64.tar.gz\na30"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/fuse-overlayfs-v1.16",
"chars": 530,
"preview": "6c9ee54166fe7d33ebbfb085812585441f22ebe2a24a868d0a878d3127bcb89e fuse-overlayfs-aarch64\nfc2a73ace8eb6a0553204532de615d7"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/rootlesskit-v1.1.1",
"chars": 554,
"preview": "b74c577abd6ad721e0b7e10a74f4c5ac26cb3afe005ad3d28d4d7912c356079f rootlesskit-aarch64.tar.gz\n95c27e6808c942c67ab93d94e37"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/rootlesskit-v2.3.6",
"chars": 554,
"preview": "3edc52986c442576da856a66b59a61d16cf765359712c5ecf2d147c69f0df6e9 rootlesskit-aarch64.tar.gz\n6ce9eed50f9e12f18f3e5197cf9"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/slirp4netns-v1.3.3",
"chars": 596,
"preview": "d0e6a13342efbedb8b7454629a0e9ce9b7a937c261034c85f46ed81af76307d8 SOURCE_DATE_EPOCH\n1ca9d2f5f1fb4beb91f354653e5dad35b95c"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/stargz-snapshotter-v0.18.1",
"chars": 317,
"preview": "f8f106a61b9fc797a6336d6c06435cdbf8b896f3f49fdc5288e08e87dff6bbdf stargz-snapshotter-v0.18.1-linux-amd64.tar.gz\n643d04f5"
},
{
"path": "Dockerfile.d/SHA256SUMS.d/tini-v0.19.0",
"chars": 168,
"preview": "c5b0666b4cb676901f90dfcb37106783c5fe2077b04590973b885950611b30ee tini-static-amd64\neae1d3aa50c48fb23b8cbdf4e369d0910dfc"
},
{
"path": "Dockerfile.d/etc_buildkit_buildkitd.toml",
"chars": 93,
"preview": "[worker.oci]\n enabled = false\n\n[worker.containerd]\n enabled = true\n namespace = \"default\"\n"
},
{
"path": "Dockerfile.d/etc_containerd_config.toml",
"chars": 518,
"preview": "version = 2\n\n# Enable stargz snapshotter\n[proxy_plugins]\n [proxy_plugins.stargz]\n type = \"snapshot\"\n address = \"/"
},
{
"path": "Dockerfile.d/etc_systemd_system_user@.service.d_delegate.conf",
"chars": 23,
"preview": "[Service]\nDelegate=yes\n"
},
{
"path": "Dockerfile.d/home_rootless_.config_systemd_user_containerd.service.d_port-slirp4netns.conf",
"chars": 155,
"preview": "[Service]\n# Change the port driver from \"builtin\" to \"slirp4netns\". Only used in CI.\nEnvironment=\"CONTAINERD_ROOTLESS_RO"
},
{
"path": "Dockerfile.d/test-integration-buildkit-nerdctl-test.service",
"chars": 1498,
"preview": "# Copyright The containerd Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
},
{
"path": "Dockerfile.d/test-integration-etc_containerd-stargz-grpc_config.toml",
"chars": 38,
"preview": "version = 2\n\n# Enable IPFS\nipfs = true"
},
{
"path": "Dockerfile.d/test-integration-etc_containerd_config.toml",
"chars": 890,
"preview": "version = 2\n\n# Enable stargz snapshotter\n[proxy_plugins]\n [proxy_plugins.stargz]\n type = \"snapshot\"\n address = \"/"
},
{
"path": "Dockerfile.d/test-integration-ipfs-offline.service",
"chars": 190,
"preview": "[Unit]\nDescription=ipfs daemon for integration test (offline)\n\n[Service]\nExecStart=ipfs daemon --init --offline\nEnvironm"
},
{
"path": "Dockerfile.d/test-integration-rootless.sh",
"chars": 3081,
"preview": "#!/bin/bash\n\n# Copyright The containerd Authors.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "Dockerfile.d/test-integration-soci-snapshotter.service",
"chars": 445,
"preview": "[Unit]\nDescription=soci snapshotter containerd plugin for integration test\nDocumentation=https://github.com/awslabs/soci"
},
{
"path": "EMERITUS.md",
"chars": 1542,
"preview": "See [`MAINTAINERS`](./MAINTAINERS) for the current active maintainers.\n- - -\n# nerdctl Emeritus Maintainers\n\n## Committe"
},
{
"path": "LICENSE",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "MAINTAINERS",
"chars": 1400,
"preview": "# nerdctl maintainers\n#\n# As a containerd sub-project, containerd maintainers are also included from https://github.com/"
},
{
"path": "MAINTAINERS_GUIDE.md",
"chars": 2188,
"preview": "# Maintainers' guide\n\n## Maintainer list\n\n- Core: https://github.com/containerd/project/blob/main/MAINTAINERS\n- Non-core"
},
{
"path": "Makefile",
"chars": 11889,
"preview": "# Copyright The containerd Authors.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n"
},
{
"path": "NOTICE",
"chars": 1459,
"preview": "nerdctl\nCopyright The containerd Authors.\n\nThis project contains portions of other projects that are licensed under the "
},
{
"path": "README.md",
"chars": 12155,
"preview": "[[⬇️ **Download]**](https://github.com/containerd/nerdctl/releases)\n[[📖 **Command reference]**](./docs/command-reference"
},
{
"path": "SECURITY.md",
"chars": 95,
"preview": "See https://github.com/containerd/project/blob/main/SECURITY.md for reporting a vulnerability.\n"
},
{
"path": "Vagrantfile.freebsd",
"chars": 2244,
"preview": "# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\n# Copyright The containerd Authors.\n#\n# Licensed under the Apache License,"
},
{
"path": "cmd/nerdctl/apparmor/apparmor_inspect_linux.go",
"chars": 1341,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/apparmor/apparmor_linux.go",
"chars": 1119,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/apparmor/apparmor_linux_test.go",
"chars": 734,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/apparmor/apparmor_list_linux.go",
"chars": 2029,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/apparmor/apparmor_load_linux.go",
"chars": 1173,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/apparmor/apparmor_unload_linux.go",
"chars": 1607,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/builder/builder.go",
"chars": 6719,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/builder/builder_build.go",
"chars": 11039,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/builder/builder_build_oci_layout_test.go",
"chars": 3626,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/builder/builder_build_test.go",
"chars": 36902,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/builder/builder_builder_test.go",
"chars": 7972,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/builder/builder_test.go",
"chars": 733,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/checkpoint/checkpoint.go",
"chars": 1321,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/checkpoint/checkpoint_create.go",
"chars": 2830,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/checkpoint/checkpoint_create_linux_test.go",
"chars": 4290,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/checkpoint/checkpoint_list.go",
"chars": 2695,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/checkpoint/checkpoint_list_linux_test.go",
"chars": 3409,
"preview": "//go:build linux\n\n/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"Licen"
},
{
"path": "cmd/nerdctl/checkpoint/checkpoint_remove.go",
"chars": 2552,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/checkpoint/checkpoint_remove_linux_test.go",
"chars": 4450,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/checkpoint/checkpoint_test.go",
"chars": 736,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/completion/completion.go",
"chars": 5521,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/completion/completion_linux.go",
"chars": 1539,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/completion/completion_test.go",
"chars": 7458,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/completion/completion_unix.go",
"chars": 3963,
"preview": "//go:build unix\n\n/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"Licens"
},
{
"path": "cmd/nerdctl/completion/completion_unix_nolinux.go",
"chars": 843,
"preview": "//go:build unix && !linux\n\n/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (t"
},
{
"path": "cmd/nerdctl/completion/completion_windows.go",
"chars": 2001,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose.go",
"chars": 3414,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_build.go",
"chars": 2354,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_build_linux_test.go",
"chars": 4491,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_config.go",
"chars": 2835,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_config_test.go",
"chars": 7808,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_cp.go",
"chars": 3000,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_cp_linux_test.go",
"chars": 2756,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_create.go",
"chars": 3127,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_create_linux_test.go",
"chars": 11594,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_down.go",
"chars": 2278,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_down_linux_test.go",
"chars": 5138,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_exec.go",
"chars": 4552,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_exec_linux_test.go",
"chars": 9956,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_images.go",
"chars": 5369,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_images_linux_test.go",
"chars": 4384,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_kill.go",
"chars": 1934,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_kill_linux_test.go",
"chars": 3651,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_logs.go",
"chars": 2633,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_pause.go",
"chars": 2783,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_pause_linux_test.go",
"chars": 3257,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_port.go",
"chars": 2843,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_port_linux_test.go",
"chars": 6901,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_ps.go",
"chars": 11481,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_ps_linux_test.go",
"chars": 6672,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_pull.go",
"chars": 1909,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_pull_linux_test.go",
"chars": 1587,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_push.go",
"chars": 1728,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_restart.go",
"chars": 2008,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_restart_linux_test.go",
"chars": 2515,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_rm.go",
"chars": 2614,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_rm_linux_test.go",
"chars": 4050,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_run.go",
"chars": 6743,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_run_linux_test.go",
"chars": 16131,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_start.go",
"chars": 3985,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_start_linux_test.go",
"chars": 3412,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_stop.go",
"chars": 1997,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_stop_linux_test.go",
"chars": 3271,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_test.go",
"chars": 733,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_top.go",
"chars": 2767,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_top_linux_test.go",
"chars": 2268,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_up.go",
"chars": 5372,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_up_linux_test.go",
"chars": 41393,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_up_test.go",
"chars": 3060,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_version.go",
"chars": 2017,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/compose/compose_version_test.go",
"chars": 1474,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container.go",
"chars": 1612,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_attach.go",
"chars": 3818,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_attach_linux_test.go",
"chars": 8532,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_commit.go",
"chars": 6269,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_commit_linux_test.go",
"chars": 3872,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_commit_test.go",
"chars": 5015,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_cp_acid_linux_test.go",
"chars": 8063,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_cp_linux.go",
"chars": 5144,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_cp_linux_test.go",
"chars": 39512,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_cp_nolinux.go",
"chars": 721,
"preview": "//go:build !linux\n\n/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "cmd/nerdctl/container/container_create.go",
"chars": 14551,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_create_linux_test.go",
"chars": 18825,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_create_test.go",
"chars": 3911,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_diff.go",
"chars": 6564,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_diff_test.go",
"chars": 1805,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_exec.go",
"chars": 5035,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_exec_linux_test.go",
"chars": 5112,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_exec_test.go",
"chars": 4950,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_export.go",
"chars": 2670,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_export_test.go",
"chars": 5285,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_health_check.go",
"chars": 2605,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_health_check_linux_test.go",
"chars": 46282,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_inspect.go",
"chars": 3780,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_inspect_linux_test.go",
"chars": 20319,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_inspect_windows_test.go",
"chars": 3846,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_kill.go",
"chars": 2409,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_kill_linux_test.go",
"chars": 2532,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_list.go",
"chars": 6737,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_list_linux_test.go",
"chars": 22870,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_list_test.go",
"chars": 2946,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_list_windows_test.go",
"chars": 8040,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_logs.go",
"chars": 4520,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_logs_test.go",
"chars": 21446,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_pause.go",
"chars": 2336,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_port.go",
"chars": 3335,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_prune.go",
"chars": 2225,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_prune_linux_test.go",
"chars": 2023,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_remove.go",
"chars": 2414,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_remove_linux_test.go",
"chars": 4477,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_remove_test.go",
"chars": 1555,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_remove_windows_test.go",
"chars": 2336,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_rename.go",
"chars": 2120,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_rename_linux_test.go",
"chars": 6188,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_rename_windows_test.go",
"chars": 5482,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_restart.go",
"chars": 2851,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_restart_linux_test.go",
"chars": 9479,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run.go",
"chars": 25891,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_cgroup_linux_test.go",
"chars": 27164,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_gpus_test.go",
"chars": 1695,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_linux.go",
"chars": 1074,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_linux_test.go",
"chars": 33796,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_log_driver_syslog_test.go",
"chars": 9959,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_mount_linux_test.go",
"chars": 24650,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_mount_windows_test.go",
"chars": 6621,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_network.go",
"chars": 5371,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_network_base_test.go",
"chars": 5970,
"preview": "//go:build linux || windows\n\n/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 "
},
{
"path": "cmd/nerdctl/container/container_run_network_linux_test.go",
"chars": 39641,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_network_windows_test.go",
"chars": 6230,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_nolinux.go",
"chars": 870,
"preview": "//go:build !linux\n\n/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "cmd/nerdctl/container/container_run_restart_linux_test.go",
"chars": 6094,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_runtime_linux_test.go",
"chars": 2149,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_security_linux_test.go",
"chars": 8792,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_soci_linux_test.go",
"chars": 2327,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_stargz_linux_test.go",
"chars": 1226,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_systemd_linux_test.go",
"chars": 8915,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_test.go",
"chars": 33636,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_user_linux_test.go",
"chars": 18674,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_user_windows_test.go",
"chars": 1890,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_verify_linux_test.go",
"chars": 2509,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_run_windows_test.go",
"chars": 7373,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_start.go",
"chars": 3650,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_start_linux_test.go",
"chars": 4648,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "cmd/nerdctl/container/container_start_test.go",
"chars": 2265,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
}
]
// ... and 716 more files (download for full content)
About this extraction
This page contains the full source code of the containerd/nerdctl GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 916 files (4.1 MB), approximately 1.1M tokens, and a symbol index with 3639 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.