summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--cmd/podman/auto-update.go6
-rw-r--r--cmd/podman/common/completion.go16
-rw-r--r--cmd/podman/common/create.go4
-rw-r--r--cmd/podman/common/create_opts.go18
-rw-r--r--cmd/podman/common/createparse.go2
-rw-r--r--cmd/podman/common/default.go2
-rw-r--r--cmd/podman/common/diffChanges.go2
-rw-r--r--cmd/podman/common/netflags.go8
-rw-r--r--cmd/podman/common/specgen.go27
-rw-r--r--cmd/podman/common/util.go2
-rw-r--r--cmd/podman/common/volumes.go4
-rw-r--r--cmd/podman/completion/completion.go4
-rw-r--r--cmd/podman/containers/attach.go8
-rw-r--r--cmd/podman/containers/checkpoint.go12
-rw-r--r--cmd/podman/containers/cleanup.go10
-rw-r--r--cmd/podman/containers/commit.go6
-rw-r--r--cmd/podman/containers/container.go8
-rw-r--r--cmd/podman/containers/cp.go14
-rw-r--r--cmd/podman/containers/create.go14
-rw-r--r--cmd/podman/containers/diff.go8
-rw-r--r--cmd/podman/containers/exec.go14
-rw-r--r--cmd/podman/containers/exists.go6
-rw-r--r--cmd/podman/containers/export.go8
-rw-r--r--cmd/podman/containers/init.go10
-rw-r--r--cmd/podman/containers/inspect.go10
-rw-r--r--cmd/podman/containers/kill.go14
-rw-r--r--cmd/podman/containers/list.go6
-rw-r--r--cmd/podman/containers/logs.go10
-rw-r--r--cmd/podman/containers/mount.go10
-rw-r--r--cmd/podman/containers/pause.go12
-rw-r--r--cmd/podman/containers/port.go8
-rw-r--r--cmd/podman/containers/prune.go8
-rw-r--r--cmd/podman/containers/ps.go18
-rw-r--r--cmd/podman/containers/rename.go6
-rw-r--r--cmd/podman/containers/restart.go12
-rw-r--r--cmd/podman/containers/restore.go12
-rw-r--r--cmd/podman/containers/rm.go12
-rw-r--r--cmd/podman/containers/run.go16
-rw-r--r--cmd/podman/containers/runlabel.go6
-rw-r--r--cmd/podman/containers/start.go12
-rw-r--r--cmd/podman/containers/stats.go18
-rw-r--r--cmd/podman/containers/stop.go12
-rw-r--r--cmd/podman/containers/top.go10
-rw-r--r--cmd/podman/containers/unmount.go10
-rw-r--r--cmd/podman/containers/unpause.go12
-rw-r--r--cmd/podman/containers/wait.go12
-rw-r--r--cmd/podman/diff.go12
-rw-r--r--cmd/podman/early_init_linux.go2
-rw-r--r--cmd/podman/generate/generate.go8
-rw-r--r--cmd/podman/generate/kube.go8
-rw-r--r--cmd/podman/generate/systemd.go8
-rw-r--r--cmd/podman/healthcheck/healthcheck.go6
-rw-r--r--cmd/podman/healthcheck/run.go6
-rw-r--r--cmd/podman/images/build.go8
-rw-r--r--cmd/podman/images/diff.go6
-rw-r--r--cmd/podman/images/exists.go6
-rw-r--r--cmd/podman/images/history.go8
-rw-r--r--cmd/podman/images/image.go6
-rw-r--r--cmd/podman/images/images.go4
-rw-r--r--cmd/podman/images/import.go8
-rw-r--r--cmd/podman/images/inspect.go8
-rw-r--r--cmd/podman/images/list.go8
-rw-r--r--cmd/podman/images/load.go8
-rw-r--r--cmd/podman/images/mount.go8
-rw-r--r--cmd/podman/images/prune.go8
-rw-r--r--cmd/podman/images/pull.go8
-rw-r--r--cmd/podman/images/push.go8
-rw-r--r--cmd/podman/images/rm.go8
-rw-r--r--cmd/podman/images/rmi.go4
-rw-r--r--cmd/podman/images/save.go12
-rw-r--r--cmd/podman/images/search.go6
-rw-r--r--cmd/podman/images/sign.go6
-rw-r--r--cmd/podman/images/tag.go6
-rw-r--r--cmd/podman/images/tree.go6
-rw-r--r--cmd/podman/images/trust.go6
-rw-r--r--cmd/podman/images/trust_set.go10
-rw-r--r--cmd/podman/images/trust_show.go6
-rw-r--r--cmd/podman/images/unmount.go8
-rw-r--r--cmd/podman/images/untag.go6
-rw-r--r--cmd/podman/inspect.go8
-rw-r--r--cmd/podman/inspect/inspect.go10
-rw-r--r--cmd/podman/login.go8
-rw-r--r--cmd/podman/logout.go8
-rw-r--r--cmd/podman/main.go32
-rw-r--r--cmd/podman/manifest/add.go8
-rw-r--r--cmd/podman/manifest/annotate.go6
-rw-r--r--cmd/podman/manifest/create.go6
-rw-r--r--cmd/podman/manifest/exists.go6
-rw-r--r--cmd/podman/manifest/inspect.go6
-rw-r--r--cmd/podman/manifest/manifest.go6
-rw-r--r--cmd/podman/manifest/push.go10
-rw-r--r--cmd/podman/manifest/remove.go6
-rw-r--r--cmd/podman/networks/connect.go6
-rw-r--r--cmd/podman/networks/create.go10
-rw-r--r--cmd/podman/networks/disconnect.go6
-rw-r--r--cmd/podman/networks/exists.go6
-rw-r--r--cmd/podman/networks/inspect.go8
-rw-r--r--cmd/podman/networks/list.go12
-rw-r--r--cmd/podman/networks/network.go6
-rw-r--r--cmd/podman/networks/prune.go10
-rw-r--r--cmd/podman/networks/reload.go10
-rw-r--r--cmd/podman/networks/rm.go10
-rw-r--r--cmd/podman/play/kube.go10
-rw-r--r--cmd/podman/play/play.go6
-rw-r--r--cmd/podman/pods/create.go16
-rw-r--r--cmd/podman/pods/exists.go6
-rw-r--r--cmd/podman/pods/inspect.go8
-rw-r--r--cmd/podman/pods/kill.go10
-rw-r--r--cmd/podman/pods/pause.go10
-rw-r--r--cmd/podman/pods/pod.go8
-rw-r--r--cmd/podman/pods/prune.go8
-rw-r--r--cmd/podman/pods/ps.go10
-rw-r--r--cmd/podman/pods/restart.go10
-rw-r--r--cmd/podman/pods/rm.go12
-rw-r--r--cmd/podman/pods/start.go10
-rw-r--r--cmd/podman/pods/stats.go10
-rw-r--r--cmd/podman/pods/stop.go10
-rw-r--r--cmd/podman/pods/top.go10
-rw-r--r--cmd/podman/pods/unpause.go10
-rw-r--r--cmd/podman/registry/config.go6
-rw-r--r--cmd/podman/registry/registry.go8
-rw-r--r--cmd/podman/registry/remote.go2
-rw-r--r--cmd/podman/root.go20
-rw-r--r--cmd/podman/root_test.go2
-rw-r--r--cmd/podman/secrets/create.go6
-rw-r--r--cmd/podman/secrets/inspect.go8
-rw-r--r--cmd/podman/secrets/list.go10
-rw-r--r--cmd/podman/secrets/rm.go8
-rw-r--r--cmd/podman/secrets/secret.go6
-rw-r--r--cmd/podman/shell_completion_test.go2
-rw-r--r--cmd/podman/system/connection.go6
-rw-r--r--cmd/podman/system/connection/add.go10
-rw-r--r--cmd/podman/system/connection/default.go8
-rw-r--r--cmd/podman/system/connection/list.go8
-rw-r--r--cmd/podman/system/connection/remove.go8
-rw-r--r--cmd/podman/system/connection/rename.go8
-rw-r--r--cmd/podman/system/df.go8
-rw-r--r--cmd/podman/system/events.go10
-rw-r--r--cmd/podman/system/info.go8
-rw-r--r--cmd/podman/system/migrate.go8
-rw-r--r--cmd/podman/system/prune.go10
-rw-r--r--cmd/podman/system/renumber.go8
-rw-r--r--cmd/podman/system/reset.go8
-rw-r--r--cmd/podman/system/service.go12
-rw-r--r--cmd/podman/system/service_abi.go6
-rw-r--r--cmd/podman/system/system.go6
-rw-r--r--cmd/podman/system/unshare.go6
-rw-r--r--cmd/podman/system/version.go10
-rw-r--r--cmd/podman/utils/utils.go4
-rw-r--r--cmd/podman/validate/args.go2
-rw-r--r--cmd/podman/validate/latest.go2
-rw-r--r--cmd/podman/volumes/create.go6
-rw-r--r--cmd/podman/volumes/exists.go6
-rw-r--r--cmd/podman/volumes/inspect.go8
-rw-r--r--cmd/podman/volumes/list.go10
-rw-r--r--cmd/podman/volumes/prune.go12
-rw-r--r--cmd/podman/volumes/rm.go10
-rw-r--r--cmd/podman/volumes/volume.go6
-rw-r--r--docs/source/Tutorials.rst1
-rw-r--r--docs/source/markdown/podman-run.1.md2
-rw-r--r--docs/tutorials/README.md4
-rw-r--r--docs/tutorials/basic_networking.md291
-rw-r--r--docs/tutorials/podman-go-bindings.md27
-rw-r--r--docs/tutorials/podman_bridge.pngbin0 -> 48144 bytes
-rw-r--r--docs/tutorials/podman_macvlan.pngbin0 -> 37646 bytes
-rw-r--r--docs/tutorials/podman_pod.pngbin0 -> 53274 bytes
-rw-r--r--docs/tutorials/podman_rootless_default.pngbin0 -> 40293 bytes
-rw-r--r--go.mod10
-rw-r--r--go.sum32
-rw-r--r--hack/podman-registry-go/registry.go2
-rw-r--r--libpod/boltdb_state.go2
-rw-r--r--libpod/boltdb_state_internal.go4
-rw-r--r--libpod/boltdb_state_linux.go2
-rw-r--r--libpod/common_test.go4
-rw-r--r--libpod/container.go6
-rw-r--r--libpod/container_api.go6
-rw-r--r--libpod/container_commit.go8
-rw-r--r--libpod/container_config.go2
-rw-r--r--libpod/container_exec.go4
-rw-r--r--libpod/container_graph.go2
-rw-r--r--libpod/container_graph_test.go2
-rw-r--r--libpod/container_inspect.go6
-rw-r--r--libpod/container_internal.go29
-rw-r--r--libpod/container_internal_linux.go54
-rw-r--r--libpod/container_internal_unsupported.go4
-rw-r--r--libpod/container_log.go4
-rw-r--r--libpod/container_log_linux.go80
-rw-r--r--libpod/container_log_unsupported.go4
-rw-r--r--libpod/container_top_linux.go4
-rw-r--r--libpod/container_top_unsupported.go2
-rw-r--r--libpod/container_validate.go2
-rw-r--r--libpod/define/version.go2
-rw-r--r--libpod/diff.go2
-rw-r--r--libpod/driver/driver.go2
-rw-r--r--libpod/events.go2
-rw-r--r--libpod/events/filters.go2
-rw-r--r--libpod/events/journal_linux.go2
-rw-r--r--libpod/events/logfile.go2
-rw-r--r--libpod/healthcheck.go2
-rw-r--r--libpod/healthcheck_linux.go4
-rw-r--r--libpod/healthcheck_unsupported.go2
-rw-r--r--libpod/image/docker_registry_options.go2
-rw-r--r--libpod/image/errors.go2
-rw-r--r--libpod/image/filters.go2
-rw-r--r--libpod/image/image.go12
-rw-r--r--libpod/image/image_test.go4
-rw-r--r--libpod/image/prune.go6
-rw-r--r--libpod/image/pull.go6
-rw-r--r--libpod/image/search.go2
-rw-r--r--libpod/image/utils.go2
-rw-r--r--libpod/in_memory_state.go4
-rw-r--r--libpod/info.go10
-rw-r--r--libpod/kube.go6
-rw-r--r--libpod/lock/file_lock_manager.go2
-rw-r--r--libpod/lock/shm_lock_manager_linux.go2
-rw-r--r--libpod/logs/log.go2
-rw-r--r--libpod/network/create.go6
-rw-r--r--libpod/network/create_test.go2
-rw-r--r--libpod/network/devices.go4
-rw-r--r--libpod/network/files.go2
-rw-r--r--libpod/network/netconflist.go2
-rw-r--r--libpod/network/network.go8
-rw-r--r--libpod/networking_linux.go14
-rw-r--r--libpod/networking_unsupported.go2
-rw-r--r--libpod/oci.go2
-rw-r--r--libpod/oci_attach_linux.go8
-rw-r--r--libpod/oci_attach_unsupported.go2
-rw-r--r--libpod/oci_conmon_exec_linux.go8
-rw-r--r--libpod/oci_conmon_linux.go16
-rw-r--r--libpod/oci_conmon_unsupported.go2
-rw-r--r--libpod/oci_missing.go2
-rw-r--r--libpod/oci_util.go2
-rw-r--r--libpod/options.go10
-rw-r--r--libpod/plugin/volume_api.go2
-rw-r--r--libpod/pod.go4
-rw-r--r--libpod/pod_api.go10
-rw-r--r--libpod/pod_internal.go2
-rw-r--r--libpod/pod_status.go2
-rw-r--r--libpod/pod_top_linux.go4
-rw-r--r--libpod/pod_top_unsupported.go2
-rw-r--r--libpod/reset.go6
-rw-r--r--libpod/rootless_cni_linux.go8
-rw-r--r--libpod/runtime.go57
-rw-r--r--libpod/runtime_cstorage.go2
-rw-r--r--libpod/runtime_ctr.go12
-rw-r--r--libpod/runtime_img.go13
-rw-r--r--libpod/runtime_img_test.go2
-rw-r--r--libpod/runtime_migrate.go6
-rw-r--r--libpod/runtime_pod.go4
-rw-r--r--libpod/runtime_pod_infra_linux.go13
-rw-r--r--libpod/runtime_pod_linux.go8
-rw-r--r--libpod/runtime_pod_unsupported.go2
-rw-r--r--libpod/runtime_renumber.go2
-rw-r--r--libpod/runtime_volume.go6
-rw-r--r--libpod/runtime_volume_linux.go6
-rw-r--r--libpod/runtime_volume_unsupported.go2
-rw-r--r--libpod/state_test.go4
-rw-r--r--libpod/stats.go4
-rw-r--r--libpod/stats_unsupported.go2
-rw-r--r--libpod/storage.go2
-rw-r--r--libpod/util.go4
-rw-r--r--libpod/util_linux.go6
-rw-r--r--libpod/util_test.go2
-rw-r--r--libpod/util_unsupported.go2
-rw-r--r--libpod/volume.go6
-rw-r--r--libpod/volume_inspect.go2
-rw-r--r--libpod/volume_internal.go2
-rw-r--r--libpod/volume_internal_linux.go4
-rw-r--r--libpod/volume_internal_unsupported.go2
-rw-r--r--pkg/api/handlers/compat/changes.go4
-rw-r--r--pkg/api/handlers/compat/containers.go18
-rw-r--r--pkg/api/handlers/compat/containers_archive.go10
-rw-r--r--pkg/api/handlers/compat/containers_attach.go8
-rw-r--r--pkg/api/handlers/compat/containers_create.go17
-rw-r--r--pkg/api/handlers/compat/containers_export.go4
-rw-r--r--pkg/api/handlers/compat/containers_logs.go8
-rw-r--r--pkg/api/handlers/compat/containers_pause.go4
-rw-r--r--pkg/api/handlers/compat/containers_prune.go10
-rw-r--r--pkg/api/handlers/compat/containers_restart.go10
-rw-r--r--pkg/api/handlers/compat/containers_start.go6
-rw-r--r--pkg/api/handlers/compat/containers_stats.go8
-rw-r--r--pkg/api/handlers/compat/containers_stop.go10
-rw-r--r--pkg/api/handlers/compat/containers_top.go6
-rw-r--r--pkg/api/handlers/compat/containers_unpause.go4
-rw-r--r--pkg/api/handlers/compat/events.go8
-rw-r--r--pkg/api/handlers/compat/exec.go12
-rw-r--r--pkg/api/handlers/compat/images.go26
-rw-r--r--pkg/api/handlers/compat/images_build.go8
-rw-r--r--pkg/api/handlers/compat/images_history.go6
-rw-r--r--pkg/api/handlers/compat/images_prune.go6
-rw-r--r--pkg/api/handlers/compat/images_push.go10
-rw-r--r--pkg/api/handlers/compat/images_remove.go4
-rw-r--r--pkg/api/handlers/compat/images_search.go12
-rw-r--r--pkg/api/handlers/compat/images_tag.go4
-rw-r--r--pkg/api/handlers/compat/info.go10
-rw-r--r--pkg/api/handlers/compat/networks.go12
-rw-r--r--pkg/api/handlers/compat/resize.go6
-rw-r--r--pkg/api/handlers/compat/secrets.go16
-rw-r--r--pkg/api/handlers/compat/swagger.go2
-rw-r--r--pkg/api/handlers/compat/system.go11
-rw-r--r--pkg/api/handlers/compat/unsupported.go4
-rw-r--r--pkg/api/handlers/compat/version.go8
-rw-r--r--pkg/api/handlers/compat/volumes.go12
-rw-r--r--pkg/api/handlers/decoder.go17
-rw-r--r--pkg/api/handlers/libpod/containers.go12
-rw-r--r--pkg/api/handlers/libpod/containers_create.go10
-rw-r--r--pkg/api/handlers/libpod/containers_stats.go8
-rw-r--r--pkg/api/handlers/libpod/copy.go2
-rw-r--r--pkg/api/handlers/libpod/generate.go10
-rw-r--r--pkg/api/handlers/libpod/healthcheck.go6
-rw-r--r--pkg/api/handlers/libpod/images.go20
-rw-r--r--pkg/api/handlers/libpod/images_pull.go14
-rw-r--r--pkg/api/handlers/libpod/info.go4
-rw-r--r--pkg/api/handlers/libpod/manifests.go14
-rw-r--r--pkg/api/handlers/libpod/networks.go12
-rw-r--r--pkg/api/handlers/libpod/play.go10
-rw-r--r--pkg/api/handlers/libpod/pods.go18
-rw-r--r--pkg/api/handlers/libpod/secrets.go8
-rw-r--r--pkg/api/handlers/libpod/swagger.go6
-rw-r--r--pkg/api/handlers/libpod/system.go10
-rw-r--r--pkg/api/handlers/libpod/volumes.go16
-rw-r--r--pkg/api/handlers/swagger/swagger.go10
-rw-r--r--pkg/api/handlers/types.go4
-rw-r--r--pkg/api/handlers/utils/containers.go10
-rw-r--r--pkg/api/handlers/utils/errors.go4
-rw-r--r--pkg/api/handlers/utils/images.go4
-rw-r--r--pkg/api/server/handler_api.go4
-rw-r--r--pkg/api/server/register_archive.go2
-rw-r--r--pkg/api/server/register_auth.go2
-rw-r--r--pkg/api/server/register_containers.go26
-rw-r--r--pkg/api/server/register_distribution.go2
-rw-r--r--pkg/api/server/register_events.go2
-rw-r--r--pkg/api/server/register_exec.go2
-rw-r--r--pkg/api/server/register_generate.go2
-rw-r--r--pkg/api/server/register_healthcheck.go2
-rw-r--r--pkg/api/server/register_images.go4
-rw-r--r--pkg/api/server/register_info.go4
-rw-r--r--pkg/api/server/register_manifest.go2
-rw-r--r--pkg/api/server/register_monitor.go2
-rw-r--r--pkg/api/server/register_networks.go4
-rw-r--r--pkg/api/server/register_ping.go2
-rw-r--r--pkg/api/server/register_play.go2
-rw-r--r--pkg/api/server/register_plugins.go2
-rw-r--r--pkg/api/server/register_pods.go2
-rw-r--r--pkg/api/server/register_secrets.go4
-rw-r--r--pkg/api/server/register_swagger.go2
-rw-r--r--pkg/api/server/register_swarm.go2
-rw-r--r--pkg/api/server/register_system.go4
-rw-r--r--pkg/api/server/register_version.go2
-rw-r--r--pkg/api/server/register_volumes.go4
-rw-r--r--pkg/api/server/server.go8
-rw-r--r--pkg/api/server/swagger.go10
-rw-r--r--pkg/autoupdate/autoupdate.go12
-rw-r--r--pkg/bindings/README.md18
-rw-r--r--pkg/bindings/connection.go4
-rw-r--r--pkg/bindings/containers/archive.go6
-rw-r--r--pkg/bindings/containers/attach.go8
-rw-r--r--pkg/bindings/containers/checkpoint.go4
-rw-r--r--pkg/bindings/containers/commit.go4
-rw-r--r--pkg/bindings/containers/containers.go10
-rw-r--r--pkg/bindings/containers/create.go6
-rw-r--r--pkg/bindings/containers/diff.go2
-rw-r--r--pkg/bindings/containers/exec.go6
-rw-r--r--pkg/bindings/containers/healthcheck.go4
-rw-r--r--pkg/bindings/containers/logs.go2
-rw-r--r--pkg/bindings/containers/mount.go2
-rw-r--r--pkg/bindings/containers/rename.go2
-rw-r--r--pkg/bindings/containers/types.go2
-rw-r--r--pkg/bindings/containers/types_attach_options.go2
-rw-r--r--pkg/bindings/containers/types_checkpoint_options.go2
-rw-r--r--pkg/bindings/containers/types_commit_options.go2
-rw-r--r--pkg/bindings/containers/types_create_options.go2
-rw-r--r--pkg/bindings/containers/types_diff_options.go2
-rw-r--r--pkg/bindings/containers/types_execinspect_options.go2
-rw-r--r--pkg/bindings/containers/types_execstart_options.go2
-rw-r--r--pkg/bindings/containers/types_execstartandattach_options.go2
-rw-r--r--pkg/bindings/containers/types_exists_options.go2
-rw-r--r--pkg/bindings/containers/types_export_options.go2
-rw-r--r--pkg/bindings/containers/types_healthcheck_options.go2
-rw-r--r--pkg/bindings/containers/types_init_options.go2
-rw-r--r--pkg/bindings/containers/types_inspect_options.go2
-rw-r--r--pkg/bindings/containers/types_kill_options.go2
-rw-r--r--pkg/bindings/containers/types_list_options.go2
-rw-r--r--pkg/bindings/containers/types_log_options.go2
-rw-r--r--pkg/bindings/containers/types_mount_options.go2
-rw-r--r--pkg/bindings/containers/types_mountedcontainerpaths_options.go2
-rw-r--r--pkg/bindings/containers/types_pause_options.go2
-rw-r--r--pkg/bindings/containers/types_prune_options.go2
-rw-r--r--pkg/bindings/containers/types_remove_options.go2
-rw-r--r--pkg/bindings/containers/types_rename_options.go2
-rw-r--r--pkg/bindings/containers/types_resizeexectty_options.go2
-rw-r--r--pkg/bindings/containers/types_resizetty_options.go2
-rw-r--r--pkg/bindings/containers/types_restart_options.go2
-rw-r--r--pkg/bindings/containers/types_restore_options.go2
-rw-r--r--pkg/bindings/containers/types_shouldrestart_options.go2
-rw-r--r--pkg/bindings/containers/types_start_options.go2
-rw-r--r--pkg/bindings/containers/types_stats_options.go2
-rw-r--r--pkg/bindings/containers/types_stop_options.go2
-rw-r--r--pkg/bindings/containers/types_top_options.go2
-rw-r--r--pkg/bindings/containers/types_unmount_options.go2
-rw-r--r--pkg/bindings/containers/types_unpause_options.go2
-rw-r--r--pkg/bindings/containers/types_wait_options.go4
-rw-r--r--pkg/bindings/errors.go2
-rw-r--r--pkg/bindings/generate/generate.go4
-rw-r--r--pkg/bindings/generate/types_kube_options.go2
-rw-r--r--pkg/bindings/generate/types_systemd_options.go2
-rw-r--r--pkg/bindings/generator/generator.go2
-rw-r--r--pkg/bindings/images/build.go6
-rw-r--r--pkg/bindings/images/diff.go2
-rw-r--r--pkg/bindings/images/images.go10
-rw-r--r--pkg/bindings/images/pull.go6
-rw-r--r--pkg/bindings/images/rm.go8
-rw-r--r--pkg/bindings/images/types_diff_options.go2
-rw-r--r--pkg/bindings/images/types_exists_options.go2
-rw-r--r--pkg/bindings/images/types_export_options.go2
-rw-r--r--pkg/bindings/images/types_get_options.go2
-rw-r--r--pkg/bindings/images/types_history_options.go2
-rw-r--r--pkg/bindings/images/types_import_options.go2
-rw-r--r--pkg/bindings/images/types_list_options.go2
-rw-r--r--pkg/bindings/images/types_load_options.go2
-rw-r--r--pkg/bindings/images/types_prune_options.go2
-rw-r--r--pkg/bindings/images/types_pull_options.go2
-rw-r--r--pkg/bindings/images/types_push_options.go2
-rw-r--r--pkg/bindings/images/types_remove_options.go2
-rw-r--r--pkg/bindings/images/types_search_options.go2
-rw-r--r--pkg/bindings/images/types_tag_options.go2
-rw-r--r--pkg/bindings/images/types_tree_options.go2
-rw-r--r--pkg/bindings/images/types_untag_options.go2
-rw-r--r--pkg/bindings/manifests/manifests.go6
-rw-r--r--pkg/bindings/manifests/types_add_options.go2
-rw-r--r--pkg/bindings/manifests/types_create_options.go2
-rw-r--r--pkg/bindings/manifests/types_exists_options.go2
-rw-r--r--pkg/bindings/manifests/types_inspect_options.go2
-rw-r--r--pkg/bindings/manifests/types_remove_options.go2
-rw-r--r--pkg/bindings/network/network.go4
-rw-r--r--pkg/bindings/network/types_connect_options.go2
-rw-r--r--pkg/bindings/network/types_create_options.go2
-rw-r--r--pkg/bindings/network/types_disconnect_options.go2
-rw-r--r--pkg/bindings/network/types_exists_options.go2
-rw-r--r--pkg/bindings/network/types_inspect_options.go2
-rw-r--r--pkg/bindings/network/types_list_options.go2
-rw-r--r--pkg/bindings/network/types_prune_options.go2
-rw-r--r--pkg/bindings/network/types_remove_options.go2
-rw-r--r--pkg/bindings/play/play.go6
-rw-r--r--pkg/bindings/play/types_kube_options.go2
-rw-r--r--pkg/bindings/pods/pods.go8
-rw-r--r--pkg/bindings/pods/types_create_options.go2
-rw-r--r--pkg/bindings/pods/types_exists_options.go2
-rw-r--r--pkg/bindings/pods/types_inspect_options.go2
-rw-r--r--pkg/bindings/pods/types_kill_options.go2
-rw-r--r--pkg/bindings/pods/types_list_options.go2
-rw-r--r--pkg/bindings/pods/types_pause_options.go2
-rw-r--r--pkg/bindings/pods/types_prune_options.go2
-rw-r--r--pkg/bindings/pods/types_remove_options.go2
-rw-r--r--pkg/bindings/pods/types_restart_options.go2
-rw-r--r--pkg/bindings/pods/types_start_options.go2
-rw-r--r--pkg/bindings/pods/types_stats_options.go2
-rw-r--r--pkg/bindings/pods/types_stop_options.go2
-rw-r--r--pkg/bindings/pods/types_top_options.go2
-rw-r--r--pkg/bindings/pods/types_unpause_options.go2
-rw-r--r--pkg/bindings/secrets/secrets.go4
-rw-r--r--pkg/bindings/secrets/types_create_options.go2
-rw-r--r--pkg/bindings/secrets/types_inspect_options.go2
-rw-r--r--pkg/bindings/secrets/types_list_options.go2
-rw-r--r--pkg/bindings/secrets/types_remove_options.go2
-rw-r--r--pkg/bindings/system/info.go4
-rw-r--r--pkg/bindings/system/system.go6
-rw-r--r--pkg/bindings/system/types_disk_options.go2
-rw-r--r--pkg/bindings/system/types_events_options.go2
-rw-r--r--pkg/bindings/system/types_info_options.go2
-rw-r--r--pkg/bindings/system/types_prune_options.go2
-rw-r--r--pkg/bindings/system/types_version_options.go2
-rw-r--r--pkg/bindings/test/attach_test.go6
-rw-r--r--pkg/bindings/test/auth_test.go4
-rw-r--r--pkg/bindings/test/common_test.go8
-rw-r--r--pkg/bindings/test/containers_test.go10
-rw-r--r--pkg/bindings/test/create_test.go4
-rw-r--r--pkg/bindings/test/exec_test.go6
-rw-r--r--pkg/bindings/test/images_test.go8
-rw-r--r--pkg/bindings/test/info_test.go8
-rw-r--r--pkg/bindings/test/manifests_test.go6
-rw-r--r--pkg/bindings/test/pods_test.go8
-rw-r--r--pkg/bindings/test/secrets_test.go4
-rw-r--r--pkg/bindings/test/system_test.go14
-rw-r--r--pkg/bindings/test/volumes_test.go10
-rw-r--r--pkg/bindings/util/util.go11
-rw-r--r--pkg/bindings/volumes/types_create_options.go2
-rw-r--r--pkg/bindings/volumes/types_exists_options.go2
-rw-r--r--pkg/bindings/volumes/types_inspect_options.go2
-rw-r--r--pkg/bindings/volumes/types_list_options.go2
-rw-r--r--pkg/bindings/volumes/types_prune_options.go2
-rw-r--r--pkg/bindings/volumes/types_remove_options.go2
-rw-r--r--pkg/bindings/volumes/volumes.go6
-rw-r--r--pkg/cgroups/cgroups.go2
-rw-r--r--pkg/cgroups/cgroups_test.go2
-rw-r--r--pkg/checkpoint/checkpoint_restore.go10
-rw-r--r--pkg/domain/entities/container_ps.go2
-rw-r--r--pkg/domain/entities/containers.go16
-rw-r--r--pkg/domain/entities/engine_container.go6
-rw-r--r--pkg/domain/entities/engine_image.go2
-rw-r--r--pkg/domain/entities/events.go2
-rw-r--r--pkg/domain/entities/images.go4
-rw-r--r--pkg/domain/entities/pods.go4
-rw-r--r--pkg/domain/entities/secrets.go2
-rw-r--r--pkg/domain/entities/system.go4
-rw-r--r--pkg/domain/entities/types.go4
-rw-r--r--pkg/domain/entities/volumes.go2
-rw-r--r--pkg/domain/filters/containers.go10
-rw-r--r--pkg/domain/filters/pods.go8
-rw-r--r--pkg/domain/filters/volumes.go2
-rw-r--r--pkg/domain/infra/abi/archive.go11
-rw-r--r--pkg/domain/infra/abi/auto-update.go4
-rw-r--r--pkg/domain/infra/abi/containers.go62
-rw-r--r--pkg/domain/infra/abi/containers_runlabel.go10
-rw-r--r--pkg/domain/infra/abi/containers_stat.go6
-rw-r--r--pkg/domain/infra/abi/events.go4
-rw-r--r--pkg/domain/infra/abi/generate.go8
-rw-r--r--pkg/domain/infra/abi/healthcheck.go4
-rw-r--r--pkg/domain/infra/abi/images.go14
-rw-r--r--pkg/domain/infra/abi/images_list.go4
-rw-r--r--pkg/domain/infra/abi/manifest.go4
-rw-r--r--pkg/domain/infra/abi/network.go8
-rw-r--r--pkg/domain/infra/abi/parse/parse.go4
-rw-r--r--pkg/domain/infra/abi/play.go14
-rw-r--r--pkg/domain/infra/abi/pods.go14
-rw-r--r--pkg/domain/infra/abi/pods_stats.go10
-rw-r--r--pkg/domain/infra/abi/runtime.go2
-rw-r--r--pkg/domain/infra/abi/secrets.go2
-rw-r--r--pkg/domain/infra/abi/system.go18
-rw-r--r--pkg/domain/infra/abi/terminal/sigproxy_linux.go8
-rw-r--r--pkg/domain/infra/abi/terminal/terminal.go2
-rw-r--r--pkg/domain/infra/abi/terminal/terminal_linux.go4
-rw-r--r--pkg/domain/infra/abi/trust.go4
-rw-r--r--pkg/domain/infra/abi/volumes.go12
-rw-r--r--pkg/domain/infra/runtime_abi.go10
-rw-r--r--pkg/domain/infra/runtime_abi_unsupported.go2
-rw-r--r--pkg/domain/infra/runtime_libpod.go12
-rw-r--r--pkg/domain/infra/runtime_proxy.go4
-rw-r--r--pkg/domain/infra/runtime_tunnel.go6
-rw-r--r--pkg/domain/infra/tunnel/auto-update.go2
-rw-r--r--pkg/domain/infra/tunnel/containers.go40
-rw-r--r--pkg/domain/infra/tunnel/events.go6
-rw-r--r--pkg/domain/infra/tunnel/generate.go4
-rw-r--r--pkg/domain/infra/tunnel/healthcheck.go6
-rw-r--r--pkg/domain/infra/tunnel/helpers.go33
-rw-r--r--pkg/domain/infra/tunnel/images.go14
-rw-r--r--pkg/domain/infra/tunnel/manifest.go6
-rw-r--r--pkg/domain/infra/tunnel/network.go6
-rw-r--r--pkg/domain/infra/tunnel/play.go4
-rw-r--r--pkg/domain/infra/tunnel/pods.go10
-rw-r--r--pkg/domain/infra/tunnel/secrets.go6
-rw-r--r--pkg/domain/infra/tunnel/system.go6
-rw-r--r--pkg/domain/infra/tunnel/trust.go2
-rw-r--r--pkg/domain/infra/tunnel/volumes.go8
-rw-r--r--pkg/hooks/0.1.0/hook.go2
-rw-r--r--pkg/hooks/0.1.0/hook_test.go2
-rw-r--r--pkg/hooks/hooks.go2
-rw-r--r--pkg/hooks/hooks_test.go2
-rw-r--r--pkg/hooks/monitor.go2
-rw-r--r--pkg/hooks/read.go4
-rw-r--r--pkg/hooks/read_test.go2
-rw-r--r--pkg/inspect/inspect.go2
-rw-r--r--pkg/netns/netns_linux.go4
-rw-r--r--pkg/parallel/ctr/ctr.go4
-rw-r--r--pkg/ps/ps.go10
-rw-r--r--pkg/registrar/registrar_test.go4
-rw-r--r--pkg/registries/registries.go2
-rw-r--r--pkg/resolvconf/resolvconf.go2
-rw-r--r--pkg/rootless/rootless_linux.c12
-rw-r--r--pkg/rootless/rootless_linux.go2
-rw-r--r--pkg/specgen/config_unsupported.go2
-rw-r--r--pkg/specgen/container_validate.go6
-rw-r--r--pkg/specgen/generate/config_linux.go4
-rw-r--r--pkg/specgen/generate/config_linux_cgo.go6
-rw-r--r--pkg/specgen/generate/config_linux_nocgo.go4
-rw-r--r--pkg/specgen/generate/container.go12
-rw-r--r--pkg/specgen/generate/container_create.go8
-rw-r--r--pkg/specgen/generate/kube/kube.go8
-rw-r--r--pkg/specgen/generate/kube/seccomp.go2
-rw-r--r--pkg/specgen/generate/kube/volume.go2
-rw-r--r--pkg/specgen/generate/namespaces.go12
-rw-r--r--pkg/specgen/generate/oci.go15
-rw-r--r--pkg/specgen/generate/pod_create.go4
-rw-r--r--pkg/specgen/generate/ports.go4
-rw-r--r--pkg/specgen/generate/security.go10
-rw-r--r--pkg/specgen/generate/storage.go8
-rw-r--r--pkg/specgen/generate/validate.go6
-rw-r--r--pkg/specgen/namespaces.go4
-rw-r--r--pkg/specgen/pod_validate.go4
-rw-r--r--pkg/systemd/dbus.go2
-rw-r--r--pkg/systemd/generate/containers.go6
-rw-r--r--pkg/systemd/generate/containers_test.go2
-rw-r--r--pkg/systemd/generate/pods.go6
-rw-r--r--pkg/systemd/generate/pods_test.go2
-rw-r--r--pkg/util/utils.go8
-rw-r--r--pkg/util/utils_supported.go2
-rw-r--r--test/apiv2/10-images.at7
-rw-r--r--test/apiv2/20-containers.at2
-rw-r--r--test/e2e/attach_test.go2
-rw-r--r--test/e2e/build_test.go2
-rw-r--r--test/e2e/checkpoint_test.go4
-rw-r--r--test/e2e/commit_test.go2
-rw-r--r--test/e2e/common_test.go21
-rw-r--r--test/e2e/container_inspect_test.go4
-rw-r--r--test/e2e/containers_conf_test.go2
-rw-r--r--test/e2e/cp_test.go2
-rw-r--r--test/e2e/create_staticip_test.go4
-rw-r--r--test/e2e/create_staticmac_test.go4
-rw-r--r--test/e2e/create_test.go2
-rw-r--r--test/e2e/diff_test.go2
-rw-r--r--test/e2e/events_test.go2
-rw-r--r--test/e2e/exec_test.go2
-rw-r--r--test/e2e/exists_test.go2
-rw-r--r--test/e2e/export_test.go2
-rw-r--r--test/e2e/generate_kube_test.go2
-rw-r--r--test/e2e/generate_systemd_test.go25
-rw-r--r--test/e2e/healthcheck_run_test.go2
-rw-r--r--test/e2e/history_test.go2
-rw-r--r--test/e2e/image_sign_test.go2
-rw-r--r--test/e2e/images_test.go2
-rw-r--r--test/e2e/import_test.go2
-rw-r--r--test/e2e/info_test.go2
-rw-r--r--test/e2e/init_test.go2
-rw-r--r--test/e2e/inspect_test.go2
-rw-r--r--test/e2e/kill_test.go15
-rw-r--r--test/e2e/libpod_suite_remote_test.go2
-rw-r--r--test/e2e/load_test.go2
-rw-r--r--test/e2e/login_logout_test.go2
-rw-r--r--test/e2e/logs_test.go624
-rw-r--r--test/e2e/manifest_test.go2
-rw-r--r--test/e2e/mount_rootless_test.go2
-rw-r--r--test/e2e/mount_test.go2
-rw-r--r--test/e2e/namespace_test.go2
-rw-r--r--test/e2e/negative_test.go2
-rw-r--r--test/e2e/network_connect_disconnect_test.go2
-rw-r--r--test/e2e/network_create_test.go4
-rw-r--r--test/e2e/network_test.go4
-rw-r--r--test/e2e/pause_test.go2
-rw-r--r--test/e2e/play_kube_test.go2
-rw-r--r--test/e2e/pod_create_test.go18
-rw-r--r--test/e2e/pod_infra_container_test.go2
-rw-r--r--test/e2e/pod_inspect_test.go4
-rw-r--r--test/e2e/pod_kill_test.go2
-rw-r--r--test/e2e/pod_pause_test.go2
-rw-r--r--test/e2e/pod_pod_namespaces_test.go2
-rw-r--r--test/e2e/pod_prune_test.go2
-rw-r--r--test/e2e/pod_ps_test.go2
-rw-r--r--test/e2e/pod_restart_test.go2
-rw-r--r--test/e2e/pod_rm_test.go2
-rw-r--r--test/e2e/pod_start_test.go2
-rw-r--r--test/e2e/pod_stats_test.go2
-rw-r--r--test/e2e/pod_stop_test.go2
-rw-r--r--test/e2e/pod_top_test.go2
-rw-r--r--test/e2e/port_test.go2
-rw-r--r--test/e2e/prune_test.go2
-rw-r--r--test/e2e/ps_test.go17
-rw-r--r--test/e2e/pull_test.go2
-rw-r--r--test/e2e/push_test.go4
-rw-r--r--test/e2e/rename_test.go2
-rw-r--r--test/e2e/restart_test.go2
-rw-r--r--test/e2e/rm_test.go2
-rw-r--r--test/e2e/rmi_test.go2
-rw-r--r--test/e2e/run_apparmor_test.go2
-rw-r--r--test/e2e/run_cgroup_parent_test.go2
-rw-r--r--test/e2e/run_cleanup_test.go2
-rw-r--r--test/e2e/run_cpu_test.go2
-rw-r--r--test/e2e/run_device_test.go2
-rw-r--r--test/e2e/run_dns_test.go2
-rw-r--r--test/e2e/run_entrypoint_test.go14
-rw-r--r--test/e2e/run_env_test.go2
-rw-r--r--test/e2e/run_exit_test.go4
-rw-r--r--test/e2e/run_memory_test.go26
-rw-r--r--test/e2e/run_networking_test.go2
-rw-r--r--test/e2e/run_ns_test.go2
-rw-r--r--test/e2e/run_passwd_test.go2
-rw-r--r--test/e2e/run_privileged_test.go2
-rw-r--r--test/e2e/run_restart_test.go2
-rw-r--r--test/e2e/run_seccomp_test.go2
-rw-r--r--test/e2e/run_security_labels_test.go2
-rw-r--r--test/e2e/run_selinux_test.go2
-rw-r--r--test/e2e/run_signal_test.go4
-rw-r--r--test/e2e/run_staticip_test.go2
-rw-r--r--test/e2e/run_test.go25
-rw-r--r--test/e2e/run_userns_test.go2
-rw-r--r--test/e2e/run_volume_test.go28
-rw-r--r--test/e2e/run_working_dir_test.go8
-rw-r--r--test/e2e/runlabel_test.go2
-rw-r--r--test/e2e/save_test.go4
-rw-r--r--test/e2e/search_test.go2
-rw-r--r--test/e2e/secret_test.go2
-rw-r--r--test/e2e/start_test.go19
-rw-r--r--test/e2e/stats_test.go2
-rw-r--r--test/e2e/stop_test.go8
-rw-r--r--test/e2e/system_connection_test.go2
-rw-r--r--test/e2e/system_df_test.go2
-rw-r--r--test/e2e/system_reset_test.go2
-rw-r--r--test/e2e/systemd_test.go2
-rw-r--r--test/e2e/tag_test.go2
-rw-r--r--test/e2e/toolbox_test.go4
-rw-r--r--test/e2e/top_test.go2
-rw-r--r--test/e2e/tree_test.go2
-rw-r--r--test/e2e/trust_test.go2
-rw-r--r--test/e2e/unshare_test.go2
-rw-r--r--test/e2e/untag_test.go2
-rw-r--r--test/e2e/version_test.go4
-rw-r--r--test/e2e/volume_create_test.go2
-rw-r--r--test/e2e/volume_exists_test.go2
-rw-r--r--test/e2e/volume_inspect_test.go2
-rw-r--r--test/e2e/volume_ls_test.go2
-rw-r--r--test/e2e/volume_plugin_test.go2
-rw-r--r--test/e2e/volume_prune_test.go2
-rw-r--r--test/e2e/volume_rm_test.go2
-rw-r--r--test/e2e/wait_test.go2
-rw-r--r--test/python/docker/test_containers.py7
-rw-r--r--test/system/030-run.bats6
-rw-r--r--test/system/065-cp.bats26
-rw-r--r--test/system/070-build.bats25
-rw-r--r--test/utils/common_function_test.go2
-rw-r--r--test/utils/podmansession_test.go2
-rw-r--r--test/utils/podmantest_test.go2
-rw-r--r--test/utils/utils.go10
-rw-r--r--test/utils/utils_suite_test.go2
-rw-r--r--utils/utils.go2
-rw-r--r--utils/utils_supported.go4
-rw-r--r--vendor/github.com/containers/buildah/CHANGELOG.md12
-rw-r--r--vendor/github.com/containers/buildah/add.go12
-rw-r--r--vendor/github.com/containers/buildah/buildah.go2
-rw-r--r--vendor/github.com/containers/buildah/changelog.txt13
-rw-r--r--vendor/github.com/containers/buildah/common.go3
-rw-r--r--vendor/github.com/containers/buildah/go.mod6
-rw-r--r--vendor/github.com/containers/buildah/go.sum24
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/stage_executor.go5
-rw-r--r--vendor/github.com/magefile/mage/LICENSE201
-rw-r--r--vendor/github.com/magefile/mage/mg/color.go80
-rw-r--r--vendor/github.com/magefile/mage/mg/color_string.go38
-rw-r--r--vendor/github.com/magefile/mage/mg/deps.go352
-rw-r--r--vendor/github.com/magefile/mage/mg/errors.go51
-rw-r--r--vendor/github.com/magefile/mage/mg/runtime.go136
-rw-r--r--vendor/github.com/magefile/mage/sh/cmd.go177
-rw-r--r--vendor/github.com/magefile/mage/sh/helpers.go40
-rw-r--r--vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/tcp/tcp.go3
-rw-r--r--vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udp.go4
-rw-r--r--vendor/github.com/rootless-containers/rootlesskit/pkg/port/portutil/portutil.go144
-rw-r--r--vendor/github.com/sirupsen/logrus/.travis.yml13
-rw-r--r--vendor/github.com/sirupsen/logrus/CHANGELOG.md27
-rw-r--r--vendor/github.com/sirupsen/logrus/README.md2
-rw-r--r--vendor/github.com/sirupsen/logrus/entry.go65
-rw-r--r--vendor/github.com/sirupsen/logrus/go.mod1
-rw-r--r--vendor/github.com/sirupsen/logrus/go.sum2
-rw-r--r--vendor/github.com/sirupsen/logrus/json_formatter.go2
-rw-r--r--vendor/github.com/sirupsen/logrus/logger.go2
-rw-r--r--vendor/github.com/sirupsen/logrus/magefile.go77
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_unix.go2
-rw-r--r--vendor/github.com/sirupsen/logrus/text_formatter.go2
-rw-r--r--vendor/modules.txt11
756 files changed, 4440 insertions, 2417 deletions
diff --git a/Makefile b/Makefile
index 33099fac7..4c2a4047b 100644
--- a/Makefile
+++ b/Makefile
@@ -63,7 +63,7 @@ else
BUILD_INFO ?= $(shell date "+$(DATE_FMT)")
ISODATE ?= $(shell date --iso-8601)
endif
-LIBPOD := ${PROJECT}/v2/libpod
+LIBPOD := ${PROJECT}/v3/libpod
GCFLAGS ?= all=-trimpath=${PWD}
ASMFLAGS ?= all=-trimpath=${PWD}
LDFLAGS_PODMAN ?= \
diff --git a/cmd/podman/auto-update.go b/cmd/podman/auto-update.go
index cf806900f..a6d990b0c 100644
--- a/cmd/podman/auto-update.go
+++ b/cmd/podman/auto-update.go
@@ -5,9 +5,9 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/common/completion.go b/cmd/podman/common/completion.go
index ff15983cd..7629a8145 100644
--- a/cmd/podman/common/completion.go
+++ b/cmd/podman/common/completion.go
@@ -7,14 +7,14 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/registries"
- "github.com/containers/podman/v2/pkg/rootless"
- systemdGen "github.com/containers/podman/v2/pkg/systemd/generate"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/registries"
+ "github.com/containers/podman/v3/pkg/rootless"
+ systemdGen "github.com/containers/podman/v3/pkg/systemd/generate"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index fe43967a2..d1170710b 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -5,8 +5,8 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 430354ee9..78611371d 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -7,12 +7,12 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/specgen"
)
type ContainerCLIOpts struct {
@@ -223,7 +223,11 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
// publish
for port, pbs := range cc.HostConfig.PortBindings {
for _, pb := range pbs {
- hostport, err := strconv.Atoi(pb.HostPort)
+ var hostport int
+ var err error
+ if pb.HostPort != "" {
+ hostport, err = strconv.Atoi(pb.HostPort)
+ }
if err != nil {
return nil, nil, err
}
diff --git a/cmd/podman/common/createparse.go b/cmd/podman/common/createparse.go
index 140518cf7..818cd0bbd 100644
--- a/cmd/podman/common/createparse.go
+++ b/cmd/podman/common/createparse.go
@@ -1,7 +1,7 @@
package common
import (
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/cmd/podman/common/default.go b/cmd/podman/common/default.go
index af64e7162..7e025c449 100644
--- a/cmd/podman/common/default.go
+++ b/cmd/podman/common/default.go
@@ -1,7 +1,7 @@
package common
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/registry"
)
var (
diff --git a/cmd/podman/common/diffChanges.go b/cmd/podman/common/diffChanges.go
index 4aa485acc..7930e4f2c 100644
--- a/cmd/podman/common/diffChanges.go
+++ b/cmd/podman/common/diffChanges.go
@@ -4,7 +4,7 @@ import (
"fmt"
"os"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/storage/pkg/archive"
"github.com/pkg/errors"
)
diff --git a/cmd/podman/common/netflags.go b/cmd/podman/common/netflags.go
index 9cb4ed550..bc4d54de0 100644
--- a/cmd/podman/common/netflags.go
+++ b/cmd/podman/common/netflags.go
@@ -5,10 +5,10 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index 975c76fd9..2fafbfac1 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -8,14 +8,14 @@ import (
"time"
"github.com/containers/image/v5/manifest"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/libpod/define"
- ann "github.com/containers/podman/v2/pkg/annotations"
- envLib "github.com/containers/podman/v2/pkg/env"
- ns "github.com/containers/podman/v2/pkg/namespaces"
- "github.com/containers/podman/v2/pkg/specgen"
- systemdGen "github.com/containers/podman/v2/pkg/systemd/generate"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/libpod/define"
+ ann "github.com/containers/podman/v3/pkg/annotations"
+ envLib "github.com/containers/podman/v3/pkg/env"
+ ns "github.com/containers/podman/v3/pkg/namespaces"
+ "github.com/containers/podman/v3/pkg/specgen"
+ systemdGen "github.com/containers/podman/v3/pkg/systemd/generate"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/docker/go-units"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
@@ -148,17 +148,16 @@ func getMemoryLimits(s *specgen.SpecGenerator, c *ContainerCLIOpts) (*specs.Linu
}
if m := c.MemorySwap; len(m) > 0 {
var ms int64
- if m == "-1" {
- ms = int64(-1)
- s.ResourceLimits.Memory.Swap = &ms
- } else {
+ // only set memory swap if it was set
+ // -1 indicates unlimited
+ if m != "-1" {
ms, err = units.RAMInBytes(m)
+ memory.Swap = &ms
if err != nil {
return nil, errors.Wrapf(err, "invalid value for memory")
}
+ hasLimits = true
}
- memory.Swap = &ms
- hasLimits = true
}
if m := c.KernelMemory; len(m) > 0 {
mk, err := units.RAMInBytes(m)
diff --git a/cmd/podman/common/util.go b/cmd/podman/common/util.go
index ef30e08d3..2a8b2040c 100644
--- a/cmd/podman/common/util.go
+++ b/cmd/podman/common/util.go
@@ -6,7 +6,7 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/cmd/podman/common/volumes.go b/cmd/podman/common/volumes.go
index 2a598d7a5..19a49a6f2 100644
--- a/cmd/podman/common/volumes.go
+++ b/cmd/podman/common/volumes.go
@@ -6,8 +6,8 @@ import (
"strings"
"github.com/containers/common/pkg/parse"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
diff --git a/cmd/podman/completion/completion.go b/cmd/podman/completion/completion.go
index b615b33d0..a4ceab4b0 100644
--- a/cmd/podman/completion/completion.go
+++ b/cmd/podman/completion/completion.go
@@ -7,8 +7,8 @@ import (
"strings"
commonComp "github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/attach.go b/cmd/podman/containers/attach.go
index 7c7d780bc..dae1126a9 100644
--- a/cmd/podman/containers/attach.go
+++ b/cmd/podman/containers/attach.go
@@ -3,10 +3,10 @@ package containers
import (
"os"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/checkpoint.go b/cmd/podman/containers/checkpoint.go
index 14abfd5a7..25d0eb510 100644
--- a/cmd/podman/containers/checkpoint.go
+++ b/cmd/podman/containers/checkpoint.go
@@ -5,12 +5,12 @@ import (
"fmt"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/cleanup.go b/cmd/podman/containers/cleanup.go
index 593aaad3d..1f87725e9 100644
--- a/cmd/podman/containers/cleanup.go
+++ b/cmd/podman/containers/cleanup.go
@@ -4,11 +4,11 @@ import (
"fmt"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
diff --git a/cmd/podman/containers/commit.go b/cmd/podman/containers/commit.go
index ff06e10f7..168ded356 100644
--- a/cmd/podman/containers/commit.go
+++ b/cmd/podman/containers/commit.go
@@ -8,9 +8,9 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/container.go b/cmd/podman/containers/container.go
index b79b7db03..c78668611 100644
--- a/cmd/podman/containers/container.go
+++ b/cmd/podman/containers/container.go
@@ -1,10 +1,10 @@
package containers
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/cp.go b/cmd/podman/containers/cp.go
index 69b61a06c..d3b904412 100644
--- a/cmd/podman/containers/cp.go
+++ b/cmd/podman/containers/cp.go
@@ -10,11 +10,11 @@ import (
"strings"
buildahCopiah "github.com/containers/buildah/copier"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/copy"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/copy"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/idtools"
"github.com/pkg/errors"
@@ -311,8 +311,8 @@ func copyToContainer(container string, containerPath string, hostPath string) er
}
getOptions := buildahCopiah.GetOptions{
- // Unless the specified path ends with ".", we want to copy the base directory.
- KeepDirectoryNames: !strings.HasSuffix(hostPath, "."),
+ // Unless the specified points to ".", we want to copy the base directory.
+ KeepDirectoryNames: hostInfo.IsDir && filepath.Base(hostPath) != ".",
}
if !hostInfo.IsDir && (!containerInfo.IsDir || containerInfoErr != nil) {
// If we're having a file-to-file copy, make sure to
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go
index 5c6c773eb..d7507775f 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -10,13 +10,13 @@ import (
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/storage"
"github.com/containers/image/v5/transports/alltransports"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
diff --git a/cmd/podman/containers/diff.go b/cmd/podman/containers/diff.go
index 4533b7159..f6f262066 100644
--- a/cmd/podman/containers/diff.go
+++ b/cmd/podman/containers/diff.go
@@ -2,10 +2,10 @@ package containers
import (
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/exec.go b/cmd/podman/containers/exec.go
index 3d4918d50..15ac2b164 100644
--- a/cmd/podman/containers/exec.go
+++ b/cmd/podman/containers/exec.go
@@ -6,13 +6,13 @@ import (
"os"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- envLib "github.com/containers/podman/v2/pkg/env"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ envLib "github.com/containers/podman/v3/pkg/env"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/exists.go b/cmd/podman/containers/exists.go
index 607a03023..c21b30a4b 100644
--- a/cmd/podman/containers/exists.go
+++ b/cmd/podman/containers/exists.go
@@ -3,9 +3,9 @@ package containers
import (
"context"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/export.go b/cmd/podman/containers/export.go
index fe2da0f3a..3ea55415c 100644
--- a/cmd/podman/containers/export.go
+++ b/cmd/podman/containers/export.go
@@ -5,10 +5,10 @@ import (
"os"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh/terminal"
diff --git a/cmd/podman/containers/init.go b/cmd/podman/containers/init.go
index 99a32bc24..e874b9cb0 100644
--- a/cmd/podman/containers/init.go
+++ b/cmd/podman/containers/init.go
@@ -3,11 +3,11 @@ package containers
import (
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
diff --git a/cmd/podman/containers/inspect.go b/cmd/podman/containers/inspect.go
index e438bca95..e7921fc39 100644
--- a/cmd/podman/containers/inspect.go
+++ b/cmd/podman/containers/inspect.go
@@ -1,11 +1,11 @@
package containers
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/inspect"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/inspect"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/kill.go b/cmd/podman/containers/kill.go
index 36e3e5f59..aa36b51fd 100644
--- a/cmd/podman/containers/kill.go
+++ b/cmd/podman/containers/kill.go
@@ -7,12 +7,12 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/signal"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/signal"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -111,7 +111,7 @@ func kill(_ *cobra.Command, args []string) error {
}
for _, r := range responses {
if r.Err == nil {
- fmt.Println(r.Id)
+ fmt.Println(r.RawInput)
} else {
errs = append(errs, r.Err)
}
diff --git a/cmd/podman/containers/list.go b/cmd/podman/containers/list.go
index 834413c2c..4a903f5ea 100644
--- a/cmd/podman/containers/list.go
+++ b/cmd/podman/containers/list.go
@@ -2,9 +2,9 @@ package containers
import (
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/logs.go b/cmd/podman/containers/logs.go
index 9b562afd8..6275106cf 100644
--- a/cmd/podman/containers/logs.go
+++ b/cmd/podman/containers/logs.go
@@ -4,11 +4,11 @@ import (
"os"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/mount.go b/cmd/podman/containers/mount.go
index c92b19a19..7853bfae6 100644
--- a/cmd/podman/containers/mount.go
+++ b/cmd/podman/containers/mount.go
@@ -7,11 +7,11 @@ import (
"text/template"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/pause.go b/cmd/podman/containers/pause.go
index 18b37adfd..a1ac00bfb 100644
--- a/cmd/podman/containers/pause.go
+++ b/cmd/podman/containers/pause.go
@@ -4,12 +4,12 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
diff --git a/cmd/podman/containers/port.go b/cmd/podman/containers/port.go
index 4d3a5310d..7c9565c26 100644
--- a/cmd/podman/containers/port.go
+++ b/cmd/podman/containers/port.go
@@ -5,10 +5,10 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
"github.com/spf13/cobra"
diff --git a/cmd/podman/containers/prune.go b/cmd/podman/containers/prune.go
index 50731dd21..9acf5589b 100644
--- a/cmd/podman/containers/prune.go
+++ b/cmd/podman/containers/prune.go
@@ -9,10 +9,10 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go
index 51e7bf5b5..6b125fede 100644
--- a/cmd/podman/containers/ps.go
+++ b/cmd/podman/containers/ps.go
@@ -13,15 +13,16 @@ import (
tm "github.com/buger/goterm"
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/docker/go-units"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
@@ -390,6 +391,11 @@ func (l psReporter) Command() string {
// Size returns the rootfs and virtual sizes in human duration in
// and output form (string) suitable for ps
func (l psReporter) Size() string {
+ if l.ListContainer.Size == nil {
+ logrus.Errorf("Size format requires --size option")
+ return ""
+ }
+
virt := units.HumanSizeWithPrecision(float64(l.ListContainer.Size.RootFsSize), 3)
s := units.HumanSizeWithPrecision(float64(l.ListContainer.Size.RwSize), 3)
return fmt.Sprintf("%s (virtual %s)", s, virt)
diff --git a/cmd/podman/containers/rename.go b/cmd/podman/containers/rename.go
index 78bd3db83..0f4a1dde1 100644
--- a/cmd/podman/containers/rename.go
+++ b/cmd/podman/containers/rename.go
@@ -1,9 +1,9 @@
package containers
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/restart.go b/cmd/podman/containers/restart.go
index a51355194..80ffff700 100644
--- a/cmd/podman/containers/restart.go
+++ b/cmd/podman/containers/restart.go
@@ -5,12 +5,12 @@ import (
"fmt"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/restore.go b/cmd/podman/containers/restore.go
index 61bd84219..ad530e308 100644
--- a/cmd/podman/containers/restore.go
+++ b/cmd/podman/containers/restore.go
@@ -5,12 +5,12 @@ import (
"fmt"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/rm.go b/cmd/podman/containers/rm.go
index 884ad05f4..5822fc4b7 100644
--- a/cmd/podman/containers/rm.go
+++ b/cmd/podman/containers/rm.go
@@ -7,12 +7,12 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go
index 46bfb4143..83a5d7b8a 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -6,14 +6,14 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
diff --git a/cmd/podman/containers/runlabel.go b/cmd/podman/containers/runlabel.go
index 6ebba4935..75c2557f0 100644
--- a/cmd/podman/containers/runlabel.go
+++ b/cmd/podman/containers/runlabel.go
@@ -7,9 +7,9 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/start.go b/cmd/podman/containers/start.go
index 7e57bb576..9b358db74 100644
--- a/cmd/podman/containers/start.go
+++ b/cmd/podman/containers/start.go
@@ -4,12 +4,12 @@ import (
"fmt"
"os"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/containers/stats.go b/cmd/podman/containers/stats.go
index 1a436aaef..4c31896be 100644
--- a/cmd/podman/containers/stats.go
+++ b/cmd/podman/containers/stats.go
@@ -8,15 +8,15 @@ import (
tm "github.com/buger/goterm"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/utils"
"github.com/docker/go-units"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/cmd/podman/containers/stop.go b/cmd/podman/containers/stop.go
index 7338c8d98..bed45f374 100644
--- a/cmd/podman/containers/stop.go
+++ b/cmd/podman/containers/stop.go
@@ -7,11 +7,11 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -115,7 +115,7 @@ func stop(cmd *cobra.Command, args []string) error {
}
for _, r := range responses {
if r.Err == nil {
- fmt.Println(r.Id)
+ fmt.Println(r.RawInput)
} else {
errs = append(errs, r.Err)
}
diff --git a/cmd/podman/containers/top.go b/cmd/podman/containers/top.go
index e691f527a..03cee5d56 100644
--- a/cmd/podman/containers/top.go
+++ b/cmd/podman/containers/top.go
@@ -7,11 +7,11 @@ import (
"strings"
"text/tabwriter"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
diff --git a/cmd/podman/containers/unmount.go b/cmd/podman/containers/unmount.go
index 22e0768e3..98bbce581 100644
--- a/cmd/podman/containers/unmount.go
+++ b/cmd/podman/containers/unmount.go
@@ -3,11 +3,11 @@ package containers
import (
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
diff --git a/cmd/podman/containers/unpause.go b/cmd/podman/containers/unpause.go
index 0e8b59192..0077181d7 100644
--- a/cmd/podman/containers/unpause.go
+++ b/cmd/podman/containers/unpause.go
@@ -4,12 +4,12 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
diff --git a/cmd/podman/containers/wait.go b/cmd/podman/containers/wait.go
index 7831ef1c9..c01bc08b1 100644
--- a/cmd/podman/containers/wait.go
+++ b/cmd/podman/containers/wait.go
@@ -6,12 +6,12 @@ import (
"time"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/diff.go b/cmd/podman/diff.go
index e094e6bdd..4862d31b5 100644
--- a/cmd/podman/diff.go
+++ b/cmd/podman/diff.go
@@ -3,12 +3,12 @@ package main
import (
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/containers"
- "github.com/containers/podman/v2/cmd/podman/images"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/containers"
+ "github.com/containers/podman/v3/cmd/podman/images"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/early_init_linux.go b/cmd/podman/early_init_linux.go
index 4e232a0b0..268385baf 100644
--- a/cmd/podman/early_init_linux.go
+++ b/cmd/podman/early_init_linux.go
@@ -5,7 +5,7 @@ import (
"os"
"syscall"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
)
diff --git a/cmd/podman/generate/generate.go b/cmd/podman/generate/generate.go
index fa2739b20..c559b9e1b 100644
--- a/cmd/podman/generate/generate.go
+++ b/cmd/podman/generate/generate.go
@@ -1,10 +1,10 @@
package pods
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/generate/kube.go b/cmd/podman/generate/kube.go
index cb608e7b5..90e58271f 100644
--- a/cmd/podman/generate/kube.go
+++ b/cmd/podman/generate/kube.go
@@ -6,10 +6,10 @@ import (
"os"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/generate/systemd.go b/cmd/podman/generate/systemd.go
index 7b2d9ebb7..913b0c7ed 100644
--- a/cmd/podman/generate/systemd.go
+++ b/cmd/podman/generate/systemd.go
@@ -8,10 +8,10 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
diff --git a/cmd/podman/healthcheck/healthcheck.go b/cmd/podman/healthcheck/healthcheck.go
index 683836ed6..4a986e171 100644
--- a/cmd/podman/healthcheck/healthcheck.go
+++ b/cmd/podman/healthcheck/healthcheck.go
@@ -1,9 +1,9 @@
package healthcheck
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/healthcheck/run.go b/cmd/podman/healthcheck/run.go
index b4331d04e..50a51d172 100644
--- a/cmd/podman/healthcheck/run.go
+++ b/cmd/podman/healthcheck/run.go
@@ -4,9 +4,9 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index 895bdb631..d6bf761db 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -15,10 +15,10 @@ import (
"github.com/containers/common/pkg/config"
encconfig "github.com/containers/ocicrypt/config"
enchelpers "github.com/containers/ocicrypt/helpers"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/docker/go-units"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/cmd/podman/images/diff.go b/cmd/podman/images/diff.go
index 71793c707..36b0d4e7a 100644
--- a/cmd/podman/images/diff.go
+++ b/cmd/podman/images/diff.go
@@ -2,9 +2,9 @@ package images
import (
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
diff --git a/cmd/podman/images/exists.go b/cmd/podman/images/exists.go
index cb1ca0295..332510b3d 100644
--- a/cmd/podman/images/exists.go
+++ b/cmd/podman/images/exists.go
@@ -1,9 +1,9 @@
package images
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/history.go b/cmd/podman/images/history.go
index af40dd73a..eaf56651f 100644
--- a/cmd/podman/images/history.go
+++ b/cmd/podman/images/history.go
@@ -11,10 +11,10 @@ import (
"unicode"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/docker/go-units"
"github.com/pkg/errors"
"github.com/spf13/cobra"
diff --git a/cmd/podman/images/image.go b/cmd/podman/images/image.go
index abf6bf736..69563959d 100644
--- a/cmd/podman/images/image.go
+++ b/cmd/podman/images/image.go
@@ -1,9 +1,9 @@
package images
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/images.go b/cmd/podman/images/images.go
index 499bfd2ad..17fe21911 100644
--- a/cmd/podman/images/images.go
+++ b/cmd/podman/images/images.go
@@ -3,8 +3,8 @@ package images
import (
"strings"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/import.go b/cmd/podman/images/import.go
index ac59935ad..72e0b63ba 100644
--- a/cmd/podman/images/import.go
+++ b/cmd/podman/images/import.go
@@ -6,10 +6,10 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/hashicorp/go-multierror"
"github.com/pkg/errors"
"github.com/spf13/cobra"
diff --git a/cmd/podman/images/inspect.go b/cmd/podman/images/inspect.go
index 488f03760..fb96286fa 100644
--- a/cmd/podman/images/inspect.go
+++ b/cmd/podman/images/inspect.go
@@ -1,10 +1,10 @@
package images
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/inspect"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/inspect"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go
index 65486e3ba..7a9a8a804 100644
--- a/cmd/podman/images/list.go
+++ b/cmd/podman/images/list.go
@@ -13,10 +13,10 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
"github.com/containers/image/v5/docker/reference"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/docker/go-units"
"github.com/pkg/errors"
"github.com/spf13/cobra"
diff --git a/cmd/podman/images/load.go b/cmd/podman/images/load.go
index 59fc6f54c..aac95dae8 100644
--- a/cmd/podman/images/load.go
+++ b/cmd/podman/images/load.go
@@ -9,10 +9,10 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh/terminal"
diff --git a/cmd/podman/images/mount.go b/cmd/podman/images/mount.go
index 1eac59ef9..79c97006d 100644
--- a/cmd/podman/images/mount.go
+++ b/cmd/podman/images/mount.go
@@ -7,10 +7,10 @@ import (
"text/template"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/prune.go b/cmd/podman/images/prune.go
index 8ded8d352..78e107a97 100644
--- a/cmd/podman/images/prune.go
+++ b/cmd/podman/images/prune.go
@@ -7,10 +7,10 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/pull.go b/cmd/podman/images/pull.go
index 3b2595757..bf0eec759 100644
--- a/cmd/podman/images/pull.go
+++ b/cmd/podman/images/pull.go
@@ -8,10 +8,10 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/push.go b/cmd/podman/images/push.go
index eccf93e57..9e7b447a4 100644
--- a/cmd/podman/images/push.go
+++ b/cmd/podman/images/push.go
@@ -6,10 +6,10 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/rm.go b/cmd/podman/images/rm.go
index 587f08c29..2daa4743f 100644
--- a/cmd/podman/images/rm.go
+++ b/cmd/podman/images/rm.go
@@ -3,10 +3,10 @@ package images
import (
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
diff --git a/cmd/podman/images/rmi.go b/cmd/podman/images/rmi.go
index ab174d750..edd6ae96f 100644
--- a/cmd/podman/images/rmi.go
+++ b/cmd/podman/images/rmi.go
@@ -3,8 +3,8 @@ package images
import (
"strings"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go
index 3a35c4fad..6c03fc3c6 100644
--- a/cmd/podman/images/save.go
+++ b/cmd/podman/images/save.go
@@ -6,12 +6,12 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh/terminal"
diff --git a/cmd/podman/images/search.go b/cmd/podman/images/search.go
index b8274cfce..a3cfa983f 100644
--- a/cmd/podman/images/search.go
+++ b/cmd/podman/images/search.go
@@ -10,9 +10,9 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/sign.go b/cmd/podman/images/sign.go
index 859d51d51..fcd904bb7 100644
--- a/cmd/podman/images/sign.go
+++ b/cmd/podman/images/sign.go
@@ -4,9 +4,9 @@ import (
"os"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/tag.go b/cmd/podman/images/tag.go
index 157db49ca..695ca30ed 100644
--- a/cmd/podman/images/tag.go
+++ b/cmd/podman/images/tag.go
@@ -1,9 +1,9 @@
package images
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/tree.go b/cmd/podman/images/tree.go
index 76c69b37e..0a659c914 100644
--- a/cmd/podman/images/tree.go
+++ b/cmd/podman/images/tree.go
@@ -3,9 +3,9 @@ package images
import (
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/trust.go b/cmd/podman/images/trust.go
index 842540110..2c51bb5f8 100644
--- a/cmd/podman/images/trust.go
+++ b/cmd/podman/images/trust.go
@@ -1,9 +1,9 @@
package images
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/trust_set.go b/cmd/podman/images/trust_set.go
index 1a7392f3e..6333512d9 100644
--- a/cmd/podman/images/trust_set.go
+++ b/cmd/podman/images/trust_set.go
@@ -2,11 +2,11 @@ package images
import (
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/trust_show.go b/cmd/podman/images/trust_show.go
index 89733a1aa..ed9aecdb7 100644
--- a/cmd/podman/images/trust_show.go
+++ b/cmd/podman/images/trust_show.go
@@ -6,9 +6,9 @@ import (
"text/tabwriter"
"text/template"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/images/unmount.go b/cmd/podman/images/unmount.go
index 3af959b9f..1e890c292 100644
--- a/cmd/podman/images/unmount.go
+++ b/cmd/podman/images/unmount.go
@@ -3,10 +3,10 @@ package images
import (
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
diff --git a/cmd/podman/images/untag.go b/cmd/podman/images/untag.go
index 3cf62713b..4344e1847 100644
--- a/cmd/podman/images/untag.go
+++ b/cmd/podman/images/untag.go
@@ -1,9 +1,9 @@
package images
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/inspect.go b/cmd/podman/inspect.go
index 64daae951..13417c1ab 100644
--- a/cmd/podman/inspect.go
+++ b/cmd/podman/inspect.go
@@ -1,10 +1,10 @@
package main
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/inspect"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/inspect"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/inspect/inspect.go b/cmd/podman/inspect/inspect.go
index 76613ae71..09721a2a8 100644
--- a/cmd/podman/inspect/inspect.go
+++ b/cmd/podman/inspect/inspect.go
@@ -13,11 +13,11 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
diff --git a/cmd/podman/login.go b/cmd/podman/login.go
index 7c8fe03dc..cd3bc9756 100644
--- a/cmd/podman/login.go
+++ b/cmd/podman/login.go
@@ -7,10 +7,10 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/registries"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/registries"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/logout.go b/cmd/podman/logout.go
index 3cb11071b..286737b12 100644
--- a/cmd/podman/logout.go
+++ b/cmd/podman/logout.go
@@ -6,10 +6,10 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/registries"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/registries"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 05b36295b..561459c31 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -4,22 +4,22 @@ import (
"fmt"
"os"
- _ "github.com/containers/podman/v2/cmd/podman/completion"
- _ "github.com/containers/podman/v2/cmd/podman/containers"
- _ "github.com/containers/podman/v2/cmd/podman/generate"
- _ "github.com/containers/podman/v2/cmd/podman/healthcheck"
- _ "github.com/containers/podman/v2/cmd/podman/images"
- _ "github.com/containers/podman/v2/cmd/podman/manifest"
- _ "github.com/containers/podman/v2/cmd/podman/networks"
- _ "github.com/containers/podman/v2/cmd/podman/play"
- _ "github.com/containers/podman/v2/cmd/podman/pods"
- "github.com/containers/podman/v2/cmd/podman/registry"
- _ "github.com/containers/podman/v2/cmd/podman/secrets"
- _ "github.com/containers/podman/v2/cmd/podman/system"
- _ "github.com/containers/podman/v2/cmd/podman/system/connection"
- _ "github.com/containers/podman/v2/cmd/podman/volumes"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/terminal"
+ _ "github.com/containers/podman/v3/cmd/podman/completion"
+ _ "github.com/containers/podman/v3/cmd/podman/containers"
+ _ "github.com/containers/podman/v3/cmd/podman/generate"
+ _ "github.com/containers/podman/v3/cmd/podman/healthcheck"
+ _ "github.com/containers/podman/v3/cmd/podman/images"
+ _ "github.com/containers/podman/v3/cmd/podman/manifest"
+ _ "github.com/containers/podman/v3/cmd/podman/networks"
+ _ "github.com/containers/podman/v3/cmd/podman/play"
+ _ "github.com/containers/podman/v3/cmd/podman/pods"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ _ "github.com/containers/podman/v3/cmd/podman/secrets"
+ _ "github.com/containers/podman/v3/cmd/podman/system"
+ _ "github.com/containers/podman/v3/cmd/podman/system/connection"
+ _ "github.com/containers/podman/v3/cmd/podman/volumes"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/terminal"
"github.com/containers/storage/pkg/reexec"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
diff --git a/cmd/podman/manifest/add.go b/cmd/podman/manifest/add.go
index b33f01c10..82e155909 100644
--- a/cmd/podman/manifest/add.go
+++ b/cmd/podman/manifest/add.go
@@ -7,10 +7,10 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/manifest/annotate.go b/cmd/podman/manifest/annotate.go
index 7c4f5ad01..f5ec13bf2 100644
--- a/cmd/podman/manifest/annotate.go
+++ b/cmd/podman/manifest/annotate.go
@@ -5,9 +5,9 @@ import (
"fmt"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/manifest/create.go b/cmd/podman/manifest/create.go
index 399f9440c..a15b129d5 100644
--- a/cmd/podman/manifest/create.go
+++ b/cmd/podman/manifest/create.go
@@ -4,9 +4,9 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/manifest/exists.go b/cmd/podman/manifest/exists.go
index 14e01edab..7fed1f25c 100644
--- a/cmd/podman/manifest/exists.go
+++ b/cmd/podman/manifest/exists.go
@@ -1,9 +1,9 @@
package manifest
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/manifest/inspect.go b/cmd/podman/manifest/inspect.go
index 39fd54445..118c0ae70 100644
--- a/cmd/podman/manifest/inspect.go
+++ b/cmd/podman/manifest/inspect.go
@@ -4,9 +4,9 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/manifest/manifest.go b/cmd/podman/manifest/manifest.go
index 990ad0e95..f67915481 100644
--- a/cmd/podman/manifest/manifest.go
+++ b/cmd/podman/manifest/manifest.go
@@ -1,9 +1,9 @@
package manifest
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/manifest/push.go b/cmd/podman/manifest/push.go
index 40b45c40e..1dae5cc95 100644
--- a/cmd/podman/manifest/push.go
+++ b/cmd/podman/manifest/push.go
@@ -6,11 +6,11 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/manifest/remove.go b/cmd/podman/manifest/remove.go
index 170e68d3f..1d1128166 100644
--- a/cmd/podman/manifest/remove.go
+++ b/cmd/podman/manifest/remove.go
@@ -4,9 +4,9 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/networks/connect.go b/cmd/podman/networks/connect.go
index 8afc0c7c0..9fa088b78 100644
--- a/cmd/podman/networks/connect.go
+++ b/cmd/podman/networks/connect.go
@@ -2,9 +2,9 @@ package network
import (
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/networks/create.go b/cmd/podman/networks/create.go
index d1cbe253f..64ca2464a 100644
--- a/cmd/podman/networks/create.go
+++ b/cmd/podman/networks/create.go
@@ -5,11 +5,11 @@ import (
"net"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/networks/disconnect.go b/cmd/podman/networks/disconnect.go
index a30315774..26861eec6 100644
--- a/cmd/podman/networks/disconnect.go
+++ b/cmd/podman/networks/disconnect.go
@@ -1,9 +1,9 @@
package network
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
diff --git a/cmd/podman/networks/exists.go b/cmd/podman/networks/exists.go
index 2eb485b36..fdbd0ef11 100644
--- a/cmd/podman/networks/exists.go
+++ b/cmd/podman/networks/exists.go
@@ -1,9 +1,9 @@
package network
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/networks/inspect.go b/cmd/podman/networks/inspect.go
index bd9f76ea9..953f5e6e8 100644
--- a/cmd/podman/networks/inspect.go
+++ b/cmd/podman/networks/inspect.go
@@ -1,10 +1,10 @@
package network
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/inspect"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/inspect"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/networks/list.go b/cmd/podman/networks/list.go
index 6f63e97cc..6d8d35589 100644
--- a/cmd/podman/networks/list.go
+++ b/cmd/podman/networks/list.go
@@ -10,12 +10,12 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/network"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/network"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
diff --git a/cmd/podman/networks/network.go b/cmd/podman/networks/network.go
index b5f9ef9fd..e729f35f3 100644
--- a/cmd/podman/networks/network.go
+++ b/cmd/podman/networks/network.go
@@ -1,9 +1,9 @@
package network
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/networks/prune.go b/cmd/podman/networks/prune.go
index d6c7d3a7f..ebba06db5 100644
--- a/cmd/podman/networks/prune.go
+++ b/cmd/podman/networks/prune.go
@@ -6,11 +6,11 @@ import (
"os"
"strings"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
diff --git a/cmd/podman/networks/reload.go b/cmd/podman/networks/reload.go
index 16655c18c..8f2fbf011 100644
--- a/cmd/podman/networks/reload.go
+++ b/cmd/podman/networks/reload.go
@@ -3,11 +3,11 @@ package network
import (
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
diff --git a/cmd/podman/networks/rm.go b/cmd/podman/networks/rm.go
index 1504d9385..1ae79b27d 100644
--- a/cmd/podman/networks/rm.go
+++ b/cmd/podman/networks/rm.go
@@ -4,11 +4,11 @@ import (
"fmt"
"strings"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go
index 511e208cf..5650ad1be 100644
--- a/cmd/podman/play/kube.go
+++ b/cmd/podman/play/kube.go
@@ -7,11 +7,11 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/play/play.go b/cmd/podman/play/play.go
index 607c99767..92f87ad80 100644
--- a/cmd/podman/play/play.go
+++ b/cmd/podman/play/play.go
@@ -1,9 +1,9 @@
package pods
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go
index 23fb323a0..5600d8794 100644
--- a/cmd/podman/pods/create.go
+++ b/cmd/podman/pods/create.go
@@ -8,14 +8,14 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
diff --git a/cmd/podman/pods/exists.go b/cmd/podman/pods/exists.go
index a5c45803e..a9ef0370b 100644
--- a/cmd/podman/pods/exists.go
+++ b/cmd/podman/pods/exists.go
@@ -3,9 +3,9 @@ package pods
import (
"context"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/inspect.go b/cmd/podman/pods/inspect.go
index 0fbb730ce..96e007fa3 100644
--- a/cmd/podman/pods/inspect.go
+++ b/cmd/podman/pods/inspect.go
@@ -7,10 +7,10 @@ import (
"text/template"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/kill.go b/cmd/podman/pods/kill.go
index be8fd31df..17d5499c8 100644
--- a/cmd/podman/pods/kill.go
+++ b/cmd/podman/pods/kill.go
@@ -4,11 +4,11 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/pause.go b/cmd/podman/pods/pause.go
index 108893173..6624ccbd7 100644
--- a/cmd/podman/pods/pause.go
+++ b/cmd/podman/pods/pause.go
@@ -4,11 +4,11 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/pod.go b/cmd/podman/pods/pod.go
index 12448a5f1..00fb02936 100644
--- a/cmd/podman/pods/pod.go
+++ b/cmd/podman/pods/pod.go
@@ -1,10 +1,10 @@
package pods
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/prune.go b/cmd/podman/pods/prune.go
index a040a21b6..51b6bb4a9 100644
--- a/cmd/podman/pods/prune.go
+++ b/cmd/podman/pods/prune.go
@@ -8,10 +8,10 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go
index a27ab4859..aeba80525 100644
--- a/cmd/podman/pods/ps.go
+++ b/cmd/podman/pods/ps.go
@@ -12,11 +12,11 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/docker/go-units"
"github.com/pkg/errors"
"github.com/spf13/cobra"
diff --git a/cmd/podman/pods/restart.go b/cmd/podman/pods/restart.go
index 7a4b28a45..5b9f47a5b 100644
--- a/cmd/podman/pods/restart.go
+++ b/cmd/podman/pods/restart.go
@@ -4,11 +4,11 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/rm.go b/cmd/podman/pods/rm.go
index 109f18b78..333e4eb9f 100644
--- a/cmd/podman/pods/rm.go
+++ b/cmd/podman/pods/rm.go
@@ -6,12 +6,12 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/start.go b/cmd/podman/pods/start.go
index 7cd5c64d9..f6dca854e 100644
--- a/cmd/podman/pods/start.go
+++ b/cmd/podman/pods/start.go
@@ -5,11 +5,11 @@ import (
"fmt"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/stats.go b/cmd/podman/pods/stats.go
index 5f79fa016..e336b864e 100644
--- a/cmd/podman/pods/stats.go
+++ b/cmd/podman/pods/stats.go
@@ -10,11 +10,11 @@ import (
"github.com/buger/goterm"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/stop.go b/cmd/podman/pods/stop.go
index d03364028..a9a16b39c 100644
--- a/cmd/podman/pods/stop.go
+++ b/cmd/podman/pods/stop.go
@@ -5,11 +5,11 @@ import (
"fmt"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/top.go b/cmd/podman/pods/top.go
index 829882080..be8aab761 100644
--- a/cmd/podman/pods/top.go
+++ b/cmd/podman/pods/top.go
@@ -7,11 +7,11 @@ import (
"strings"
"text/tabwriter"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/unpause.go b/cmd/podman/pods/unpause.go
index 499faec37..859ac8ac2 100644
--- a/cmd/podman/pods/unpause.go
+++ b/cmd/podman/pods/unpause.go
@@ -4,11 +4,11 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/registry/config.go b/cmd/podman/registry/config.go
index 0e29d5cd9..3ce6e3899 100644
--- a/cmd/podman/registry/config.go
+++ b/cmd/podman/registry/config.go
@@ -8,9 +8,9 @@ import (
"sync"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/cmd/podman/registry/registry.go b/cmd/podman/registry/registry.go
index 481ed810f..0b1d9293a 100644
--- a/cmd/podman/registry/registry.go
+++ b/cmd/podman/registry/registry.go
@@ -4,10 +4,10 @@ import (
"context"
"path/filepath"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/registry/remote.go b/cmd/podman/registry/remote.go
index 6e9b1fdfc..b5da98bd4 100644
--- a/cmd/podman/registry/remote.go
+++ b/cmd/podman/registry/remote.go
@@ -4,7 +4,7 @@ import (
"os"
"sync"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 0ee530242..874573bb9 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -10,15 +10,15 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/parallel"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/tracing"
- "github.com/containers/podman/v2/version"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/parallel"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/tracing"
+ "github.com/containers/podman/v3/version"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -158,7 +158,7 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
// Prep the engines
if _, err := registry.NewImageEngine(cmd, args); err != nil {
- return errors.Wrapf(err, "Cannot connect to the Podman socket, make sure there is a Podman REST API service running.")
+ return err
}
if _, err := registry.NewContainerEngine(cmd, args); err != nil {
return err
diff --git a/cmd/podman/root_test.go b/cmd/podman/root_test.go
index 0473128df..f2826a304 100644
--- a/cmd/podman/root_test.go
+++ b/cmd/podman/root_test.go
@@ -5,7 +5,7 @@ import (
"strings"
"testing"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
)
diff --git a/cmd/podman/secrets/create.go b/cmd/podman/secrets/create.go
index 8f3ebc3ec..7374b682b 100644
--- a/cmd/podman/secrets/create.go
+++ b/cmd/podman/secrets/create.go
@@ -8,9 +8,9 @@ import (
"os"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/secrets/inspect.go b/cmd/podman/secrets/inspect.go
index f38ba7f65..4036291ec 100644
--- a/cmd/podman/secrets/inspect.go
+++ b/cmd/podman/secrets/inspect.go
@@ -9,10 +9,10 @@ import (
"text/tabwriter"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/secrets/list.go b/cmd/podman/secrets/list.go
index d79e125e8..849a8418e 100644
--- a/cmd/podman/secrets/list.go
+++ b/cmd/podman/secrets/list.go
@@ -9,11 +9,11 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/docker/go-units"
"github.com/pkg/errors"
"github.com/spf13/cobra"
diff --git a/cmd/podman/secrets/rm.go b/cmd/podman/secrets/rm.go
index c72a3c171..ade015b10 100644
--- a/cmd/podman/secrets/rm.go
+++ b/cmd/podman/secrets/rm.go
@@ -5,10 +5,10 @@ import (
"errors"
"fmt"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/secrets/secret.go b/cmd/podman/secrets/secret.go
index 4e6b6ec7b..139997b87 100644
--- a/cmd/podman/secrets/secret.go
+++ b/cmd/podman/secrets/secret.go
@@ -1,9 +1,9 @@
package secrets
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/shell_completion_test.go b/cmd/podman/shell_completion_test.go
index 3f6f56fbe..9bd821d8d 100644
--- a/cmd/podman/shell_completion_test.go
+++ b/cmd/podman/shell_completion_test.go
@@ -6,7 +6,7 @@
function set. (except boolean, hidden and deprecated flags)
Shell completion functions are defined in:
- - "github.com/containers/podman/v2/cmd/podman/common/completion.go"
+ - "github.com/containers/podman/v3/cmd/podman/common/completion.go"
- "github.com/containers/common/pkg/completion"
and are called Autocomplete...
diff --git a/cmd/podman/system/connection.go b/cmd/podman/system/connection.go
index b6c18217e..dbdda8cf9 100644
--- a/cmd/podman/system/connection.go
+++ b/cmd/podman/system/connection.go
@@ -1,9 +1,9 @@
package system
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/connection/add.go b/cmd/podman/system/connection/add.go
index da5f652c8..89d28849c 100644
--- a/cmd/podman/system/connection/add.go
+++ b/cmd/podman/system/connection/add.go
@@ -12,11 +12,11 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/system"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/terminal"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/system"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/terminal"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
diff --git a/cmd/podman/system/connection/default.go b/cmd/podman/system/connection/default.go
index e2ae6ae7f..073bdbc3f 100644
--- a/cmd/podman/system/connection/default.go
+++ b/cmd/podman/system/connection/default.go
@@ -4,10 +4,10 @@ import (
"fmt"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/system"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/system"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/connection/list.go b/cmd/podman/system/connection/list.go
index b434559b4..fe7026ae3 100644
--- a/cmd/podman/system/connection/list.go
+++ b/cmd/podman/system/connection/list.go
@@ -7,10 +7,10 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/system"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/system"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/connection/remove.go b/cmd/podman/system/connection/remove.go
index 429325f50..4acaa36a9 100644
--- a/cmd/podman/system/connection/remove.go
+++ b/cmd/podman/system/connection/remove.go
@@ -2,10 +2,10 @@ package connection
import (
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/system"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/system"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/connection/rename.go b/cmd/podman/system/connection/rename.go
index 7ab94d49a..7713c2b09 100644
--- a/cmd/podman/system/connection/rename.go
+++ b/cmd/podman/system/connection/rename.go
@@ -4,10 +4,10 @@ import (
"fmt"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/system"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/system"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/df.go b/cmd/podman/system/df.go
index 68b244e35..5e179a82d 100644
--- a/cmd/podman/system/df.go
+++ b/cmd/podman/system/df.go
@@ -10,10 +10,10 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/docker/go-units"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/events.go b/cmd/podman/system/events.go
index d2aefab67..0f52282a9 100644
--- a/cmd/podman/system/events.go
+++ b/cmd/podman/system/events.go
@@ -8,11 +8,11 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/info.go b/cmd/podman/system/info.go
index 17aeb2940..2babd49c8 100644
--- a/cmd/podman/system/info.go
+++ b/cmd/podman/system/info.go
@@ -7,10 +7,10 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/ghodss/yaml"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/migrate.go b/cmd/podman/system/migrate.go
index 234a49e4b..892d60a38 100644
--- a/cmd/podman/system/migrate.go
+++ b/cmd/podman/system/migrate.go
@@ -7,10 +7,10 @@ import (
"os"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/prune.go b/cmd/podman/system/prune.go
index 7ec08366e..dcb3316f0 100644
--- a/cmd/podman/system/prune.go
+++ b/cmd/podman/system/prune.go
@@ -8,11 +8,11 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- dfilters "github.com/containers/podman/v2/pkg/domain/filters"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ dfilters "github.com/containers/podman/v3/pkg/domain/filters"
"github.com/docker/go-units"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/renumber.go b/cmd/podman/system/renumber.go
index 37f9a5865..91c49333a 100644
--- a/cmd/podman/system/renumber.go
+++ b/cmd/podman/system/renumber.go
@@ -7,10 +7,10 @@ import (
"os"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go
index 97f4fba28..6f2f873dd 100644
--- a/cmd/podman/system/reset.go
+++ b/cmd/podman/system/reset.go
@@ -9,10 +9,10 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go
index f5760e172..1e1cdbd12 100644
--- a/cmd/podman/system/service.go
+++ b/cmd/podman/system/service.go
@@ -10,12 +10,12 @@ import (
"time"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/systemd"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/systemd"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go
index ed35fbb04..0e96e1fbb 100644
--- a/cmd/podman/system/service_abi.go
+++ b/cmd/podman/system/service_abi.go
@@ -8,9 +8,9 @@ import (
"os"
"strings"
- api "github.com/containers/podman/v2/pkg/api/server"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra"
+ api "github.com/containers/podman/v3/pkg/api/server"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"
diff --git a/cmd/podman/system/system.go b/cmd/podman/system/system.go
index 388905035..ab06c3ae0 100644
--- a/cmd/podman/system/system.go
+++ b/cmd/podman/system/system.go
@@ -1,9 +1,9 @@
package system
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/unshare.go b/cmd/podman/system/unshare.go
index 364852979..5e6ff569b 100644
--- a/cmd/podman/system/unshare.go
+++ b/cmd/podman/system/unshare.go
@@ -4,9 +4,9 @@ import (
"os"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/system/version.go b/cmd/podman/system/version.go
index cb7206b8a..dfb10c080 100644
--- a/cmd/podman/system/version.go
+++ b/cmd/podman/system/version.go
@@ -10,11 +10,11 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/utils/utils.go b/cmd/podman/utils/utils.go
index f42243f69..e38c9d49c 100644
--- a/cmd/podman/utils/utils.go
+++ b/cmd/podman/utils/utils.go
@@ -4,8 +4,8 @@ import (
"fmt"
"os"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
)
// IsDir returns true if the specified path refers to a directory.
diff --git a/cmd/podman/validate/args.go b/cmd/podman/validate/args.go
index ab6460e93..c00813369 100644
--- a/cmd/podman/validate/args.go
+++ b/cmd/podman/validate/args.go
@@ -4,7 +4,7 @@ import (
"fmt"
"strconv"
- "github.com/containers/podman/v2/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/registry"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/validate/latest.go b/cmd/podman/validate/latest.go
index c9bff798a..8937074b5 100644
--- a/cmd/podman/validate/latest.go
+++ b/cmd/podman/validate/latest.go
@@ -1,7 +1,7 @@
package validate
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/registry"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/volumes/create.go b/cmd/podman/volumes/create.go
index 8de343a24..1820260a4 100644
--- a/cmd/podman/volumes/create.go
+++ b/cmd/podman/volumes/create.go
@@ -5,9 +5,9 @@ import (
"fmt"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/volumes/exists.go b/cmd/podman/volumes/exists.go
index 71cd117ae..4dfbb3cd4 100644
--- a/cmd/podman/volumes/exists.go
+++ b/cmd/podman/volumes/exists.go
@@ -1,9 +1,9 @@
package volumes
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/volumes/inspect.go b/cmd/podman/volumes/inspect.go
index b5094224c..91269e3d1 100644
--- a/cmd/podman/volumes/inspect.go
+++ b/cmd/podman/volumes/inspect.go
@@ -1,10 +1,10 @@
package volumes
import (
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/inspect"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/inspect"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/volumes/list.go b/cmd/podman/volumes/list.go
index 7e54de38a..e04f452d4 100644
--- a/cmd/podman/volumes/list.go
+++ b/cmd/podman/volumes/list.go
@@ -10,11 +10,11 @@ import (
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/parse"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/parse"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/volumes/prune.go b/cmd/podman/volumes/prune.go
index 39ad2735b..8f78d0bae 100644
--- a/cmd/podman/volumes/prune.go
+++ b/cmd/podman/volumes/prune.go
@@ -8,12 +8,12 @@ import (
"strings"
"github.com/containers/common/pkg/completion"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/filters"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/filters"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/volumes/rm.go b/cmd/podman/volumes/rm.go
index 49f7b619e..e149e398c 100644
--- a/cmd/podman/volumes/rm.go
+++ b/cmd/podman/volumes/rm.go
@@ -5,11 +5,11 @@ import (
"fmt"
"strings"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/volumes/volume.go b/cmd/podman/volumes/volume.go
index cd7a1a642..7786d5dc3 100644
--- a/cmd/podman/volumes/volume.go
+++ b/cmd/podman/volumes/volume.go
@@ -1,9 +1,9 @@
package volumes
import (
- "github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/validate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/cmd/podman/registry"
+ "github.com/containers/podman/v3/cmd/podman/validate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/docs/source/Tutorials.rst b/docs/source/Tutorials.rst
index e3e869d5b..e48d1e853 100644
--- a/docs/source/Tutorials.rst
+++ b/docs/source/Tutorials.rst
@@ -11,3 +11,4 @@ Here are a number of useful tutorials to get you up and running with Podman. If
* `Podman remote-client tutorial <https://github.com/containers/podman/blob/master/docs/tutorials/remote_client.md>`_: A brief how-to on using the Podman remote-client.
* `How to use libpod for custom/derivative projects <https://github.com/containers/podman/blob/master/docs/tutorials/podman-derivative-api.md>`_: How the libpod API can be used within your own project.
* `How to use Podman's Go bindings <https://github.com/containers/podman/blob/master/docs/tutorials/podman-go-bindings.md>`_: A brief how-to on using Podman's Go bindings in external applications.
+* `Common network setups <https://github.com/containers/podman/blob/master/docs/tutorials/basic_networking.md>`_: A basic guide to common network setups for Podman.
diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md
index 49b45f4f8..8c0b12e90 100644
--- a/docs/source/markdown/podman-run.1.md
+++ b/docs/source/markdown/podman-run.1.md
@@ -714,7 +714,7 @@ Override the OS, defaults to hosts, of the image to be pulled. For example, `win
#### **--pid**=*mode*
Set the PID namespace mode for the container.
-The efault is to create a private PID namespace for the container.
+The default is to create a private PID namespace for the container.
- **container:**_id_: join another container's PID namespace;
- **host**: use the host's PID namespace for the container. Note the host mode gives the container full access to local PID and is therefore considered insecure;
diff --git a/docs/tutorials/README.md b/docs/tutorials/README.md
index 246d235ee..455459062 100644
--- a/docs/tutorials/README.md
+++ b/docs/tutorials/README.md
@@ -31,3 +31,7 @@ Learn how to setup and use image signing with Podman.
**[Go Bindings](podman-go-bindings.md)**
A brief how-to on using Podman's Go bindings in external applications.
+
+**[Go Bindings](basic_networking.md)**
+
+A basic guide to common network setups with Podman
diff --git a/docs/tutorials/basic_networking.md b/docs/tutorials/basic_networking.md
new file mode 100644
index 000000000..7544c1cfd
--- /dev/null
+++ b/docs/tutorials/basic_networking.md
@@ -0,0 +1,291 @@
+![PODMAN logo](../../logo/podman-logo-source.svg)
+
+
+# Basic Networking Guide for Podman
+
+
+It seems once people master the basics of containers, networking is one of the first
+aspects they begin experimenting with. And in regards to networking, it takes very
+little experimentation before ending up on the deep end of the pool. The following
+guide shows the most common network setups for Podman rootfull and rootless containers.
+Each setup is supported with an example.
+
+
+## Differences between rootfull and rootless container networking
+
+One of the guiding factors on networking for containers with Podman is going to be
+whether or not the container is run by a root user or not. This is because unprivileged
+users cannot create networking interfaces on the host. Therefore, with rootfull
+containers, the default networking mode is to use the Container Network Interface
+(CNI) plugins and specifically the bridge plugin. For rootless, the default network
+mode is slirp4netns. Because of the limited privileges, slirp4netns lacks some of
+the features of CNI networking; for example, slirp4netns cannot give containers a
+routable IP address.
+
+## Firewalls
+
+The role of a firewall will not impact the setup and configuration of networking,
+but it will impact traffic on those networks. The most obvious is inbound network
+traffic to the container host, which is being passed onto containers usually with
+port mapping. Depending on the firewall implementation, we have observed firewall
+ports being opened automatically due to running a container with a port mapping (for
+example). If container traffic does not seem to work properly, check the firewall
+and allow traffic on ports the container is using. A common problem is that
+reloading the firewall deletes the cni iptables rules resulting in a loss of
+network connectivity for rootful containers. Podman v3 provides the podman
+network reload command to restore this without having to restart the container.
+
+## Basic Network Setups
+
+Most containers and pods being run with Podman adhere to a couple of simple scenarios.
+By default, rootfull Podman will create a bridged network. This is the most straightforward
+and preferred network setup for Podman. Bridge networking creates an interface for
+the container on an internal bridge network, which is then connected to the internet
+via Network Address Translation(NAT). We also see users wanting to use `macvlan`
+for networking as well. The `macvlan` plugin forwards an entire network interface
+from the host into the container, allowing it access to the network the host is connected
+to. And finally, the default network configuration for rootless containers is slirp4netns.
+The slirp4netns network mode has limited capabilities but can be run on users without
+root privileges. It creates a tunnel from the host into the container to forward
+traffic.
+
+### Bridge
+
+CNI defines a bridge network as where an internal network is created where both the
+container and host are attached. Then this network is capable of allowing the containers
+to communicate outside of the host.
+
+
+![bridge_network](podman_bridge.png)
+
+Consider the above illustration. It depicts a laptop user running two containers:
+a web and db instance. These two containers are on the virtual network with the
+host. Additionally, by default, these containers can initiate communications outside
+the laptop (to the Internet for example). The containers on the virtual network
+typically have non-routable, also known as private IP addresses.
+
+When dealing with communication that is being initiated outside the host, the outside
+client typically must address the laptop’s external network interface and given port
+number. Assuming the host allows incoming traffic, the host will know to forward
+the incoming traffic on that port to the specific container. To accomplish this,
+firewall rules are added to forward traffic when a container requests a specific
+port be forwarded.
+
+Bridge networking is the default for Podman containers created as root. Podman provides
+a default bridge network, but you can create others using the `podman network create`
+command. Containers can be joined to a CNI network when they are created with the
+`--network` flag, or after they are created via the `podman network connect` and
+`podman network disconnect` commands.
+
+As mentioned earlier, slirp4netns is the default network configuration for rootless
+users. But as of Podman version 3.0, rootless users can also use CNI networking.
+The user experience of rootless CNI is very akin to a rootfull CNI, except that
+there is no default network configuration provided. You simply need to create a
+network, and the one will be created as a bridge network.
+
+```
+$ podman network create
+```
+
+When rootless containers are run with a CNI networking configuration, a “side-car”
+container for running CNI is also run. Do not remove this container while your rootless
+containers are running. if you remove this container (e.g by accident) all attached
+containers lose network connectivity. In order to restore the network connectivity
+all containers with networks must be restarted. This will automatically recreate
+the "side-car" container. For rootfull containers, there is no “side-car” container
+as rootfull users have the permissions to create and modify network interfaces on
+the host.
+
+#### Example
+
+By default, rootfull containers use the CNI bridge plugin for its default configuration.
+In this case, no network name must be passed to Podman. However, you can create
+additional bridged networks with the podman create command. In that case, you will
+have to set the network name.
+
+The following example shows how to set up a web server and expose it to the network
+outside the host as both rootfull and rootless. It will also show how an outside
+client can connect to the container.
+
+```
+(rootfull) $ sudo podman run -dt --name webserver -p 8080:80 quay.io/libpod/banner
+00f3440c7576aae2d5b193c40513c29c7964e96bf797cf0cc352c2b68ccbe66a
+```
+
+As mentioned earlier, for rootless containers using CNI, a network must first be
+created.
+```
+$ podman network create
+/home/baude/.config/cni/net.d/cni-podman1.conflist
+```
+Now run the container.
+```
+$ podman run -dt --name webserver --net cni-podman1 -p 8081:80 quay.io/libpod/banner
+269fd0d6b2c8ed60f2ca41d7beceec2471d72fb9a33aa8ca45b81dc9a0abbb12
+```
+Note in the above run command, the container’s port 80 (where the Nginx server is
+running) was mapped to the host’s port 8080. Port 8080 was chosen to demonstrate
+how the host and container ports can be mapped for external access. The port could
+very well have been 80 as well (except for rootless users).
+
+To connect from an outside client to the webserver, simply point an HTTP client to
+the host’s IP address at port 8080 for rootfull and port 8081 for rootless.
+```
+(outside_host): $ curl 192.168.99.109:8080
+ ___ __
+ / _ \___ ___/ /_ _ ___ ____
+ / ___/ _ \/ _ / ' \/ _ `/ _ \
+/_/ \___/\_,_/_/_/_/\_,_/_//_/
+
+(outside_host): $ curl 192.168.99.109:8081
+ ___ __
+ / _ \___ ___/ /_ _ ___ ____
+ / ___/ _ \/ _ / ' \/ _ `/ _ \
+/_/ \___/\_,_/_/_/_/\_,_/_//_/
+```
+
+### Macvlan
+
+With macvlan, the container is given access to a physical network interface on the
+host. This interface can configure multiple subinterfaces. And each subinterface
+is capable of having its own MAC and IP address. In the case of Podman containers,
+the container will present itself as if it is on the same network as the host.
+
+![macvlan_network](podman_bridge.png)
+
+In the illustration, outside clients will be able to access the web container by
+its IP address directly. Usually the network information, including IP address,
+is leased from a DHCP server like most other network clients on the network. If
+the laptop is running a firewall, such as firewalld, then accommodations will need
+to be made for proper access.
+
+#### Example
+
+The following example demonstrates how to set up a web container on a macvlan and
+how to access that container from outside the host. First, create the macvlan network.
+ You need to know the network interface on the host that connects to the routable
+network. In the example case, it is eth0.
+```
+$ sudo podman network create -d macvlan -o parent=eth0 webnetwork
+/etc/cni/net.d/webnetwork.conflist
+```
+The next step is to ensure that the DHCP CNI plugin is running. This plugin facilitates
+the DHCP lease from the network.
+```
+$ sudo /usr/libexec/cni/dhcp daemon
+```
+Now run the container and be certain to attach it to the network we created earlier.
+```
+$ sudo podman run -dt --name webserver --network webnetwork quay.io/libpod/banner
+03d82083c434d7e937fc0b87c25401f46ab5050007df403bf988e25e52c5cc40
+[baude@localhost ~]$ sudo podman exec webserver ip address show eth0
+2: eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state
+UP
+link/ether 0a:3c:e2:eb:87:0f brd ff:ff:ff:ff:ff:ff
+inet 192.168.99.186/24 brd 192.168.99.255 scope global eth0
+valid_lft forever preferred_lft forever
+inet6 fe80::83c:e2ff:feeb:870f/64 scope link
+valid_lft forever preferred_lft forever
+```
+Because the container has a routable IP address (on this network) and is not being
+managed by firewalld, no change to the firewall is needed.
+```
+(outside_host): $ curl http://192.168.99.186
+ ___ __
+ / _ \___ ___/ /_ _ ___ ____
+ / ___/ _ \/ _ / ' \/ _ `/ _ \
+/_/ \___/\_,_/_/_/_/\_,_/_//_/
+```
+
+
+
+### Slirp4netns
+
+Slirp4netns is the default network setup for rootless containers and pods. It was
+invented because unprivileged users are not allowed to make network interfaces on
+the host. Slirp4netns creates a TAP device in the container’s network namespace
+and connects to the usermode TCP/IP stack. Consider the following illustration.
+
+![slirp_network](podman_rootless_default.png)
+
+The unprivileged user on this laptop has created two containers: a DB container and
+a web container. Both of these containers have the ability to access content on
+networks outside the laptop. And outside clients can access the containers if the
+container is bound to a host port and the laptop firewall allows it. Remember, unprivileged
+users must use ports 1024 through 65535 as lower ports require root privileges. (CAP_NET_BIND_SERVICE)
+Note: this can be adjusted using the `sysctl net.ipv4.ip_unprivileged_port_start`
+
+One of the drawbacks of slirp4netns is that the containers are completely isolated
+from each other. Unlike the bridge approach, there is no virtual network. For containers
+to communicate with each other, they can use the port mappings with the host system,
+or they can be put into a Pod where they share the same network namespace. See [Communicating
+between containers and pods](#Communicating-between-containers-and-pods) for more information.
+
+#### Example
+
+The following example will show how two rootless containers can communicate with
+each other where one is a web server. Then it will show how a client on the host’s
+network can communicate with the rootless web server.
+
+First, run the rootless web server and map port 80 from the container to a non-privileged
+port like 8080.
+```
+$ podman run -dt --name webserver -p 8080:80 quay.io/libpod/banner
+17ea33ccd7f55ff45766b3ec596b990a5f2ba66eb9159cb89748a85dc3cebfe0
+```
+Because rootfull containers cannot communicate with each other directly with TCP/IP
+via IP addresses, the host and the port mapping are used. To do so, the IP address
+of the host (interface) must be known.
+```
+$ ip address show eth0
+3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group
+default qlen 1000
+link/ether 3c:e1:a1:c1:7a:3f brd ff:ff:ff:ff:ff:ff
+altname eth0
+inet 192.168.99.109/24 brd 192.168.99.255 scope global dynamic noprefixroute eth0
+valid_lft 78808sec preferred_lft 78808sec
+inet6 fe80::5632:6f10:9e76:c33/64 scope link noprefixroute
+valid_lft forever preferred_lft forever
+```
+From another rootless container, use the host’s IP address and port to communicate
+between the two rootless containers successfully.
+```
+$ podman run -it quay.io/libpod/banner curl http://192.168.99.109:8080
+ ___ __
+ / _ \___ ___/ /_ _ ___ ____
+ / ___/ _ \/ _ / ' \/ _ `/ _ \
+/_/ \___/\_,_/_/_/_/\_,_/_//_/
+```
+
+From a client outside the host, the IP address and port can also be used:
+```
+(outside_host): $ curl http://192.168.99.109:8080
+ ___ __
+ / _ \___ ___/ /_ _ ___ ____
+ / ___/ _ \/ _ / ' \/ _ `/ _ \
+/_/ \___/\_,_/_/_/_/\_,_/_//_/
+```
+
+## Communicating between containers and pods
+
+Most users of containers have a decent understanding of how containers communicate
+with each other and the rest of the world. Usually each container has its own IP
+address and networking information. They communicate amongst each other using regular
+TCP/IP means like IP addresses or, in many cases, using DNS names often based on
+the container name. But pods are a collection of one or more containers, and with
+that, some uniqueness is inherited.
+
+By definition, all containers in a Podman pod share the same network namespace. This
+fact means that they will have the same IP address, MAC addresses, and port mappings.
+You can conveniently communicate between containers in a pod by using localhost.
+
+![slirp_network](podman_pod.png)
+
+The above illustration describes a Pod on a bridged network. As depicted, the Pod
+has two containers “inside” it: a DB and a Web container. Because they share the
+same network namespace, the DB and Web container can communicate with each other
+using localhost (127.0.0.1). Furthermore, they are also both addressable by the
+IP address (and DNS name if applicable) assigned to the Pod itself.
+
+For more information on container to container networking, see Configuring container
+networking with Podman.
diff --git a/docs/tutorials/podman-go-bindings.md b/docs/tutorials/podman-go-bindings.md
index ddebf7e99..24381c75c 100644
--- a/docs/tutorials/podman-go-bindings.md
+++ b/docs/tutorials/podman-go-bindings.md
@@ -35,11 +35,8 @@ $ cd $HOME
$ mkdir example && cd example
$ go mod init example.com
go: creating new go.mod: module example.com
-$ go get github.com/containers/podman/v2@v2.0.4
-go: downloading github.com/containers/podman/v2 v2.0.4
-go get: github.com/containers/podman/v2@v2.0.4: parsing go.mod:
- module declares its path as: github.com/containers/libpod/v2
- but was required as: github.com/containers/podman/v2
+$ go get github.com/containers/podman/v3
+[...]
```
This creates a new `go.mod` file in the current directory that looks as follows:
@@ -47,9 +44,9 @@ This creates a new `go.mod` file in the current directory that looks as follows:
```bash
module example.com
-go 1.14
+go 1.16
-require github.com/containers/libpod/v2 v2.0.4 // indirect
+require github.com/containers/libpod/v3 v3.0.1 // indirect
```
You can also try a demo application with the Go modules created already:
@@ -136,12 +133,12 @@ import (
"fmt"
"os"
- "github.com/containers/libpod/v2/libpod/define"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/bindings/images"
- "github.com/containers/libpod/v2/pkg/domain/entities"
- "github.com/containers/libpod/v2/pkg/specgen"
+ "github.com/containers/libpod/v3/libpod/define"
+ "github.com/containers/libpod/v3/pkg/bindings"
+ "github.com/containers/libpod/v3/pkg/bindings/containers"
+ "github.com/containers/libpod/v3/pkg/bindings/images"
+ "github.com/containers/libpod/v3/pkg/domain/entities"
+ "github.com/containers/libpod/v3/pkg/specgen"
)
func main() {
@@ -530,7 +527,7 @@ $
## Wrap Up
-Podman v2 provides a set of Go bindings to allow developers to integrate Podman
+Podman provides a set of Go bindings to allow developers to integrate Podman
functionality conveniently in their Go application. These Go bindings require
the Podman system service to be running in the background and this can easily
be achieved using systemd socket activation. Once set up, you are able to use a
@@ -539,7 +536,7 @@ containers and pods in a way which fits very nicely in many production environme
## References
-- Podman v2 is available for most major distributions along with MacOS and Windows.
+- Podman is available for most major distributions along with MacOS and Windows.
Installation details are available on the [Podman official website](https://podman.io/getting-started/).
- Documentation can be found at the [Podman Docs page](https://docs.podman.io).
diff --git a/docs/tutorials/podman_bridge.png b/docs/tutorials/podman_bridge.png
new file mode 100644
index 000000000..c0cb88951
--- /dev/null
+++ b/docs/tutorials/podman_bridge.png
Binary files differ
diff --git a/docs/tutorials/podman_macvlan.png b/docs/tutorials/podman_macvlan.png
new file mode 100644
index 000000000..04d9c9080
--- /dev/null
+++ b/docs/tutorials/podman_macvlan.png
Binary files differ
diff --git a/docs/tutorials/podman_pod.png b/docs/tutorials/podman_pod.png
new file mode 100644
index 000000000..17718e20b
--- /dev/null
+++ b/docs/tutorials/podman_pod.png
Binary files differ
diff --git a/docs/tutorials/podman_rootless_default.png b/docs/tutorials/podman_rootless_default.png
new file mode 100644
index 000000000..5d4a66644
--- /dev/null
+++ b/docs/tutorials/podman_rootless_default.png
Binary files differ
diff --git a/go.mod b/go.mod
index 97c366d73..ac7c1abea 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/containers/podman/v2
+module github.com/containers/podman/v3
go 1.13
@@ -10,7 +10,7 @@ require (
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect
github.com/containernetworking/cni v0.8.1
github.com/containernetworking/plugins v0.9.0
- github.com/containers/buildah v1.19.4
+ github.com/containers/buildah v1.19.6
github.com/containers/common v0.34.3-0.20210208115708-8668c76dd577
github.com/containers/conmon v2.0.20+incompatible
github.com/containers/image/v5 v5.10.2
@@ -50,8 +50,8 @@ require (
github.com/opentracing/opentracing-go v1.2.0
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.0
- github.com/rootless-containers/rootlesskit v0.13.0
- github.com/sirupsen/logrus v1.7.0
+ github.com/rootless-containers/rootlesskit v0.13.1
+ github.com/sirupsen/logrus v1.8.0
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
@@ -68,6 +68,6 @@ require (
google.golang.org/appengine v1.6.6 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
k8s.io/api v0.0.0-20190620084959-7cf5895f2711
- k8s.io/apimachinery v0.20.2
+ k8s.io/apimachinery v0.20.3
k8s.io/client-go v0.0.0-20190620085101-78d2af792bab
)
diff --git a/go.sum b/go.sum
index 1213d200c..20f756026 100644
--- a/go.sum
+++ b/go.sum
@@ -96,16 +96,13 @@ github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ
github.com/containernetworking/plugins v0.8.7/go.mod h1:R7lXeZaBzpfqapcAbHRW8/CYwm0dHzbz0XEjofx0uB0=
github.com/containernetworking/plugins v0.9.0 h1:c+1gegKhR7+d0Caum9pEHugZlyhXPOG6v3V6xJgIGCI=
github.com/containernetworking/plugins v0.9.0/go.mod h1:dbWv4dI0QrBGuVgj+TuVQ6wJRZVOhrCQj91YyC92sxg=
-github.com/containers/buildah v1.19.4 h1:TygMnZAt8JCQ0i1APbSHfdn69B2vGvPoJKD+f6D6fuA=
-github.com/containers/buildah v1.19.4/go.mod h1:PfK0EiB871UFD1CT8xNsKq60s7xw2pgSOEGICf+x6O8=
-github.com/containers/common v0.33.1 h1:XpDiq8Cta8+u1s4kpYSEWdB140ZmqgyIXfWkLqKx3z0=
-github.com/containers/common v0.33.1/go.mod h1:mjDo/NKeweL/onaspLhZ38WnHXaYmrELHclIdvSnYpY=
+github.com/containers/buildah v1.19.6 h1:8mPysB7QzHxX9okR+Bwq/lsKAZA/FjDcqB+vebgwI1g=
+github.com/containers/buildah v1.19.6/go.mod h1:VnyHWgNmfR1d89/zJ/F4cbwOzaQS+6sBky46W7dCo3E=
+github.com/containers/common v0.33.4/go.mod h1:PhgL71XuC4jJ/1BIqeP7doke3aMFkCP90YBXwDeUr9g=
github.com/containers/common v0.34.3-0.20210208115708-8668c76dd577 h1:tUJcLouJ1bC3w9gdqgKqZBsj2uCuM8D8jSR592lxbhE=
github.com/containers/common v0.34.3-0.20210208115708-8668c76dd577/go.mod h1:mwZ9H8sK4+dtWxsnVLyWcjxK/gEQClrLsXsqLvbEKbI=
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
-github.com/containers/image/v5 v5.9.0 h1:dRmUtcluQcmasNo3DpnRoZjfU0rOu1qZeL6wlDJr10Q=
-github.com/containers/image/v5 v5.9.0/go.mod h1:blOEFd/iFdeyh891ByhCVUc+xAcaI3gBegXECwz9UbQ=
github.com/containers/image/v5 v5.10.1 h1:tHhGQ8RCMxJfJLD/PEW1qrOKX8nndledW9qz6UiAxns=
github.com/containers/image/v5 v5.10.1/go.mod h1:JlRLJZv7elVbtHaaaR6Kz8i6G3k2ttj4t7fubwxD9Hs=
github.com/containers/image/v5 v5.10.2 h1:STD9GYR9p/X0qTLmBYsyx8dEM7zQW+qZ8KHoL/64fkg=
@@ -118,9 +115,9 @@ github.com/containers/ocicrypt v1.1.0 h1:A6UzSUFMla92uxO43O6lm86i7evMGjTY7wTKB2D
github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4=
github.com/containers/psgo v1.5.2 h1:3aoozst/GIwsrr/5jnFy3FrJay98uujPCu9lTuSZ/Cw=
github.com/containers/psgo v1.5.2/go.mod h1:2ubh0SsreMZjSXW1Hif58JrEcFudQyIy9EzPUWfawVU=
-github.com/containers/storage v1.23.7/go.mod h1:cUT2zHjtx+WlVri30obWmM2gpqpi8jfPsmIzP1TVpEI=
github.com/containers/storage v1.24.5 h1:BusfdU0rCS2/Daa/DPw+0iLfGRlYA7UVF7D0el3N7Vk=
github.com/containers/storage v1.24.5/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
+github.com/containers/storage v1.24.6/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
github.com/containers/storage v1.25.0 h1:p0PLlQcWmtE+7XLfOCR0WuYyMTby1yozpI4DaKOtWTA=
github.com/containers/storage v1.25.0/go.mod h1:UxTYd5F4mPVqmDRcRL0PBS8+HP74aBn96eahnhEvPtk=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
@@ -345,8 +342,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.11.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
-github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.5 h1:xNCE0uE6yvTPRS+0wGNMHPo3NIpwnk6aluQZ6R6kRcc=
github.com/klauspost/compress v1.11.5/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg=
@@ -367,6 +362,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
+github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g=
+github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -481,7 +478,6 @@ github.com/opencontainers/runtime-spec v1.0.3-0.20200817204227-f9c09b4ea1df/go.m
github.com/opencontainers/runtime-tools v0.9.0 h1:FYgwVsKRI/H9hU32MJ/4MLOzXWodKK5zsQavY8NPMkU=
github.com/opencontainers/runtime-tools v0.9.0/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
github.com/opencontainers/selinux v1.5.1/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g=
-github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE=
github.com/opencontainers/selinux v1.8.0 h1:+77ba4ar4jsCbL1GLbFL8fFM57w6suPfSS9PDLDY7KM=
github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
github.com/openshift/imagebuilder v1.1.8 h1:gjiIl8pbNj0eC4XWvFJHATdDvYm64p9/pLDLQWoLZPA=
@@ -528,8 +524,8 @@ github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDa
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rootless-containers/rootlesskit v0.13.0 h1:41nnfB7yFxtHSeQHYupSvVxAJWh/hjmn03w6UjH7nv8=
-github.com/rootless-containers/rootlesskit v0.13.0/go.mod h1:DwE/9ASct8sj7bueOXqKiwcdzyZ+yV6qhTAtJUO7988=
+github.com/rootless-containers/rootlesskit v0.13.1 h1:QIMHxf00SaUinpJ2r9vwD4z6E3Yq8kk/aZ6ItNXIPHA=
+github.com/rootless-containers/rootlesskit v0.13.1/go.mod h1:DwE/9ASct8sj7bueOXqKiwcdzyZ+yV6qhTAtJUO7988=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
@@ -549,6 +545,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU=
+github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
@@ -592,8 +590,6 @@ github.com/uber/jaeger-client-go v2.25.0+incompatible h1:IxcNZ7WRY1Y3G4poYlx24sz
github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw=
github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
-github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
-github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I=
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
@@ -602,8 +598,6 @@ github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
github.com/vbatts/tar-split v0.11.1 h1:0Odu65rhcZ3JZaPHxl7tCI3V/C/Q9Zf82UFravl02dE=
github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g=
-github.com/vbauerster/mpb/v5 v5.3.0 h1:vgrEJjUzHaSZKDRRxul5Oh4C72Yy/5VEMb0em+9M0mQ=
-github.com/vbauerster/mpb/v5 v5.3.0/go.mod h1:4yTkvAb8Cm4eylAp6t0JRq6pXDkFJ4krUlDqWYkakAs=
github.com/vbauerster/mpb/v5 v5.4.0 h1:n8JPunifvQvh6P1D1HAl2Ur9YcmKT1tpoUuiea5mlmg=
github.com/vbauerster/mpb/v5 v5.4.0/go.mod h1:fi4wVo7BVQ22QcvFObm+VwliQXlV1eBT8JDaKXR4JGI=
github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
@@ -614,7 +608,6 @@ github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmF
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
-github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE=
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -765,7 +758,6 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -915,8 +907,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
k8s.io/api v0.0.0-20190620084959-7cf5895f2711 h1:BblVYz/wE5WtBsD/Gvu54KyBUTJMflolzc5I2DTvh50=
k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A=
k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA=
-k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg=
-k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
+k8s.io/apimachinery v0.20.3 h1:P0heYNTI2km9gTUAb0PX5qRd8oHAaesICvkg13k97y4=
+k8s.io/apimachinery v0.20.3/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
k8s.io/client-go v0.0.0-20190620085101-78d2af792bab h1:E8Fecph0qbNsAbijJJQryKu4Oi9QTp5cVpjTE+nqg6g=
k8s.io/client-go v0.0.0-20190620085101-78d2af792bab/go.mod h1:E95RaSlHr79aHaX0aGSwcPNfygDiPKOVXdmivCIZT0k=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
diff --git a/hack/podman-registry-go/registry.go b/hack/podman-registry-go/registry.go
index 7ade48e01..e9ec61ffe 100644
--- a/hack/podman-registry-go/registry.go
+++ b/hack/podman-registry-go/registry.go
@@ -3,7 +3,7 @@ package registry
import (
"strings"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/utils"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go
index c9d214cd0..6f2eaeab2 100644
--- a/libpod/boltdb_state.go
+++ b/libpod/boltdb_state.go
@@ -6,7 +6,7 @@ import (
"strings"
"sync"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go
index 6014fbef3..cf8f1c175 100644
--- a/libpod/boltdb_state_internal.go
+++ b/libpod/boltdb_state_internal.go
@@ -7,8 +7,8 @@ import (
"runtime"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/boltdb_state_linux.go b/libpod/boltdb_state_linux.go
index 65efd5703..72243dcc5 100644
--- a/libpod/boltdb_state_linux.go
+++ b/libpod/boltdb_state_linux.go
@@ -3,7 +3,7 @@
package libpod
import (
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/common_test.go b/libpod/common_test.go
index 4eeb5c317..4c419cfa8 100644
--- a/libpod/common_test.go
+++ b/libpod/common_test.go
@@ -8,8 +8,8 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/lock"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/lock"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/opencontainers/runtime-tools/generate"
"github.com/stretchr/testify/assert"
diff --git a/libpod/container.go b/libpod/container.go
index 613a02554..9841bddf7 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -12,9 +12,9 @@ import (
cnitypes "github.com/containernetworking/cni/pkg/types/current"
"github.com/containers/common/pkg/secrets"
"github.com/containers/image/v5/manifest"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/lock"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/lock"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/storage"
"github.com/cri-o/ocicni/pkg/ocicni"
spec "github.com/opencontainers/runtime-spec/specs-go"
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 2473acec0..ec5bd08d2 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -8,9 +8,9 @@ import (
"sync"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/signal"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/signal"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/container_commit.go b/libpod/container_commit.go
index 3386a17bd..22da0c566 100644
--- a/libpod/container_commit.go
+++ b/libpod/container_commit.go
@@ -9,10 +9,10 @@ import (
"github.com/containers/buildah/util"
is "github.com/containers/image/v5/storage"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/libpod/image"
- libpodutil "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/libpod/image"
+ libpodutil "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/container_config.go b/libpod/container_config.go
index 5d7e65f2b..be24b54d6 100644
--- a/libpod/container_config.go
+++ b/libpod/container_config.go
@@ -6,7 +6,7 @@ import (
"github.com/containers/common/pkg/secrets"
"github.com/containers/image/v5/manifest"
- "github.com/containers/podman/v2/pkg/namespaces"
+ "github.com/containers/podman/v3/pkg/namespaces"
"github.com/containers/storage"
"github.com/cri-o/ocicni/pkg/ocicni"
spec "github.com/opencontainers/runtime-spec/specs-go"
diff --git a/libpod/container_exec.go b/libpod/container_exec.go
index 0d18b55ca..7b1d797bb 100644
--- a/libpod/container_exec.go
+++ b/libpod/container_exec.go
@@ -8,8 +8,8 @@ import (
"strconv"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
"github.com/containers/storage/pkg/stringid"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/container_graph.go b/libpod/container_graph.go
index 39f6ed281..3ae7cfbc7 100644
--- a/libpod/container_graph.go
+++ b/libpod/container_graph.go
@@ -4,7 +4,7 @@ import (
"context"
"strings"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/container_graph_test.go b/libpod/container_graph_test.go
index 518f3e74b..7ad7359bb 100644
--- a/libpod/container_graph_test.go
+++ b/libpod/container_graph_test.go
@@ -3,7 +3,7 @@ package libpod
import (
"testing"
- "github.com/containers/podman/v2/libpod/lock"
+ "github.com/containers/podman/v3/libpod/lock"
"github.com/stretchr/testify/assert"
)
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index e87e26c61..399eff845 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -5,9 +5,9 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/driver"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/driver"
+ "github.com/containers/podman/v3/pkg/util"
units "github.com/docker/go-units"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index ced357096..2e0c24579 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -15,14 +15,14 @@ import (
"github.com/containers/buildah/copier"
"github.com/containers/common/pkg/secrets"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/ctime"
- "github.com/containers/podman/v2/pkg/hooks"
- "github.com/containers/podman/v2/pkg/hooks/exec"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/selinux"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/ctime"
+ "github.com/containers/podman/v3/pkg/hooks"
+ "github.com/containers/podman/v3/pkg/hooks/exec"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/selinux"
"github.com/containers/storage"
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/idtools"
@@ -1617,6 +1617,17 @@ func (c *Container) mountNamedVolume(v *ContainerNamedVolume, mountpoint string)
if !srcStat.IsDir() {
return vol, nil
}
+ // Read contents, do not bother continuing if it's empty. Fixes
+ // a bizarre issue where something copier.Get will ENOENT on
+ // empty directories and sometimes it will not.
+ // RHBZ#1928643
+ srcContents, err := ioutil.ReadDir(srcDir)
+ if err != nil {
+ return nil, errors.Wrapf(err, "error reading contents of source directory for copy up into volume %s", vol.Name())
+ }
+ if len(srcContents) == 0 {
+ return vol, nil
+ }
// Buildah Copier accepts a reader, so we'll need a pipe.
reader, writer := io.Pipe()
@@ -1633,7 +1644,7 @@ func (c *Container) mountNamedVolume(v *ContainerNamedVolume, mountpoint string)
getOptions := copier.GetOptions{
KeepDirectoryNames: false,
}
- errChan <- copier.Get(mountpoint, "", getOptions, []string{v.Dest + "/."}, writer)
+ errChan <- copier.Get(srcDir, "", getOptions, []string{"/."}, writer)
}()
// Copy, volume side: stream what we've written to the pipe, into
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index a3476f42e..43a345ea9 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -21,22 +21,23 @@ import (
cnitypes "github.com/containernetworking/cni/pkg/types/current"
"github.com/containernetworking/plugins/pkg/ns"
+ "github.com/containers/buildah/pkg/chrootuser"
"github.com/containers/buildah/pkg/overlay"
"github.com/containers/common/pkg/apparmor"
"github.com/containers/common/pkg/config"
"github.com/containers/common/pkg/subscriptions"
"github.com/containers/common/pkg/umask"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/annotations"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/criu"
- "github.com/containers/podman/v2/pkg/lookup"
- "github.com/containers/podman/v2/pkg/resolvconf"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
- "github.com/containers/podman/v2/utils"
- "github.com/containers/podman/v2/version"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/annotations"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/criu"
+ "github.com/containers/podman/v3/pkg/lookup"
+ "github.com/containers/podman/v3/pkg/resolvconf"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
+ "github.com/containers/podman/v3/utils"
+ "github.com/containers/podman/v3/version"
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/idtools"
securejoin "github.com/cyphar/filepath-securejoin"
@@ -203,10 +204,17 @@ func (c *Container) resolveWorkDir() error {
}
logrus.Debugf("Workdir %q resolved to host path %q", workdir, resolvedWorkdir)
- // No need to create it (e.g., `--workdir=/foo`), so let's make sure
- // the path exists on the container.
+ st, err := os.Stat(resolvedWorkdir)
+ if err == nil {
+ if !st.IsDir() {
+ return errors.Errorf("workdir %q exists on container %s, but is not a directory", workdir, c.ID())
+ }
+ return nil
+ }
if !c.config.CreateWorkingDir {
- if _, err := os.Stat(resolvedWorkdir); err != nil {
+ // No need to create it (e.g., `--workdir=/foo`), so let's make sure
+ // the path exists on the container.
+ if err != nil {
if os.IsNotExist(err) {
return errors.Errorf("workdir %q does not exist on container %s", workdir, c.ID())
}
@@ -216,11 +224,6 @@ func (c *Container) resolveWorkDir() error {
}
return nil
}
-
- // Ensure container entrypoint is created (if required).
- rootUID := c.RootUID()
- rootGID := c.RootGID()
-
if err := os.MkdirAll(resolvedWorkdir, 0755); err != nil {
if os.IsExist(err) {
return nil
@@ -228,7 +231,12 @@ func (c *Container) resolveWorkDir() error {
return errors.Wrapf(err, "error creating container %s workdir", c.ID())
}
- if err := os.Chown(resolvedWorkdir, rootUID, rootGID); err != nil {
+ // Ensure container entrypoint is created (if required).
+ uid, gid, _, err := chrootuser.GetUser(c.state.Mountpoint, c.User())
+ if err != nil {
+ return errors.Wrapf(err, "error looking up %s inside of the container %s", c.User(), c.ID())
+ }
+ if err := os.Chown(resolvedWorkdir, int(uid), int(gid)); err != nil {
return errors.Wrapf(err, "error chowning container %s workdir to container root", c.ID())
}
@@ -458,7 +466,7 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
break
}
}
- if !hasHomeSet {
+ if !hasHomeSet && execUser.Home != "" {
c.config.Spec.Process.Env = append(c.config.Spec.Process.Env, fmt.Sprintf("HOME=%s", execUser.Home))
}
@@ -1619,7 +1627,7 @@ func (c *Container) makeBindMounts() error {
// Make .containerenv if it does not exist
if _, ok := c.state.BindMounts["/run/.containerenv"]; !ok {
- var containerenv string
+ containerenv := c.runtime.graphRootMountedFlag(c.config.Spec.Mounts)
isRootless := 0
if rootless.IsRootless() {
isRootless = 1
@@ -1634,7 +1642,7 @@ id=%q
image=%q
imageid=%q
rootless=%d
-`, version.Version.String(), c.Name(), c.ID(), imageName, imageID, isRootless)
+%s`, version.Version.String(), c.Name(), c.ID(), imageName, imageID, isRootless, containerenv)
}
containerenvPath, err := c.writeStringToRundir(".containerenv", containerenv)
if err != nil {
diff --git a/libpod/container_internal_unsupported.go b/libpod/container_internal_unsupported.go
index 7f6fc9ec9..f979bcbde 100644
--- a/libpod/container_internal_unsupported.go
+++ b/libpod/container_internal_unsupported.go
@@ -5,8 +5,8 @@ package libpod
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/lookup"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/lookup"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
diff --git a/libpod/container_log.go b/libpod/container_log.go
index f16e08353..a3b700004 100644
--- a/libpod/container_log.go
+++ b/libpod/container_log.go
@@ -6,8 +6,8 @@ import (
"os"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/logs"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/logs"
"github.com/hpcloud/tail/watch"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/container_log_linux.go b/libpod/container_log_linux.go
index d895171cf..5792633b0 100644
--- a/libpod/container_log_linux.go
+++ b/libpod/container_log_linux.go
@@ -8,11 +8,12 @@ import (
"fmt"
"io"
"math"
- "strings"
"time"
- "github.com/containers/podman/v2/libpod/logs"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/logs"
journal "github.com/coreos/go-systemd/v22/sdjournal"
+ "github.com/hpcloud/tail/watch"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -34,10 +35,16 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
var config journal.JournalReaderConfig
if options.Tail < 0 {
config.NumFromTail = 0
+ } else if options.Tail == 0 {
+ config.NumFromTail = math.MaxUint64
} else {
config.NumFromTail = uint64(options.Tail)
}
- config.Formatter = journalFormatter
+ if options.Multi {
+ config.Formatter = journalFormatterWithID
+ } else {
+ config.Formatter = journalFormatter
+ }
defaultTime := time.Time{}
if options.Since != defaultTime {
// coreos/go-systemd/sdjournal doesn't correctly handle requests for data in the future
@@ -45,7 +52,7 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
if time.Now().Before(options.Since) {
return nil
}
- config.Since = time.Since(options.Since)
+ config.Since = -time.Since(options.Since)
}
config.Matches = append(config.Matches, journal.Match{
Field: "CONTAINER_ID_FULL",
@@ -63,8 +70,12 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
if options.Tail == math.MaxInt64 {
r.Rewind()
}
+ state, err := c.State()
+ if err != nil {
+ return err
+ }
- if options.Follow {
+ if options.Follow && state == define.ContainerStateRunning {
go func() {
done := make(chan bool)
until := make(chan time.Time)
@@ -76,6 +87,21 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
// nothing to do anymore
}
}()
+ go func() {
+ for {
+ state, err := c.State()
+ if err != nil {
+ until <- time.Time{}
+ logrus.Error(err)
+ break
+ }
+ time.Sleep(watch.POLL_DURATION)
+ if state != define.ContainerStateRunning && state != define.ContainerStatePaused {
+ until <- time.Time{}
+ break
+ }
+ }
+ }()
follower := FollowBuffer{logChannel}
err := r.Follow(until, follower)
if err != nil {
@@ -114,7 +140,44 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
return nil
}
+func journalFormatterWithID(entry *journal.JournalEntry) (string, error) {
+ output, err := formatterPrefix(entry)
+ if err != nil {
+ return "", err
+ }
+
+ id, ok := entry.Fields["CONTAINER_ID_FULL"]
+ if !ok {
+ return "", fmt.Errorf("no CONTAINER_ID_FULL field present in journal entry")
+ }
+ if len(id) > 12 {
+ id = id[:12]
+ }
+ output += fmt.Sprintf("%s ", id)
+ // Append message
+ msg, err := formatterMessage(entry)
+ if err != nil {
+ return "", err
+ }
+ output += msg
+ return output, nil
+}
+
func journalFormatter(entry *journal.JournalEntry) (string, error) {
+ output, err := formatterPrefix(entry)
+ if err != nil {
+ return "", err
+ }
+ // Append message
+ msg, err := formatterMessage(entry)
+ if err != nil {
+ return "", err
+ }
+ output += msg
+ return output, nil
+}
+
+func formatterPrefix(entry *journal.JournalEntry) (string, error) {
usec := entry.RealtimeTimestamp
tsString := time.Unix(0, int64(usec)*int64(time.Microsecond)).Format(logs.LogTimeFormat)
output := fmt.Sprintf("%s ", tsString)
@@ -137,13 +200,16 @@ func journalFormatter(entry *journal.JournalEntry) (string, error) {
output += fmt.Sprintf("%s ", logs.FullLogType)
}
+ return output, nil
+}
+
+func formatterMessage(entry *journal.JournalEntry) (string, error) {
// Finally, append the message
msg, ok := entry.Fields["MESSAGE"]
if !ok {
return "", fmt.Errorf("no MESSAGE field present in journal entry")
}
- output += strings.TrimSpace(msg)
- return output, nil
+ return msg, nil
}
type FollowBuffer struct {
diff --git a/libpod/container_log_unsupported.go b/libpod/container_log_unsupported.go
index 4106b36e5..d10082141 100644
--- a/libpod/container_log_unsupported.go
+++ b/libpod/container_log_unsupported.go
@@ -5,8 +5,8 @@ package libpod
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/logs"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/logs"
"github.com/pkg/errors"
)
diff --git a/libpod/container_top_linux.go b/libpod/container_top_linux.go
index 161367d75..ee03570ab 100644
--- a/libpod/container_top_linux.go
+++ b/libpod/container_top_linux.go
@@ -8,8 +8,8 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/psgo"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/container_top_unsupported.go b/libpod/container_top_unsupported.go
index 866fe106f..1a096d248 100644
--- a/libpod/container_top_unsupported.go
+++ b/libpod/container_top_unsupported.go
@@ -2,7 +2,7 @@
package libpod
-import "github.com/containers/podman/v2/libpod/define"
+import "github.com/containers/podman/v3/libpod/define"
// Top gathers statistics about the running processes in a container. It returns a
// []string for output
diff --git a/libpod/container_validate.go b/libpod/container_validate.go
index 57bb929dd..245121a91 100644
--- a/libpod/container_validate.go
+++ b/libpod/container_validate.go
@@ -1,7 +1,7 @@
package libpod
import (
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
diff --git a/libpod/define/version.go b/libpod/define/version.go
index d4cdd539d..67dc730ac 100644
--- a/libpod/define/version.go
+++ b/libpod/define/version.go
@@ -5,7 +5,7 @@ import (
"strconv"
"time"
- podmanVersion "github.com/containers/podman/v2/version"
+ podmanVersion "github.com/containers/podman/v3/version"
)
// Overwritten at build time
diff --git a/libpod/diff.go b/libpod/diff.go
index 43f4d2e96..36d60b838 100644
--- a/libpod/diff.go
+++ b/libpod/diff.go
@@ -3,7 +3,7 @@ package libpod
import (
"io"
- "github.com/containers/podman/v2/libpod/layers"
+ "github.com/containers/podman/v3/libpod/layers"
"github.com/containers/storage/pkg/archive"
"github.com/pkg/errors"
)
diff --git a/libpod/driver/driver.go b/libpod/driver/driver.go
index de71c1f6e..6fe2cf8ac 100644
--- a/libpod/driver/driver.go
+++ b/libpod/driver/driver.go
@@ -1,7 +1,7 @@
package driver
import (
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/containers/storage"
)
diff --git a/libpod/events.go b/libpod/events.go
index e199a3846..839229674 100644
--- a/libpod/events.go
+++ b/libpod/events.go
@@ -5,7 +5,7 @@ import (
"fmt"
"sync"
- "github.com/containers/podman/v2/libpod/events"
+ "github.com/containers/podman/v3/libpod/events"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/events/filters.go b/libpod/events/filters.go
index 26e1e10ba..acfb96302 100644
--- a/libpod/events/filters.go
+++ b/libpod/events/filters.go
@@ -4,7 +4,7 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go
index 8b7e448b1..23e5f15b1 100644
--- a/libpod/events/journal_linux.go
+++ b/libpod/events/journal_linux.go
@@ -8,7 +8,7 @@ import (
"strconv"
"time"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/coreos/go-systemd/v22/journal"
"github.com/coreos/go-systemd/v22/sdjournal"
"github.com/pkg/errors"
diff --git a/libpod/events/logfile.go b/libpod/events/logfile.go
index c5feabe66..7a32ea311 100644
--- a/libpod/events/logfile.go
+++ b/libpod/events/logfile.go
@@ -6,7 +6,7 @@ import (
"os"
"time"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/pkg/errors"
)
diff --git a/libpod/healthcheck.go b/libpod/healthcheck.go
index 6c5becd5b..c32ba85cb 100644
--- a/libpod/healthcheck.go
+++ b/libpod/healthcheck.go
@@ -9,7 +9,7 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/healthcheck_linux.go b/libpod/healthcheck_linux.go
index 0ad15da09..e08214809 100644
--- a/libpod/healthcheck_linux.go
+++ b/libpod/healthcheck_linux.go
@@ -6,8 +6,8 @@ import (
"os/exec"
"strings"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/systemd"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/systemd"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/healthcheck_unsupported.go b/libpod/healthcheck_unsupported.go
index 67c952b40..8b6a0209b 100644
--- a/libpod/healthcheck_unsupported.go
+++ b/libpod/healthcheck_unsupported.go
@@ -2,7 +2,7 @@
package libpod
-import "github.com/containers/podman/v2/libpod/define"
+import "github.com/containers/podman/v3/libpod/define"
// createTimer systemd timers for healthchecks of a container
func (c *Container) createTimer() error {
diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go
index 835473a1f..0a2a375ae 100644
--- a/libpod/image/docker_registry_options.go
+++ b/libpod/image/docker_registry_options.go
@@ -6,7 +6,7 @@ import (
"github.com/containers/buildah/pkg/parse"
"github.com/containers/image/v5/docker/reference"
"github.com/containers/image/v5/types"
- podmanVersion "github.com/containers/podman/v2/version"
+ podmanVersion "github.com/containers/podman/v3/version"
)
// DockerRegistryOptions encapsulates settings that affect how we connect or
diff --git a/libpod/image/errors.go b/libpod/image/errors.go
index 3f58b1c6a..49f841bf4 100644
--- a/libpod/image/errors.go
+++ b/libpod/image/errors.go
@@ -1,7 +1,7 @@
package image
import (
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
)
var (
diff --git a/libpod/image/filters.go b/libpod/image/filters.go
index 4aff0a7b5..37d3cb6a5 100644
--- a/libpod/image/filters.go
+++ b/libpod/image/filters.go
@@ -8,7 +8,7 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/pkg/inspect"
+ "github.com/containers/podman/v3/pkg/inspect"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 8d8af0064..7c760a79a 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -29,12 +29,12 @@ import (
"github.com/containers/image/v5/transports"
"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/driver"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/inspect"
- "github.com/containers/podman/v2/pkg/registries"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/driver"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/inspect"
+ "github.com/containers/podman/v3/pkg/registries"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
digest "github.com/opencontainers/go-digest"
ociv1 "github.com/opencontainers/image-spec/specs-go/v1"
diff --git a/libpod/image/image_test.go b/libpod/image/image_test.go
index 8055ef7b1..1ea4f6c11 100644
--- a/libpod/image/image_test.go
+++ b/libpod/image/image_test.go
@@ -7,8 +7,8 @@ import (
"os"
"testing"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/containers/storage/pkg/reexec"
"github.com/opencontainers/go-digest"
diff --git a/libpod/image/prune.go b/libpod/image/prune.go
index 6f026f630..d6ae5feaf 100644
--- a/libpod/image/prune.go
+++ b/libpod/image/prune.go
@@ -5,9 +5,9 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/timetype"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/timetype"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/image/pull.go b/libpod/image/pull.go
index 996b5995a..3cb1e57c7 100644
--- a/libpod/image/pull.go
+++ b/libpod/image/pull.go
@@ -19,9 +19,9 @@ import (
"github.com/containers/image/v5/transports"
"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/registries"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/registries"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/image/search.go b/libpod/image/search.go
index c5799219a..714551e6e 100644
--- a/libpod/image/search.go
+++ b/libpod/image/search.go
@@ -10,7 +10,7 @@ import (
"github.com/containers/image/v5/docker"
"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/image/v5/types"
- sysreg "github.com/containers/podman/v2/pkg/registries"
+ sysreg "github.com/containers/podman/v3/pkg/registries"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/sync/semaphore"
diff --git a/libpod/image/utils.go b/libpod/image/utils.go
index 8882adcc1..0b4264112 100644
--- a/libpod/image/utils.go
+++ b/libpod/image/utils.go
@@ -11,7 +11,7 @@ import (
"github.com/containers/image/v5/docker/reference"
"github.com/containers/image/v5/signature"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/containers/storage"
"github.com/pkg/errors"
)
diff --git a/libpod/in_memory_state.go b/libpod/in_memory_state.go
index 9285589b1..26f15d9c8 100644
--- a/libpod/in_memory_state.go
+++ b/libpod/in_memory_state.go
@@ -3,8 +3,8 @@ package libpod
import (
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/registrar"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/registrar"
"github.com/containers/storage/pkg/truncindex"
"github.com/pkg/errors"
)
diff --git a/libpod/info.go b/libpod/info.go
index f5bfb122e..ef0c83a2a 100644
--- a/libpod/info.go
+++ b/libpod/info.go
@@ -15,11 +15,11 @@ import (
"github.com/containers/buildah"
"github.com/containers/common/pkg/apparmor"
"github.com/containers/common/pkg/seccomp"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/linkmode"
- "github.com/containers/podman/v2/pkg/cgroups"
- registries2 "github.com/containers/podman/v2/pkg/registries"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/linkmode"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ registries2 "github.com/containers/podman/v3/pkg/registries"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/storage"
"github.com/containers/storage/pkg/system"
"github.com/opencontainers/selinux/go-selinux"
diff --git a/libpod/kube.go b/libpod/kube.go
index 6cb7723c9..0c4f9f0a0 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -7,9 +7,9 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/lookup"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/lookup"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
diff --git a/libpod/lock/file_lock_manager.go b/libpod/lock/file_lock_manager.go
index 68ec3986c..155606642 100644
--- a/libpod/lock/file_lock_manager.go
+++ b/libpod/lock/file_lock_manager.go
@@ -1,7 +1,7 @@
package lock
import (
- "github.com/containers/podman/v2/libpod/lock/file"
+ "github.com/containers/podman/v3/libpod/lock/file"
)
// FileLockManager manages shared memory locks.
diff --git a/libpod/lock/shm_lock_manager_linux.go b/libpod/lock/shm_lock_manager_linux.go
index 9581607b6..ecccb2bcb 100644
--- a/libpod/lock/shm_lock_manager_linux.go
+++ b/libpod/lock/shm_lock_manager_linux.go
@@ -5,7 +5,7 @@ package lock
import (
"syscall"
- "github.com/containers/podman/v2/libpod/lock/shm"
+ "github.com/containers/podman/v3/libpod/lock/shm"
"github.com/pkg/errors"
)
diff --git a/libpod/logs/log.go b/libpod/logs/log.go
index 2637c8524..bba52408d 100644
--- a/libpod/logs/log.go
+++ b/libpod/logs/log.go
@@ -8,7 +8,7 @@ import (
"sync"
"time"
- "github.com/containers/podman/v2/libpod/logs/reversereader"
+ "github.com/containers/podman/v3/libpod/logs/reversereader"
"github.com/hpcloud/tail"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/network/create.go b/libpod/network/create.go
index c58d62575..1a5aa82fc 100644
--- a/libpod/network/create.go
+++ b/libpod/network/create.go
@@ -10,9 +10,9 @@ import (
"github.com/containernetworking/cni/pkg/version"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/network/create_test.go b/libpod/network/create_test.go
index 017bf31fe..c3824bd91 100644
--- a/libpod/network/create_test.go
+++ b/libpod/network/create_test.go
@@ -4,7 +4,7 @@ import (
"net"
"testing"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func Test_validateBridgeOptions(t *testing.T) {
diff --git a/libpod/network/devices.go b/libpod/network/devices.go
index a5d23fae4..de6bb4efc 100644
--- a/libpod/network/devices.go
+++ b/libpod/network/devices.go
@@ -5,8 +5,8 @@ import (
"os/exec"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/pkg/util"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/pkg/util"
+ "github.com/containers/podman/v3/utils"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/network/files.go b/libpod/network/files.go
index 33cf01064..f869d32c3 100644
--- a/libpod/network/files.go
+++ b/libpod/network/files.go
@@ -10,7 +10,7 @@ import (
"github.com/containernetworking/cni/libcni"
"github.com/containernetworking/plugins/plugins/ipam/host-local/backend/allocator"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/network/netconflist.go b/libpod/network/netconflist.go
index 9be98e78f..1a1583587 100644
--- a/libpod/network/netconflist.go
+++ b/libpod/network/netconflist.go
@@ -7,7 +7,7 @@ import (
"strings"
"github.com/containernetworking/cni/libcni"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/libpod/network/network.go b/libpod/network/network.go
index cdaef6c13..b347ec0e2 100644
--- a/libpod/network/network.go
+++ b/libpod/network/network.go
@@ -10,10 +10,10 @@ import (
"github.com/containernetworking/cni/pkg/types"
"github.com/containernetworking/plugins/plugins/ipam/host-local/backend/allocator"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index de6f75d3e..5f9ad0e27 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -22,13 +22,13 @@ import (
cnitypes "github.com/containernetworking/cni/pkg/types/current"
"github.com/containernetworking/plugins/pkg/ns"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/libpod/network"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/netns"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/rootlessport"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/libpod/network"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/netns"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/rootlessport"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/networking_unsupported.go b/libpod/networking_unsupported.go
index 9e5c4adde..20c27ca7f 100644
--- a/libpod/networking_unsupported.go
+++ b/libpod/networking_unsupported.go
@@ -4,7 +4,7 @@ package libpod
import (
cnitypes "github.com/containernetworking/cni/pkg/types/current"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
)
func (r *Runtime) setupRootlessNetNS(ctr *Container) error {
diff --git a/libpod/oci.go b/libpod/oci.go
index 6948e6425..ec6b424ce 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -3,7 +3,7 @@ package libpod
import (
"net/http"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"k8s.io/client-go/tools/remotecommand"
)
diff --git a/libpod/oci_attach_linux.go b/libpod/oci_attach_linux.go
index 4556eba94..c3db0f9e0 100644
--- a/libpod/oci_attach_linux.go
+++ b/libpod/oci_attach_linux.go
@@ -10,10 +10,10 @@ import (
"path/filepath"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/kubeutils"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/kubeutils"
+ "github.com/containers/podman/v3/utils"
"github.com/moby/term"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/oci_attach_unsupported.go b/libpod/oci_attach_unsupported.go
index 317dfdc90..b2184f993 100644
--- a/libpod/oci_attach_unsupported.go
+++ b/libpod/oci_attach_unsupported.go
@@ -5,7 +5,7 @@ package libpod
import (
"os"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"k8s.io/client-go/tools/remotecommand"
)
diff --git a/libpod/oci_conmon_exec_linux.go b/libpod/oci_conmon_exec_linux.go
index faf86ea5b..c5f42fe3e 100644
--- a/libpod/oci_conmon_exec_linux.go
+++ b/libpod/oci_conmon_exec_linux.go
@@ -10,10 +10,10 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/util"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/util"
+ "github.com/containers/podman/v3/utils"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 38ffba7d2..47c628724 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -25,14 +25,14 @@ import (
"github.com/containers/common/pkg/capabilities"
"github.com/containers/common/pkg/config"
conmonConfig "github.com/containers/conmon/runner/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/logs"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/lookup"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/logs"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/lookup"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
+ "github.com/containers/podman/v3/utils"
"github.com/containers/storage/pkg/homedir"
pmount "github.com/containers/storage/pkg/mount"
"github.com/coreos/go-systemd/v22/activation"
diff --git a/libpod/oci_conmon_unsupported.go b/libpod/oci_conmon_unsupported.go
index 2504c31f0..4de27d663 100644
--- a/libpod/oci_conmon_unsupported.go
+++ b/libpod/oci_conmon_unsupported.go
@@ -5,7 +5,7 @@ package libpod
import (
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
)
const (
diff --git a/libpod/oci_missing.go b/libpod/oci_missing.go
index 9d12972d4..0fd14ce52 100644
--- a/libpod/oci_missing.go
+++ b/libpod/oci_missing.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"sync"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"k8s.io/client-go/tools/remotecommand"
diff --git a/libpod/oci_util.go b/libpod/oci_util.go
index 4ec050d6d..1cafd5863 100644
--- a/libpod/oci_util.go
+++ b/libpod/oci_util.go
@@ -8,7 +8,7 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/options.go b/libpod/options.go
index 8831f527e..627ea8c57 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -11,11 +11,11 @@ import (
"github.com/containers/common/pkg/secrets"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/namespaces"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/namespaces"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
"github.com/cri-o/ocicni/pkg/ocicni"
diff --git a/libpod/plugin/volume_api.go b/libpod/plugin/volume_api.go
index 79aebed43..fafd26dac 100644
--- a/libpod/plugin/volume_api.go
+++ b/libpod/plugin/volume_api.go
@@ -12,7 +12,7 @@ import (
"sync"
"time"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/docker/go-plugins-helpers/sdk"
"github.com/docker/go-plugins-helpers/volume"
jsoniter "github.com/json-iterator/go"
diff --git a/libpod/pod.go b/libpod/pod.go
index 784c2cf5e..dce2a0c1c 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -4,8 +4,8 @@ import (
"net"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/lock"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/lock"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
)
diff --git a/libpod/pod_api.go b/libpod/pod_api.go
index 845948dd3..14fe8276c 100644
--- a/libpod/pod_api.go
+++ b/libpod/pod_api.go
@@ -3,11 +3,11 @@ package libpod
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/parallel"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/parallel"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/pod_internal.go b/libpod/pod_internal.go
index b039ce83f..31b4ba443 100644
--- a/libpod/pod_internal.go
+++ b/libpod/pod_internal.go
@@ -6,7 +6,7 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/containers/storage/pkg/stringid"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/pod_status.go b/libpod/pod_status.go
index 668d45ec7..8552f5681 100644
--- a/libpod/pod_status.go
+++ b/libpod/pod_status.go
@@ -1,6 +1,6 @@
package libpod
-import "github.com/containers/podman/v2/libpod/define"
+import "github.com/containers/podman/v3/libpod/define"
// GetPodStatus determines the status of the pod based on the
// statuses of the containers in the pod.
diff --git a/libpod/pod_top_linux.go b/libpod/pod_top_linux.go
index 07e1a0d80..aee62d832 100644
--- a/libpod/pod_top_linux.go
+++ b/libpod/pod_top_linux.go
@@ -6,8 +6,8 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/psgo"
)
diff --git a/libpod/pod_top_unsupported.go b/libpod/pod_top_unsupported.go
index fbe6f7331..59d2ff9a2 100644
--- a/libpod/pod_top_unsupported.go
+++ b/libpod/pod_top_unsupported.go
@@ -2,7 +2,7 @@
package libpod
-import "github.com/containers/podman/v2/libpod/define"
+import "github.com/containers/podman/v3/libpod/define"
// GetPodPidInformation is exclusive to linux
func (p *Pod) GetPodPidInformation(descriptors []string) ([]string, error) {
diff --git a/libpod/reset.go b/libpod/reset.go
index 3346f9d3f..4199e9b76 100644
--- a/libpod/reset.go
+++ b/libpod/reset.go
@@ -6,9 +6,9 @@ import (
"os"
"path/filepath"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/rootless_cni_linux.go b/libpod/rootless_cni_linux.go
index 94ae062aa..e97985180 100644
--- a/libpod/rootless_cni_linux.go
+++ b/libpod/rootless_cni_linux.go
@@ -11,10 +11,10 @@ import (
cnitypes "github.com/containernetworking/cni/pkg/types/current"
"github.com/containernetworking/plugins/pkg/ns"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/env"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/env"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage/pkg/lockfile"
"github.com/hashicorp/go-multierror"
spec "github.com/opencontainers/runtime-spec/specs-go"
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 42af2046d..201482c65 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -1,6 +1,7 @@
package libpod
import (
+ "bufio"
"context"
"fmt"
"os"
@@ -13,19 +14,20 @@ import (
"github.com/containers/image/v5/pkg/sysregistriesv2"
is "github.com/containers/image/v5/storage"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/libpod/lock"
- "github.com/containers/podman/v2/libpod/plugin"
- "github.com/containers/podman/v2/libpod/shutdown"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/registries"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/libpod/lock"
+ "github.com/containers/podman/v3/libpod/plugin"
+ "github.com/containers/podman/v3/libpod/shutdown"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/registries"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/docker/docker/pkg/namesgenerator"
+ spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -622,9 +624,12 @@ func (r *Runtime) Shutdown(force bool) error {
func (r *Runtime) refresh(alivePath string) error {
logrus.Debugf("Podman detected system restart - performing state refresh")
- // First clear the state in the database
- if err := r.state.Refresh(); err != nil {
- return err
+ // Clear state of database if not running in container
+ if !graphRootMounted() {
+ // First clear the state in the database
+ if err := r.state.Refresh(); err != nil {
+ return err
+ }
}
// Next refresh the state of all containers to recreate dirs and
@@ -904,3 +909,29 @@ func (r *Runtime) getVolumePlugin(name string) (*plugin.VolumePlugin, error) {
func (r *Runtime) GetSecretsStorageDir() string {
return filepath.Join(r.store.GraphRoot(), "secrets")
}
+
+func graphRootMounted() bool {
+ f, err := os.OpenFile("/run/.containerenv", os.O_RDONLY, os.ModePerm)
+ if err != nil {
+ return false
+ }
+ defer f.Close()
+
+ scanner := bufio.NewScanner(f)
+ for scanner.Scan() {
+ if scanner.Text() == "graphRootMounted=1" {
+ return true
+ }
+ }
+ return false
+}
+
+func (r *Runtime) graphRootMountedFlag(mounts []spec.Mount) string {
+ root := r.store.GraphRoot()
+ for _, val := range mounts {
+ if strings.HasPrefix(root, val.Source) {
+ return "graphRootMounted=1"
+ }
+ }
+ return ""
+}
diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go
index 6ee8a9354..cd2f226af 100644
--- a/libpod/runtime_cstorage.go
+++ b/libpod/runtime_cstorage.go
@@ -3,7 +3,7 @@ package libpod
import (
"time"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 1b3532f1f..af87ccca1 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -10,12 +10,12 @@ import (
"github.com/containers/buildah"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/libpod/shutdown"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/libpod/shutdown"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/storage"
"github.com/containers/storage/pkg/stringid"
"github.com/docker/go-units"
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go
index f56fa8cce..6e1105b9e 100644
--- a/libpod/runtime_img.go
+++ b/libpod/runtime_img.go
@@ -15,10 +15,10 @@ import (
ociarchive "github.com/containers/image/v5/oci/archive"
"github.com/containers/image/v5/oci/layout"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -166,6 +166,11 @@ func (r *Runtime) newImageBuildCompleteEvent(idOrName string) {
// Build adds the runtime to the imagebuildah call
func (r *Runtime) Build(ctx context.Context, options imagebuildah.BuildOptions, dockerfiles ...string) (string, reference.Canonical, error) {
+ if options.Runtime == "" {
+ // Make sure that build containers use the same runtime as Podman (see #9365).
+ conf := util.DefaultContainerConfig()
+ options.Runtime = conf.Engine.OCIRuntime
+ }
id, ref, err := imagebuildah.BuildDockerfiles(ctx, r.store, options, dockerfiles...)
// Write event for build completion
r.newImageBuildCompleteEvent(id)
diff --git a/libpod/runtime_img_test.go b/libpod/runtime_img_test.go
index 40d5860cf..7d6390c85 100644
--- a/libpod/runtime_img_test.go
+++ b/libpod/runtime_img_test.go
@@ -6,7 +6,7 @@ import (
"reflect"
"testing"
- sysreg "github.com/containers/podman/v2/pkg/registries"
+ sysreg "github.com/containers/podman/v3/pkg/registries"
"github.com/stretchr/testify/assert"
)
diff --git a/libpod/runtime_migrate.go b/libpod/runtime_migrate.go
index f0f800ef0..3e63bc19e 100644
--- a/libpod/runtime_migrate.go
+++ b/libpod/runtime_migrate.go
@@ -11,9 +11,9 @@ import (
"strconv"
"syscall"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go
index 6f9135764..b142472e8 100644
--- a/libpod/runtime_pod.go
+++ b/libpod/runtime_pod.go
@@ -4,8 +4,8 @@ import (
"context"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/libpod/runtime_pod_infra_linux.go b/libpod/runtime_pod_infra_linux.go
index bc37bdb23..000029fa4 100644
--- a/libpod/runtime_pod_infra_linux.go
+++ b/libpod/runtime_pod_infra_linux.go
@@ -6,10 +6,10 @@ import (
"context"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
@@ -225,7 +225,10 @@ func (r *Runtime) createInfraContainer(ctx context.Context, p *Pod) (*Container,
if err != nil {
return nil, err
}
- imageName := newImage.Names()[0]
+ imageName := "none"
+ if len(newImage.Names()) > 0 {
+ imageName = newImage.Names()[0]
+ }
imageID := data.ID
return r.makeInfraContainer(ctx, p, imageName, r.config.Engine.InfraImage, imageID, data.Config)
diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go
index 1eb42660c..cf48a9453 100644
--- a/libpod/runtime_pod_linux.go
+++ b/libpod/runtime_pod_linux.go
@@ -10,10 +10,10 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/rootless"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/runtime_pod_unsupported.go b/libpod/runtime_pod_unsupported.go
index 6976d37c6..6dbcc9214 100644
--- a/libpod/runtime_pod_unsupported.go
+++ b/libpod/runtime_pod_unsupported.go
@@ -5,7 +5,7 @@ package libpod
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
)
// NewPod makes a new, empty pod
diff --git a/libpod/runtime_renumber.go b/libpod/runtime_renumber.go
index 4c121be12..b19cc921f 100644
--- a/libpod/runtime_renumber.go
+++ b/libpod/runtime_renumber.go
@@ -1,7 +1,7 @@
package libpod
import (
- "github.com/containers/podman/v2/libpod/events"
+ "github.com/containers/podman/v3/libpod/events"
"github.com/pkg/errors"
)
diff --git a/libpod/runtime_volume.go b/libpod/runtime_volume.go
index 9d985f905..5f8f9ca1e 100644
--- a/libpod/runtime_volume.go
+++ b/libpod/runtime_volume.go
@@ -3,9 +3,9 @@ package libpod
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
"github.com/pkg/errors"
)
diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go
index 4a29f01aa..3d5bc8bb2 100644
--- a/libpod/runtime_volume_linux.go
+++ b/libpod/runtime_volume_linux.go
@@ -9,9 +9,9 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- volplugin "github.com/containers/podman/v2/libpod/plugin"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ volplugin "github.com/containers/podman/v3/libpod/plugin"
"github.com/containers/storage/pkg/stringid"
pluginapi "github.com/docker/go-plugins-helpers/volume"
"github.com/pkg/errors"
diff --git a/libpod/runtime_volume_unsupported.go b/libpod/runtime_volume_unsupported.go
index 3cdb73aed..da7ee3552 100644
--- a/libpod/runtime_volume_unsupported.go
+++ b/libpod/runtime_volume_unsupported.go
@@ -5,7 +5,7 @@ package libpod
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
)
func (r *Runtime) removeVolume(ctx context.Context, v *Volume, force bool) error {
diff --git a/libpod/state_test.go b/libpod/state_test.go
index 0709071ec..559c84d1e 100644
--- a/libpod/state_test.go
+++ b/libpod/state_test.go
@@ -9,8 +9,8 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/lock"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/lock"
"github.com/containers/storage"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
diff --git a/libpod/stats.go b/libpod/stats.go
index 09d990017..f4732b4fc 100644
--- a/libpod/stats.go
+++ b/libpod/stats.go
@@ -7,8 +7,8 @@ import (
"syscall"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/cgroups"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/cgroups"
"github.com/pkg/errors"
)
diff --git a/libpod/stats_unsupported.go b/libpod/stats_unsupported.go
index 749a8bf49..44a1c8d03 100644
--- a/libpod/stats_unsupported.go
+++ b/libpod/stats_unsupported.go
@@ -2,7 +2,7 @@
package libpod
-import "github.com/containers/podman/v2/libpod/define"
+import "github.com/containers/podman/v3/libpod/define"
// GetContainerStats gets the running stats for a given container
func (c *Container) GetContainerStats(previousStats *define.ContainerStats) (*define.ContainerStats, error) {
diff --git a/libpod/storage.go b/libpod/storage.go
index d7862b322..418eb3151 100644
--- a/libpod/storage.go
+++ b/libpod/storage.go
@@ -6,7 +6,7 @@ import (
istorage "github.com/containers/image/v5/storage"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
diff --git a/libpod/util.go b/libpod/util.go
index 391208fb9..b75c9179a 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -14,8 +14,8 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/utils"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/fsnotify/fsnotify"
spec "github.com/opencontainers/runtime-spec/specs-go"
diff --git a/libpod/util_linux.go b/libpod/util_linux.go
index 5184ed393..32b058d27 100644
--- a/libpod/util_linux.go
+++ b/libpod/util_linux.go
@@ -7,9 +7,9 @@ import (
"strings"
"syscall"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/util_test.go b/libpod/util_test.go
index 5b1702592..160dca408 100644
--- a/libpod/util_test.go
+++ b/libpod/util_test.go
@@ -3,7 +3,7 @@ package libpod
import (
"testing"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/utils"
"github.com/stretchr/testify/assert"
)
diff --git a/libpod/util_unsupported.go b/libpod/util_unsupported.go
index 4c7a90940..b718d36aa 100644
--- a/libpod/util_unsupported.go
+++ b/libpod/util_unsupported.go
@@ -3,7 +3,7 @@
package libpod
import (
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
)
diff --git a/libpod/volume.go b/libpod/volume.go
index 5cc5e7e40..506c45b5a 100644
--- a/libpod/volume.go
+++ b/libpod/volume.go
@@ -5,9 +5,9 @@ import (
"path/filepath"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/lock"
- "github.com/containers/podman/v2/libpod/plugin"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/lock"
+ "github.com/containers/podman/v3/libpod/plugin"
)
// Volume is a libpod named volume.
diff --git a/libpod/volume_inspect.go b/libpod/volume_inspect.go
index 2448d1bb5..c3f51222d 100644
--- a/libpod/volume_inspect.go
+++ b/libpod/volume_inspect.go
@@ -1,7 +1,7 @@
package libpod
import (
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
pluginapi "github.com/docker/go-plugins-helpers/volume"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/volume_internal.go b/libpod/volume_internal.go
index 88d940370..c1dbe00fd 100644
--- a/libpod/volume_internal.go
+++ b/libpod/volume_internal.go
@@ -4,7 +4,7 @@ import (
"os"
"path/filepath"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
)
diff --git a/libpod/volume_internal_linux.go b/libpod/volume_internal_linux.go
index 82c01be44..67ac41874 100644
--- a/libpod/volume_internal_linux.go
+++ b/libpod/volume_internal_linux.go
@@ -6,8 +6,8 @@ import (
"os/exec"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/rootless"
pluginapi "github.com/docker/go-plugins-helpers/volume"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/volume_internal_unsupported.go b/libpod/volume_internal_unsupported.go
index ddbdbd8b6..77452cf22 100644
--- a/libpod/volume_internal_unsupported.go
+++ b/libpod/volume_internal_unsupported.go
@@ -3,7 +3,7 @@
package libpod
import (
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
)
func (v *Volume) mount() error {
diff --git a/pkg/api/handlers/compat/changes.go b/pkg/api/handlers/compat/changes.go
index a5851ecfc..c442abbf9 100644
--- a/pkg/api/handlers/compat/changes.go
+++ b/pkg/api/handlers/compat/changes.go
@@ -3,8 +3,8 @@ package compat
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
)
func Changes(w http.ResponseWriter, r *http.Request) {
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go
index 9c0893a80..971b6aa50 100644
--- a/pkg/api/handlers/compat/containers.go
+++ b/pkg/api/handlers/compat/containers.go
@@ -10,15 +10,15 @@ import (
"syscall"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/filters"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
- "github.com/containers/podman/v2/pkg/ps"
- "github.com/containers/podman/v2/pkg/signal"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/filters"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/pkg/ps"
+ "github.com/containers/podman/v3/pkg/signal"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/go-connections/nat"
diff --git a/pkg/api/handlers/compat/containers_archive.go b/pkg/api/handlers/compat/containers_archive.go
index 55bd62f90..e119dc7cb 100644
--- a/pkg/api/handlers/compat/containers_archive.go
+++ b/pkg/api/handlers/compat/containers_archive.go
@@ -5,11 +5,11 @@ import (
"net/http"
"os"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/copy"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/copy"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/api/handlers/compat/containers_attach.go b/pkg/api/handlers/compat/containers_attach.go
index a4013469b..c230efbe0 100644
--- a/pkg/api/handlers/compat/containers_attach.go
+++ b/pkg/api/handlers/compat/containers_attach.go
@@ -3,10 +3,10 @@ package compat
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/api/server/idle"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/api/server/idle"
"github.com/gorilla/schema"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go
index 6e85872b2..93934f1de 100644
--- a/pkg/api/handlers/compat/containers_create.go
+++ b/pkg/api/handlers/compat/containers_create.go
@@ -4,14 +4,14 @@ import (
"encoding/json"
"net/http"
- "github.com/containers/podman/v2/cmd/podman/common"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/cmd/podman/common"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
@@ -47,6 +47,7 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
rtc, err := runtime.GetConfig()
if err != nil {
utils.Error(w, "unable to obtain runtime config", http.StatusInternalServerError, errors.Wrap(err, "unable to get runtime config"))
+ return
}
newImage, err := runtime.ImageRuntime().NewFromLocal(body.Config.Image)
diff --git a/pkg/api/handlers/compat/containers_export.go b/pkg/api/handlers/compat/containers_export.go
index 500daa9cd..252d2d8b5 100644
--- a/pkg/api/handlers/compat/containers_export.go
+++ b/pkg/api/handlers/compat/containers_export.go
@@ -5,8 +5,8 @@ import (
"net/http"
"os"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/containers_logs.go b/pkg/api/handlers/compat/containers_logs.go
index 38a6329b9..cb4dee4d2 100644
--- a/pkg/api/handlers/compat/containers_logs.go
+++ b/pkg/api/handlers/compat/containers_logs.go
@@ -10,10 +10,10 @@ import (
"sync"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/logs"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/logs"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/gorilla/schema"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
diff --git a/pkg/api/handlers/compat/containers_pause.go b/pkg/api/handlers/compat/containers_pause.go
index a7e0a66f1..d00b19acc 100644
--- a/pkg/api/handlers/compat/containers_pause.go
+++ b/pkg/api/handlers/compat/containers_pause.go
@@ -3,8 +3,8 @@ package compat
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
)
func PauseContainer(w http.ResponseWriter, r *http.Request) {
diff --git a/pkg/api/handlers/compat/containers_prune.go b/pkg/api/handlers/compat/containers_prune.go
index 7bba38475..dc4d53af6 100644
--- a/pkg/api/handlers/compat/containers_prune.go
+++ b/pkg/api/handlers/compat/containers_prune.go
@@ -4,11 +4,11 @@ import (
"bytes"
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/domain/filters"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/domain/filters"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/containers_restart.go b/pkg/api/handlers/compat/containers_restart.go
index 70edfcbb3..46a6297fa 100644
--- a/pkg/api/handlers/compat/containers_restart.go
+++ b/pkg/api/handlers/compat/containers_restart.go
@@ -3,11 +3,11 @@ package compat
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/containers_start.go b/pkg/api/handlers/compat/containers_start.go
index 726da6f99..391aa752d 100644
--- a/pkg/api/handlers/compat/containers_start.go
+++ b/pkg/api/handlers/compat/containers_start.go
@@ -5,9 +5,9 @@ import (
"github.com/sirupsen/logrus"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/gorilla/schema"
)
diff --git a/pkg/api/handlers/compat/containers_stats.go b/pkg/api/handlers/compat/containers_stats.go
index 2a76ef962..694b57bb1 100644
--- a/pkg/api/handlers/compat/containers_stats.go
+++ b/pkg/api/handlers/compat/containers_stats.go
@@ -5,10 +5,10 @@ import (
"net/http"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/cgroups"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/cgroups"
docker "github.com/docker/docker/api/types"
"github.com/gorilla/schema"
"github.com/pkg/errors"
diff --git a/pkg/api/handlers/compat/containers_stop.go b/pkg/api/handlers/compat/containers_stop.go
index 000685aa0..0526865b9 100644
--- a/pkg/api/handlers/compat/containers_stop.go
+++ b/pkg/api/handlers/compat/containers_stop.go
@@ -3,11 +3,11 @@ package compat
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/containers_top.go b/pkg/api/handlers/compat/containers_top.go
index eadc06101..ab9f613af 100644
--- a/pkg/api/handlers/compat/containers_top.go
+++ b/pkg/api/handlers/compat/containers_top.go
@@ -4,9 +4,9 @@ import (
"net/http"
"strings"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/containers_unpause.go b/pkg/api/handlers/compat/containers_unpause.go
index 760e85814..a37c4ba2a 100644
--- a/pkg/api/handlers/compat/containers_unpause.go
+++ b/pkg/api/handlers/compat/containers_unpause.go
@@ -3,8 +3,8 @@ package compat
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
)
func UnpauseContainer(w http.ResponseWriter, r *http.Request) {
diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go
index 7dad5f566..9e82831d7 100644
--- a/pkg/api/handlers/compat/events.go
+++ b/pkg/api/handlers/compat/events.go
@@ -5,10 +5,10 @@ import (
"fmt"
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/gorilla/schema"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
diff --git a/pkg/api/handlers/compat/exec.go b/pkg/api/handlers/compat/exec.go
index cc5db8efe..1b7b884e0 100644
--- a/pkg/api/handlers/compat/exec.go
+++ b/pkg/api/handlers/compat/exec.go
@@ -6,12 +6,12 @@ import (
"net/http"
"strings"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/api/server/idle"
- "github.com/containers/podman/v2/pkg/specgen/generate"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/api/server/idle"
+ "github.com/containers/podman/v3/pkg/specgen/generate"
"github.com/gorilla/mux"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go
index 85708912b..1a4dd939e 100644
--- a/pkg/api/handlers/compat/images.go
+++ b/pkg/api/handlers/compat/images.go
@@ -10,14 +10,14 @@ import (
"strings"
"github.com/containers/buildah"
- "github.com/containers/common/pkg/config"
"github.com/containers/image/v5/manifest"
- "github.com/containers/podman/v2/libpod"
- image2 "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod"
+ image2 "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/gorilla/schema"
"github.com/opencontainers/go-digest"
"github.com/pkg/errors"
@@ -236,16 +236,6 @@ func CreateImageFromImage(w http.ResponseWriter, r *http.Request) {
if sys := runtime.SystemContext(); sys != nil {
registryOpts.DockerCertPath = sys.DockerCertPath
}
- rtc, err := runtime.GetConfig()
- if err != nil {
- utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Decode()"))
- return
- }
- pullPolicy, err := config.ValidatePullPolicy(rtc.Engine.PullPolicy)
- if err != nil {
- utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Decode()"))
- return
- }
img, err := runtime.ImageRuntime().New(r.Context(),
fromImage,
"", // signature policy
@@ -254,7 +244,7 @@ func CreateImageFromImage(w http.ResponseWriter, r *http.Request) {
&registryOpts,
image2.SigningOptions{},
nil, // label
- pullPolicy,
+ util.PullImageAlways,
)
if err != nil {
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, err)
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index 9b26f1147..d79b100e8 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -16,10 +16,10 @@ import (
"github.com/containers/buildah/imagebuildah"
"github.com/containers/buildah/util"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/channel"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/channel"
"github.com/containers/storage/pkg/archive"
"github.com/gorilla/schema"
specs "github.com/opencontainers/runtime-spec/specs-go"
diff --git a/pkg/api/handlers/compat/images_history.go b/pkg/api/handlers/compat/images_history.go
index 174bc6234..a02ed179c 100644
--- a/pkg/api/handlers/compat/images_history.go
+++ b/pkg/api/handlers/compat/images_history.go
@@ -3,9 +3,9 @@ package compat
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/images_prune.go b/pkg/api/handlers/compat/images_prune.go
index c7e84804b..63daaa780 100644
--- a/pkg/api/handlers/compat/images_prune.go
+++ b/pkg/api/handlers/compat/images_prune.go
@@ -5,9 +5,9 @@ import (
"fmt"
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/docker/docker/api/types"
"github.com/gorilla/schema"
"github.com/pkg/errors"
diff --git a/pkg/api/handlers/compat/images_push.go b/pkg/api/handlers/compat/images_push.go
index 77d891546..4f613338f 100644
--- a/pkg/api/handlers/compat/images_push.go
+++ b/pkg/api/handlers/compat/images_push.go
@@ -7,11 +7,11 @@ import (
"strings"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/containers/storage"
"github.com/gorilla/schema"
"github.com/pkg/errors"
diff --git a/pkg/api/handlers/compat/images_remove.go b/pkg/api/handlers/compat/images_remove.go
index dd2d96bbb..874c57f16 100644
--- a/pkg/api/handlers/compat/images_remove.go
+++ b/pkg/api/handlers/compat/images_remove.go
@@ -3,8 +3,8 @@ package compat
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/images_search.go b/pkg/api/handlers/compat/images_search.go
index 885112b31..18974f424 100644
--- a/pkg/api/handlers/compat/images_search.go
+++ b/pkg/api/handlers/compat/images_search.go
@@ -5,12 +5,12 @@ import (
"net/http"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/images_tag.go b/pkg/api/handlers/compat/images_tag.go
index b49d9054b..0d0c204f3 100644
--- a/pkg/api/handlers/compat/images_tag.go
+++ b/pkg/api/handlers/compat/images_tag.go
@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/info.go b/pkg/api/handlers/compat/info.go
index 5adbeb031..d7cefd516 100644
--- a/pkg/api/handlers/compat/info.go
+++ b/pkg/api/handlers/compat/info.go
@@ -11,11 +11,11 @@ import (
"github.com/containers/common/pkg/config"
"github.com/containers/common/pkg/sysinfo"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
docker "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/registry"
"github.com/docker/docker/api/types/swarm"
diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go
index 71b9d180d..36a5311f0 100644
--- a/pkg/api/handlers/compat/networks.go
+++ b/pkg/api/handlers/compat/networks.go
@@ -10,12 +10,12 @@ import (
"time"
"github.com/containernetworking/cni/libcni"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/network"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/network"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/docker/docker/api/types"
dockerNetwork "github.com/docker/docker/api/types/network"
"github.com/gorilla/schema"
diff --git a/pkg/api/handlers/compat/resize.go b/pkg/api/handlers/compat/resize.go
index a769ae1b5..b3c8b7ce4 100644
--- a/pkg/api/handlers/compat/resize.go
+++ b/pkg/api/handlers/compat/resize.go
@@ -5,9 +5,9 @@ import (
"net/http"
"strings"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/gorilla/mux"
"github.com/gorilla/schema"
"github.com/pkg/errors"
diff --git a/pkg/api/handlers/compat/secrets.go b/pkg/api/handlers/compat/secrets.go
index 571888eba..c5ee8c324 100644
--- a/pkg/api/handlers/compat/secrets.go
+++ b/pkg/api/handlers/compat/secrets.go
@@ -7,10 +7,10 @@ import (
"fmt"
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
@@ -30,7 +30,9 @@ func ListSecrets(w http.ResponseWriter, r *http.Request) {
return
}
if len(query.Filters) > 0 {
- utils.Error(w, "filters not supported", http.StatusBadRequest, errors.New("bad parameter"))
+ utils.Error(w, "filters not supported", http.StatusBadRequest,
+ errors.Wrapf(errors.New("bad parameter"), "filters not supported"))
+ return
}
ic := abi.ContainerEngine{Libpod: runtime}
reports, err := ic.SecretList(r.Context())
@@ -95,7 +97,9 @@ func CreateSecret(w http.ResponseWriter, r *http.Request) {
return
}
if len(createParams.Labels) > 0 {
- utils.Error(w, "labels not supported", http.StatusBadRequest, errors.New("bad parameter"))
+ utils.Error(w, "labels not supported", http.StatusBadRequest,
+ errors.Wrapf(errors.New("bad parameter"), "labels not supported"))
+ return
}
decoded, _ := base64.StdEncoding.DecodeString(createParams.Data)
diff --git a/pkg/api/handlers/compat/swagger.go b/pkg/api/handlers/compat/swagger.go
index 1d1f1ecf2..a0783e723 100644
--- a/pkg/api/handlers/compat/swagger.go
+++ b/pkg/api/handlers/compat/swagger.go
@@ -1,7 +1,7 @@
package compat
import (
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/storage/pkg/archive"
"github.com/docker/docker/api/types"
)
diff --git a/pkg/api/handlers/compat/system.go b/pkg/api/handlers/compat/system.go
index e21ae160a..57702698b 100644
--- a/pkg/api/handlers/compat/system.go
+++ b/pkg/api/handlers/compat/system.go
@@ -4,11 +4,11 @@ import (
"net/http"
"strings"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
docker "github.com/docker/docker/api/types"
)
@@ -19,6 +19,7 @@ func GetDiskUsage(w http.ResponseWriter, r *http.Request) {
df, err := ic.SystemDf(r.Context(), options)
if err != nil {
utils.InternalServerError(w, err)
+ return
}
imgs := make([]*docker.ImageSummary, len(df.Images))
diff --git a/pkg/api/handlers/compat/unsupported.go b/pkg/api/handlers/compat/unsupported.go
index 1c518690f..508d0ee18 100644
--- a/pkg/api/handlers/compat/unsupported.go
+++ b/pkg/api/handlers/compat/unsupported.go
@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/errorhandling"
log "github.com/sirupsen/logrus"
)
diff --git a/pkg/api/handlers/compat/version.go b/pkg/api/handlers/compat/version.go
index d5070dbbc..d90a892c1 100644
--- a/pkg/api/handlers/compat/version.go
+++ b/pkg/api/handlers/compat/version.go
@@ -6,10 +6,10 @@ import (
goRuntime "runtime"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
docker "github.com/docker/docker/api/types"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/compat/volumes.go b/pkg/api/handlers/compat/volumes.go
index 82e70eb90..28fb67102 100644
--- a/pkg/api/handlers/compat/volumes.go
+++ b/pkg/api/handlers/compat/volumes.go
@@ -7,12 +7,12 @@ import (
"net/url"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/filters"
- "github.com/containers/podman/v2/pkg/domain/infra/abi/parse"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/filters"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi/parse"
docker_api_types "github.com/docker/docker/api/types"
docker_api_types_volume "github.com/docker/docker/api/types/volume"
"github.com/gorilla/schema"
diff --git a/pkg/api/handlers/decoder.go b/pkg/api/handlers/decoder.go
index 54087168a..764456dd4 100644
--- a/pkg/api/handlers/decoder.go
+++ b/pkg/api/handlers/decoder.go
@@ -6,7 +6,8 @@ import (
"syscall"
"time"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/gorilla/schema"
"github.com/sirupsen/logrus"
)
@@ -19,6 +20,7 @@ func NewAPIDecoder() *schema.Decoder {
d.IgnoreUnknownKeys(true)
d.RegisterConverter(map[string][]string{}, convertURLValuesString)
d.RegisterConverter(time.Time{}, convertTimeString)
+ d.RegisterConverter(define.ContainerStatus(0), convertContainerStatusString)
var Signal syscall.Signal
d.RegisterConverter(Signal, convertSignal)
@@ -46,6 +48,19 @@ func convertURLValuesString(query string) reflect.Value {
return reflect.ValueOf(f)
}
+func convertContainerStatusString(query string) reflect.Value {
+ result, err := define.StringToContainerStatus(query)
+ if err != nil {
+ logrus.Infof("convertContainerStatusString: Failed to parse %s: %s", query, err.Error())
+
+ // We return nil here instead of result because reflect.ValueOf().IsValid() will be true
+ // in github.com/gorilla/schema's decoder, which means there's no parsing error
+ return reflect.ValueOf(nil)
+ }
+
+ return reflect.ValueOf(result)
+}
+
// isZero() can be used to determine if parsing failed.
func convertTimeString(query string) reflect.Value {
var (
diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go
index 4e79e4a42..01b9ec101 100644
--- a/pkg/api/handlers/libpod/containers.go
+++ b/pkg/api/handlers/libpod/containers.go
@@ -5,12 +5,12 @@ import (
"net/http"
"os"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/api/handlers/libpod/containers_create.go b/pkg/api/handlers/libpod/containers_create.go
index d8bb535ff..b92588346 100644
--- a/pkg/api/handlers/libpod/containers_create.go
+++ b/pkg/api/handlers/libpod/containers_create.go
@@ -5,11 +5,11 @@ import (
"encoding/json"
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/specgen/generate"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/specgen/generate"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/libpod/containers_stats.go b/pkg/api/handlers/libpod/containers_stats.go
index ff475803d..75c404d4f 100644
--- a/pkg/api/handlers/libpod/containers_stats.go
+++ b/pkg/api/handlers/libpod/containers_stats.go
@@ -5,10 +5,10 @@ import (
"net/http"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/api/handlers/libpod/copy.go b/pkg/api/handlers/libpod/copy.go
index b7c508342..4b345bacc 100644
--- a/pkg/api/handlers/libpod/copy.go
+++ b/pkg/api/handlers/libpod/copy.go
@@ -3,7 +3,7 @@ package libpod
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/libpod/generate.go b/pkg/api/handlers/libpod/generate.go
index b3b8c1f16..2e139a0a9 100644
--- a/pkg/api/handlers/libpod/generate.go
+++ b/pkg/api/handlers/libpod/generate.go
@@ -3,11 +3,11 @@ package libpod
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/libpod/healthcheck.go b/pkg/api/handlers/libpod/healthcheck.go
index 4649b1a71..27478ddec 100644
--- a/pkg/api/handlers/libpod/healthcheck.go
+++ b/pkg/api/handlers/libpod/healthcheck.go
@@ -3,9 +3,9 @@ package libpod
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
)
func RunHealthCheck(w http.ResponseWriter, r *http.Request) {
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go
index 0d4160a6e..1a2483784 100644
--- a/pkg/api/handlers/libpod/images.go
+++ b/pkg/api/handlers/libpod/images.go
@@ -13,16 +13,16 @@ import (
"github.com/containers/buildah"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
- "github.com/containers/podman/v2/pkg/errorhandling"
- utils2 "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ utils2 "github.com/containers/podman/v3/utils"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/libpod/images_pull.go b/pkg/api/handlers/libpod/images_pull.go
index efb15b14d..c8b777be4 100644
--- a/pkg/api/handlers/libpod/images_pull.go
+++ b/pkg/api/handlers/libpod/images_pull.go
@@ -10,13 +10,13 @@ import (
"github.com/containers/image/v5/docker"
"github.com/containers/image/v5/docker/reference"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/channel"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/channel"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/gorilla/schema"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/api/handlers/libpod/info.go b/pkg/api/handlers/libpod/info.go
index 683ae3dad..546609451 100644
--- a/pkg/api/handlers/libpod/info.go
+++ b/pkg/api/handlers/libpod/info.go
@@ -3,8 +3,8 @@ package libpod
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
)
func GetInfo(w http.ResponseWriter, r *http.Request) {
diff --git a/pkg/api/handlers/libpod/manifests.go b/pkg/api/handlers/libpod/manifests.go
index ded51a31f..5ababc36b 100644
--- a/pkg/api/handlers/libpod/manifests.go
+++ b/pkg/api/handlers/libpod/manifests.go
@@ -7,13 +7,13 @@ import (
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/opencontainers/go-digest"
"github.com/pkg/errors"
diff --git a/pkg/api/handlers/libpod/networks.go b/pkg/api/handlers/libpod/networks.go
index 8330b6a45..a6c4f6d64 100644
--- a/pkg/api/handlers/libpod/networks.go
+++ b/pkg/api/handlers/libpod/networks.go
@@ -4,12 +4,12 @@ import (
"encoding/json"
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/network"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/network"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/libpod/play.go b/pkg/api/handlers/libpod/play.go
index 42ff26a57..ee2d3c00d 100644
--- a/pkg/api/handlers/libpod/play.go
+++ b/pkg/api/handlers/libpod/play.go
@@ -7,11 +7,11 @@ import (
"os"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go
index 2c35dd191..89a4a451f 100644
--- a/pkg/api/handlers/libpod/pods.go
+++ b/pkg/api/handlers/libpod/pods.go
@@ -6,15 +6,15 @@ import (
"net/http"
"strings"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/specgen/generate"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/specgen/generate"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/gorilla/schema"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/api/handlers/libpod/secrets.go b/pkg/api/handlers/libpod/secrets.go
index 447a5d021..e7f4397ea 100644
--- a/pkg/api/handlers/libpod/secrets.go
+++ b/pkg/api/handlers/libpod/secrets.go
@@ -3,10 +3,10 @@ package libpod
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/libpod/swagger.go b/pkg/api/handlers/libpod/swagger.go
index c6e95f382..1bececa1a 100644
--- a/pkg/api/handlers/libpod/swagger.go
+++ b/pkg/api/handlers/libpod/swagger.go
@@ -5,9 +5,9 @@ import (
"os"
"github.com/containers/image/v5/manifest"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/libpod/system.go b/pkg/api/handlers/libpod/system.go
index c48c186ed..02457eb8f 100644
--- a/pkg/api/handlers/libpod/system.go
+++ b/pkg/api/handlers/libpod/system.go
@@ -3,11 +3,11 @@ package libpod
import (
"net/http"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/libpod/volumes.go b/pkg/api/handlers/libpod/volumes.go
index 1a8759c6c..a602e6744 100644
--- a/pkg/api/handlers/libpod/volumes.go
+++ b/pkg/api/handlers/libpod/volumes.go
@@ -5,14 +5,14 @@ import (
"net/http"
"net/url"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/domain/filters"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
- "github.com/containers/podman/v2/pkg/domain/infra/abi/parse"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/domain/filters"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi/parse"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/swagger/swagger.go b/pkg/api/handlers/swagger/swagger.go
index 32f041dd3..384e06cac 100644
--- a/pkg/api/handlers/swagger/swagger.go
+++ b/pkg/api/handlers/swagger/swagger.go
@@ -1,11 +1,11 @@
package swagger
import (
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/inspect"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/inspect"
"github.com/docker/docker/api/types"
)
diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go
index c9adde09d..f5eaf6f6d 100644
--- a/pkg/api/handlers/types.go
+++ b/pkg/api/handlers/types.go
@@ -7,8 +7,8 @@ import (
"time"
"github.com/containers/image/v5/manifest"
- libpodImage "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ libpodImage "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/domain/entities"
docker "github.com/docker/docker/api/types"
dockerContainer "github.com/docker/docker/api/types/container"
dockerNetwork "github.com/docker/docker/api/types/network"
diff --git a/pkg/api/handlers/utils/containers.go b/pkg/api/handlers/utils/containers.go
index e79def6f3..91e02abf1 100644
--- a/pkg/api/handlers/utils/containers.go
+++ b/pkg/api/handlers/utils/containers.go
@@ -7,15 +7,15 @@ import (
"strconv"
"time"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
- "github.com/containers/podman/v2/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/handlers"
"github.com/sirupsen/logrus"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
- "github.com/containers/podman/v2/libpod"
+ "github.com/containers/podman/v3/libpod"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/handlers/utils/errors.go b/pkg/api/handlers/utils/errors.go
index c8785fb89..d22ad414f 100644
--- a/pkg/api/handlers/utils/errors.go
+++ b/pkg/api/handlers/utils/errors.go
@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
)
diff --git a/pkg/api/handlers/utils/images.go b/pkg/api/handlers/utils/images.go
index aad00c93b..743629db8 100644
--- a/pkg/api/handlers/utils/images.go
+++ b/pkg/api/handlers/utils/images.go
@@ -9,8 +9,8 @@ import (
"github.com/containers/image/v5/storage"
"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/image"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/image"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
diff --git a/pkg/api/server/handler_api.go b/pkg/api/server/handler_api.go
index 1d0ddb457..e7bf94fc6 100644
--- a/pkg/api/server/handler_api.go
+++ b/pkg/api/server/handler_api.go
@@ -6,8 +6,8 @@ import (
"net/http"
"runtime"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
- "github.com/containers/podman/v2/pkg/auth"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/auth"
"github.com/google/uuid"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/api/server/register_archive.go b/pkg/api/server/register_archive.go
index b20d89cc2..2a5cfba0b 100644
--- a/pkg/api/server/register_archive.go
+++ b/pkg/api/server/register_archive.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_auth.go b/pkg/api/server/register_auth.go
index 0eaa83737..1e5474462 100644
--- a/pkg/api/server/register_auth.go
+++ b/pkg/api/server/register_auth.go
@@ -1,7 +1,7 @@
package server
import (
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go
index ff1781d1e..31196aa9e 100644
--- a/pkg/api/server/register_containers.go
+++ b/pkg/api/server/register_containers.go
@@ -3,8 +3,8 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
@@ -1176,15 +1176,19 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// description: the name or ID of the container
// - in: query
// name: condition
- // type: string
- // description: |
- // wait until container is to a given condition. default is stopped. valid conditions are:
- // - configured
- // - created
- // - exited
- // - paused
- // - running
- // - stopped
+ // type: array
+ // items:
+ // type: string
+ // enum:
+ // - configured
+ // - created
+ // - running
+ // - stopped
+ // - paused
+ // - exited
+ // - removing
+ // - stopping
+ // description: "Conditions to wait for. If no condition provided the 'exited' condition is assumed."
// produces:
// - application/json
// responses:
diff --git a/pkg/api/server/register_distribution.go b/pkg/api/server/register_distribution.go
index 201d380d0..cbb4476f3 100644
--- a/pkg/api/server/register_distribution.go
+++ b/pkg/api/server/register_distribution.go
@@ -1,7 +1,7 @@
package server
import (
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_events.go b/pkg/api/server/register_events.go
index 4b7c645b0..acccebac1 100644
--- a/pkg/api/server/register_events.go
+++ b/pkg/api/server/register_events.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_exec.go b/pkg/api/server/register_exec.go
index 05fb2aee2..0f8c827c8 100644
--- a/pkg/api/server/register_exec.go
+++ b/pkg/api/server/register_exec.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_generate.go b/pkg/api/server/register_generate.go
index bce5484ab..ccb29fed0 100644
--- a/pkg/api/server/register_generate.go
+++ b/pkg/api/server/register_generate.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_healthcheck.go b/pkg/api/server/register_healthcheck.go
index 8c9876232..85f3d720c 100644
--- a/pkg/api/server/register_healthcheck.go
+++ b/pkg/api/server/register_healthcheck.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index 2ce0829b4..f6a8a37ca 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -3,8 +3,8 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_info.go b/pkg/api/server/register_info.go
index a1dc9511d..c07d4699d 100644
--- a/pkg/api/server/register_info.go
+++ b/pkg/api/server/register_info.go
@@ -3,8 +3,8 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_manifest.go b/pkg/api/server/register_manifest.go
index eefcc396e..6893f5e39 100644
--- a/pkg/api/server/register_manifest.go
+++ b/pkg/api/server/register_manifest.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_monitor.go b/pkg/api/server/register_monitor.go
index 5db20667e..45d24af61 100644
--- a/pkg/api/server/register_monitor.go
+++ b/pkg/api/server/register_monitor.go
@@ -1,7 +1,7 @@
package server
import (
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go
index d3345d8da..68a8d4ae4 100644
--- a/pkg/api/server/register_networks.go
+++ b/pkg/api/server/register_networks.go
@@ -3,8 +3,8 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_ping.go b/pkg/api/server/register_ping.go
index 0343d2608..1d0876ec1 100644
--- a/pkg/api/server/register_ping.go
+++ b/pkg/api/server/register_ping.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_play.go b/pkg/api/server/register_play.go
index 6aa349a3b..dbb13cba3 100644
--- a/pkg/api/server/register_play.go
+++ b/pkg/api/server/register_play.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_plugins.go b/pkg/api/server/register_plugins.go
index 6600c1bbd..6fe217bfd 100644
--- a/pkg/api/server/register_plugins.go
+++ b/pkg/api/server/register_plugins.go
@@ -1,7 +1,7 @@
package server
import (
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go
index 4873eb926..e211b0941 100644
--- a/pkg/api/server/register_pods.go
+++ b/pkg/api/server/register_pods.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_secrets.go b/pkg/api/server/register_secrets.go
index 95abf83e8..1c5f5954b 100644
--- a/pkg/api/server/register_secrets.go
+++ b/pkg/api/server/register_secrets.go
@@ -3,8 +3,8 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_swagger.go b/pkg/api/server/register_swagger.go
index 4237540f8..dca1df14b 100644
--- a/pkg/api/server/register_swagger.go
+++ b/pkg/api/server/register_swagger.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_swarm.go b/pkg/api/server/register_swarm.go
index 1f3166dcb..fce35ba32 100644
--- a/pkg/api/server/register_swarm.go
+++ b/pkg/api/server/register_swarm.go
@@ -4,7 +4,7 @@ import (
"errors"
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/gorilla/mux"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/api/server/register_system.go b/pkg/api/server/register_system.go
index 524cdecd9..7bc16acc0 100644
--- a/pkg/api/server/register_system.go
+++ b/pkg/api/server/register_system.go
@@ -3,8 +3,8 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_version.go b/pkg/api/server/register_version.go
index cf49c0fa9..0cedb5dc6 100644
--- a/pkg/api/server/register_version.go
+++ b/pkg/api/server/register_version.go
@@ -3,7 +3,7 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/register_volumes.go b/pkg/api/server/register_volumes.go
index 68727f2e1..b19faefdd 100644
--- a/pkg/api/server/register_volumes.go
+++ b/pkg/api/server/register_volumes.go
@@ -3,8 +3,8 @@ package server
import (
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers/compat"
- "github.com/containers/podman/v2/pkg/api/handlers/libpod"
+ "github.com/containers/podman/v3/pkg/api/handlers/compat"
+ "github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go
index 6926eda62..e23448fd1 100644
--- a/pkg/api/server/server.go
+++ b/pkg/api/server/server.go
@@ -13,10 +13,10 @@ import (
"syscall"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/shutdown"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/api/server/idle"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/shutdown"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/api/server/idle"
"github.com/coreos/go-systemd/v22/activation"
"github.com/coreos/go-systemd/v22/daemon"
"github.com/gorilla/mux"
diff --git a/pkg/api/server/swagger.go b/pkg/api/server/swagger.go
index d4fc33442..92efb8ef3 100644
--- a/pkg/api/server/swagger.go
+++ b/pkg/api/server/swagger.go
@@ -1,11 +1,11 @@
package server
import (
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/errorhandling"
)
// No such image
diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go
index 77851f534..0cf51e5a6 100644
--- a/pkg/autoupdate/autoupdate.go
+++ b/pkg/autoupdate/autoupdate.go
@@ -9,12 +9,12 @@ import (
"github.com/containers/image/v5/docker/reference"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/transports/alltransports"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/systemd"
- systemdGen "github.com/containers/podman/v2/pkg/systemd/generate"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/systemd"
+ systemdGen "github.com/containers/podman/v3/pkg/systemd/generate"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/bindings/README.md b/pkg/bindings/README.md
index 149deda5e..6fd7d7831 100644
--- a/pkg/bindings/README.md
+++ b/pkg/bindings/README.md
@@ -39,7 +39,7 @@ import (
"fmt"
"os"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings"
)
func main() {
@@ -66,8 +66,8 @@ import (
"fmt"
"os"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
)
func main() {
@@ -94,8 +94,8 @@ import (
"fmt"
"os"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/images"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/images"
)
func main() {
@@ -122,10 +122,10 @@ import (
"fmt"
"os"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/bindings/images"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/bindings/images"
+ "github.com/containers/podman/v3/pkg/specgen"
)
func main() {
diff --git a/pkg/bindings/connection.go b/pkg/bindings/connection.go
index 7b26037eb..ad16498d5 100644
--- a/pkg/bindings/connection.go
+++ b/pkg/bindings/connection.go
@@ -13,7 +13,7 @@ import (
"time"
"github.com/blang/semver"
- "github.com/containers/podman/v2/pkg/terminal"
+ "github.com/containers/podman/v3/pkg/terminal"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -124,7 +124,7 @@ func NewConnectionWithIdentity(ctx context.Context, uri string, identity string)
ctx = context.WithValue(ctx, clientKey, &connection)
if err := pingNewConnection(ctx); err != nil {
- return nil, err
+ return nil, errors.Wrap(err, "cannot connect to the Podman socket, please verify that Podman REST API service is running")
}
return ctx, nil
}
diff --git a/pkg/bindings/containers/archive.go b/pkg/bindings/containers/archive.go
index 18871cfd1..0178f63c3 100644
--- a/pkg/bindings/containers/archive.go
+++ b/pkg/bindings/containers/archive.go
@@ -6,9 +6,9 @@ import (
"net/http"
"net/url"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/copy"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/copy"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
)
diff --git a/pkg/bindings/containers/attach.go b/pkg/bindings/containers/attach.go
index 586cdec8c..f48b99a95 100644
--- a/pkg/bindings/containers/attach.go
+++ b/pkg/bindings/containers/attach.go
@@ -15,10 +15,10 @@ import (
"strconv"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings"
- sig "github.com/containers/podman/v2/pkg/signal"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings"
+ sig "github.com/containers/podman/v3/pkg/signal"
+ "github.com/containers/podman/v3/utils"
"github.com/moby/term"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/bindings/containers/checkpoint.go b/pkg/bindings/containers/checkpoint.go
index c250558a6..440bf707d 100644
--- a/pkg/bindings/containers/checkpoint.go
+++ b/pkg/bindings/containers/checkpoint.go
@@ -4,8 +4,8 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
// Checkpoint checkpoints the given container (identified by nameOrID). All additional
diff --git a/pkg/bindings/containers/commit.go b/pkg/bindings/containers/commit.go
index 6205c75bd..8ae61322e 100644
--- a/pkg/bindings/containers/commit.go
+++ b/pkg/bindings/containers/commit.go
@@ -4,8 +4,8 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/bindings"
)
// Commit creates a container image from a container. The container is defined by nameOrID. Use
diff --git a/pkg/bindings/containers/containers.go b/pkg/bindings/containers/containers.go
index c84595011..86304f392 100644
--- a/pkg/bindings/containers/containers.go
+++ b/pkg/bindings/containers/containers.go
@@ -7,11 +7,11 @@ import (
"net/url"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/bindings/containers/create.go b/pkg/bindings/containers/create.go
index 177cf2e9c..3efa9643d 100644
--- a/pkg/bindings/containers/create.go
+++ b/pkg/bindings/containers/create.go
@@ -5,9 +5,9 @@ import (
"net/http"
"strings"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/specgen"
jsoniter "github.com/json-iterator/go"
)
diff --git a/pkg/bindings/containers/diff.go b/pkg/bindings/containers/diff.go
index 015172360..0d0516044 100644
--- a/pkg/bindings/containers/diff.go
+++ b/pkg/bindings/containers/diff.go
@@ -4,7 +4,7 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings"
"github.com/containers/storage/pkg/archive"
)
diff --git a/pkg/bindings/containers/exec.go b/pkg/bindings/containers/exec.go
index 98ca975a0..5ae6d1d71 100644
--- a/pkg/bindings/containers/exec.go
+++ b/pkg/bindings/containers/exec.go
@@ -6,9 +6,9 @@ import (
"net/http"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/bindings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/bindings/containers/healthcheck.go b/pkg/bindings/containers/healthcheck.go
index 44b27629b..d6b721615 100644
--- a/pkg/bindings/containers/healthcheck.go
+++ b/pkg/bindings/containers/healthcheck.go
@@ -4,8 +4,8 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings"
)
// RunHealthCheck executes the container's healthcheck and returns the health status of the
diff --git a/pkg/bindings/containers/logs.go b/pkg/bindings/containers/logs.go
index 04307d880..a3100c697 100644
--- a/pkg/bindings/containers/logs.go
+++ b/pkg/bindings/containers/logs.go
@@ -7,7 +7,7 @@ import (
"net/http"
"strconv"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings"
"github.com/pkg/errors"
)
diff --git a/pkg/bindings/containers/mount.go b/pkg/bindings/containers/mount.go
index 4fd9f89bc..bb5c3bd67 100644
--- a/pkg/bindings/containers/mount.go
+++ b/pkg/bindings/containers/mount.go
@@ -4,7 +4,7 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings"
)
// Mount mounts an existing container to the filesystem. It returns the path
diff --git a/pkg/bindings/containers/rename.go b/pkg/bindings/containers/rename.go
index 0e8c7f198..60d7fda73 100644
--- a/pkg/bindings/containers/rename.go
+++ b/pkg/bindings/containers/rename.go
@@ -4,7 +4,7 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings"
)
// Rename an existing container.
diff --git a/pkg/bindings/containers/types.go b/pkg/bindings/containers/types.go
index 4889b444a..2d0e65bb4 100644
--- a/pkg/bindings/containers/types.go
+++ b/pkg/bindings/containers/types.go
@@ -4,7 +4,7 @@ import (
"bufio"
"io"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
)
//go:generate go run ../generator/generator.go LogOptions
diff --git a/pkg/bindings/containers/types_attach_options.go b/pkg/bindings/containers/types_attach_options.go
index e806d161b..3ab848bbb 100644
--- a/pkg/bindings/containers/types_attach_options.go
+++ b/pkg/bindings/containers/types_attach_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_checkpoint_options.go b/pkg/bindings/containers/types_checkpoint_options.go
index edac04ec4..b0921460a 100644
--- a/pkg/bindings/containers/types_checkpoint_options.go
+++ b/pkg/bindings/containers/types_checkpoint_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_commit_options.go b/pkg/bindings/containers/types_commit_options.go
index f3e0a16fc..f00b1a619 100644
--- a/pkg/bindings/containers/types_commit_options.go
+++ b/pkg/bindings/containers/types_commit_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_create_options.go b/pkg/bindings/containers/types_create_options.go
index 4ef3be2b4..9fcd16fc1 100644
--- a/pkg/bindings/containers/types_create_options.go
+++ b/pkg/bindings/containers/types_create_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_diff_options.go b/pkg/bindings/containers/types_diff_options.go
index 952e149e9..ee4ed009c 100644
--- a/pkg/bindings/containers/types_diff_options.go
+++ b/pkg/bindings/containers/types_diff_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_execinspect_options.go b/pkg/bindings/containers/types_execinspect_options.go
index 2ceb41878..aa2ce3976 100644
--- a/pkg/bindings/containers/types_execinspect_options.go
+++ b/pkg/bindings/containers/types_execinspect_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_execstart_options.go b/pkg/bindings/containers/types_execstart_options.go
index e5b73bc7b..e67bb1f02 100644
--- a/pkg/bindings/containers/types_execstart_options.go
+++ b/pkg/bindings/containers/types_execstart_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_execstartandattach_options.go b/pkg/bindings/containers/types_execstartandattach_options.go
index 1b9276c8c..cac23beb1 100644
--- a/pkg/bindings/containers/types_execstartandattach_options.go
+++ b/pkg/bindings/containers/types_execstartandattach_options.go
@@ -5,7 +5,7 @@ import (
"io"
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_exists_options.go b/pkg/bindings/containers/types_exists_options.go
index ee822ab88..efb81679e 100644
--- a/pkg/bindings/containers/types_exists_options.go
+++ b/pkg/bindings/containers/types_exists_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_export_options.go b/pkg/bindings/containers/types_export_options.go
index 03eac2bad..a47bf93fa 100644
--- a/pkg/bindings/containers/types_export_options.go
+++ b/pkg/bindings/containers/types_export_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_healthcheck_options.go b/pkg/bindings/containers/types_healthcheck_options.go
index ac6d67f63..1bf251f0b 100644
--- a/pkg/bindings/containers/types_healthcheck_options.go
+++ b/pkg/bindings/containers/types_healthcheck_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_init_options.go b/pkg/bindings/containers/types_init_options.go
index 7365bcd25..6c2e544b9 100644
--- a/pkg/bindings/containers/types_init_options.go
+++ b/pkg/bindings/containers/types_init_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_inspect_options.go b/pkg/bindings/containers/types_inspect_options.go
index fb3e70a9d..30d1e42f1 100644
--- a/pkg/bindings/containers/types_inspect_options.go
+++ b/pkg/bindings/containers/types_inspect_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_kill_options.go b/pkg/bindings/containers/types_kill_options.go
index 5acb0c67d..3bcabb71c 100644
--- a/pkg/bindings/containers/types_kill_options.go
+++ b/pkg/bindings/containers/types_kill_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_list_options.go b/pkg/bindings/containers/types_list_options.go
index 8e872c99e..934cbd748 100644
--- a/pkg/bindings/containers/types_list_options.go
+++ b/pkg/bindings/containers/types_list_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_log_options.go b/pkg/bindings/containers/types_log_options.go
index a69570d0e..8acefa2aa 100644
--- a/pkg/bindings/containers/types_log_options.go
+++ b/pkg/bindings/containers/types_log_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_mount_options.go b/pkg/bindings/containers/types_mount_options.go
index e5cc35307..1151e108d 100644
--- a/pkg/bindings/containers/types_mount_options.go
+++ b/pkg/bindings/containers/types_mount_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_mountedcontainerpaths_options.go b/pkg/bindings/containers/types_mountedcontainerpaths_options.go
index f0536abaa..4f836f0b9 100644
--- a/pkg/bindings/containers/types_mountedcontainerpaths_options.go
+++ b/pkg/bindings/containers/types_mountedcontainerpaths_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_pause_options.go b/pkg/bindings/containers/types_pause_options.go
index 8497a24a8..bcbc17723 100644
--- a/pkg/bindings/containers/types_pause_options.go
+++ b/pkg/bindings/containers/types_pause_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_prune_options.go b/pkg/bindings/containers/types_prune_options.go
index 2ea963c97..af8a0fc27 100644
--- a/pkg/bindings/containers/types_prune_options.go
+++ b/pkg/bindings/containers/types_prune_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_remove_options.go b/pkg/bindings/containers/types_remove_options.go
index b9dea71a1..90b932bf3 100644
--- a/pkg/bindings/containers/types_remove_options.go
+++ b/pkg/bindings/containers/types_remove_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_rename_options.go b/pkg/bindings/containers/types_rename_options.go
index c148f6730..bc307abcc 100644
--- a/pkg/bindings/containers/types_rename_options.go
+++ b/pkg/bindings/containers/types_rename_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_resizeexectty_options.go b/pkg/bindings/containers/types_resizeexectty_options.go
index 256e5299b..6dc4b60a7 100644
--- a/pkg/bindings/containers/types_resizeexectty_options.go
+++ b/pkg/bindings/containers/types_resizeexectty_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_resizetty_options.go b/pkg/bindings/containers/types_resizetty_options.go
index 4f2958ba0..c4a6b80fd 100644
--- a/pkg/bindings/containers/types_resizetty_options.go
+++ b/pkg/bindings/containers/types_resizetty_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_restart_options.go b/pkg/bindings/containers/types_restart_options.go
index 8c791ae67..993dbae3e 100644
--- a/pkg/bindings/containers/types_restart_options.go
+++ b/pkg/bindings/containers/types_restart_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_restore_options.go b/pkg/bindings/containers/types_restore_options.go
index e0204a677..3afe71845 100644
--- a/pkg/bindings/containers/types_restore_options.go
+++ b/pkg/bindings/containers/types_restore_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_shouldrestart_options.go b/pkg/bindings/containers/types_shouldrestart_options.go
index b0aeff09c..32ede7bac 100644
--- a/pkg/bindings/containers/types_shouldrestart_options.go
+++ b/pkg/bindings/containers/types_shouldrestart_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_start_options.go b/pkg/bindings/containers/types_start_options.go
index 60e061c79..e247fc4d5 100644
--- a/pkg/bindings/containers/types_start_options.go
+++ b/pkg/bindings/containers/types_start_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_stats_options.go b/pkg/bindings/containers/types_stats_options.go
index ce0fdfe87..0524d1815 100644
--- a/pkg/bindings/containers/types_stats_options.go
+++ b/pkg/bindings/containers/types_stats_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_stop_options.go b/pkg/bindings/containers/types_stop_options.go
index 14ece3a43..c0009b0e7 100644
--- a/pkg/bindings/containers/types_stop_options.go
+++ b/pkg/bindings/containers/types_stop_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_top_options.go b/pkg/bindings/containers/types_top_options.go
index 0481abe9a..cf774ac3d 100644
--- a/pkg/bindings/containers/types_top_options.go
+++ b/pkg/bindings/containers/types_top_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_unmount_options.go b/pkg/bindings/containers/types_unmount_options.go
index c32747e3a..4aae72061 100644
--- a/pkg/bindings/containers/types_unmount_options.go
+++ b/pkg/bindings/containers/types_unmount_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_unpause_options.go b/pkg/bindings/containers/types_unpause_options.go
index 5f17067af..85ad7fb01 100644
--- a/pkg/bindings/containers/types_unpause_options.go
+++ b/pkg/bindings/containers/types_unpause_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/containers/types_wait_options.go b/pkg/bindings/containers/types_wait_options.go
index 42ee0c316..fb29f0ea7 100644
--- a/pkg/bindings/containers/types_wait_options.go
+++ b/pkg/bindings/containers/types_wait_options.go
@@ -3,8 +3,8 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/errors.go b/pkg/bindings/errors.go
index 51ea487be..3339062a5 100644
--- a/pkg/bindings/errors.go
+++ b/pkg/bindings/errors.go
@@ -4,7 +4,7 @@ import (
"encoding/json"
"io/ioutil"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/pkg/errors"
)
diff --git a/pkg/bindings/generate/generate.go b/pkg/bindings/generate/generate.go
index 29eb39557..7c904a6a8 100644
--- a/pkg/bindings/generate/generate.go
+++ b/pkg/bindings/generate/generate.go
@@ -5,8 +5,8 @@ import (
"errors"
"net/http"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func Systemd(ctx context.Context, nameOrID string, options *SystemdOptions) (*entities.GenerateSystemdReport, error) {
diff --git a/pkg/bindings/generate/types_kube_options.go b/pkg/bindings/generate/types_kube_options.go
index 5d34f4bee..106eed17f 100644
--- a/pkg/bindings/generate/types_kube_options.go
+++ b/pkg/bindings/generate/types_kube_options.go
@@ -3,7 +3,7 @@ package generate
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/generate/types_systemd_options.go b/pkg/bindings/generate/types_systemd_options.go
index dc7378888..368484e51 100644
--- a/pkg/bindings/generate/types_systemd_options.go
+++ b/pkg/bindings/generate/types_systemd_options.go
@@ -3,7 +3,7 @@ package generate
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/generator/generator.go b/pkg/bindings/generator/generator.go
index fc06fedd9..fbca567d0 100644
--- a/pkg/bindings/generator/generator.go
+++ b/pkg/bindings/generator/generator.go
@@ -81,7 +81,7 @@ func main() {
panic(err)
}
// always add reflect
- imports := []string{"\"reflect\"", "\"github.com/containers/podman/v2/pkg/bindings/util\""}
+ imports := []string{"\"reflect\"", "\"github.com/containers/podman/v3/pkg/bindings/util\""}
for _, imp := range f.Imports {
imports = append(imports, imp.Path.Value)
}
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index 76f9c56e5..6e16461e5 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -16,9 +16,9 @@ import (
"strings"
"github.com/containers/buildah"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/storage/pkg/fileutils"
"github.com/docker/go-units"
"github.com/hashicorp/go-multierror"
diff --git a/pkg/bindings/images/diff.go b/pkg/bindings/images/diff.go
index 8802c15e2..79b0df8c9 100644
--- a/pkg/bindings/images/diff.go
+++ b/pkg/bindings/images/diff.go
@@ -4,7 +4,7 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings"
"github.com/containers/storage/pkg/archive"
)
diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go
index 37750bc6c..1be2bdfdd 100644
--- a/pkg/bindings/images/images.go
+++ b/pkg/bindings/images/images.go
@@ -8,11 +8,11 @@ import (
"net/url"
"strconv"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
"github.com/pkg/errors"
)
diff --git a/pkg/bindings/images/pull.go b/pkg/bindings/images/pull.go
index 9149b7445..f4da2d521 100644
--- a/pkg/bindings/images/pull.go
+++ b/pkg/bindings/images/pull.go
@@ -11,9 +11,9 @@ import (
"os"
"strconv"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/hashicorp/go-multierror"
)
diff --git a/pkg/bindings/images/rm.go b/pkg/bindings/images/rm.go
index e652e66aa..beecce7bf 100644
--- a/pkg/bindings/images/rm.go
+++ b/pkg/bindings/images/rm.go
@@ -4,10 +4,10 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
)
// Remove removes one or more images from the local storage. Use optional force option to remove an
diff --git a/pkg/bindings/images/types_diff_options.go b/pkg/bindings/images/types_diff_options.go
index ae4b4655b..5d7c18cc8 100644
--- a/pkg/bindings/images/types_diff_options.go
+++ b/pkg/bindings/images/types_diff_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_exists_options.go b/pkg/bindings/images/types_exists_options.go
index 9de1b9878..88efb03c8 100644
--- a/pkg/bindings/images/types_exists_options.go
+++ b/pkg/bindings/images/types_exists_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_export_options.go b/pkg/bindings/images/types_export_options.go
index dcce565f6..b87c99d12 100644
--- a/pkg/bindings/images/types_export_options.go
+++ b/pkg/bindings/images/types_export_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_get_options.go b/pkg/bindings/images/types_get_options.go
index b9d00d82c..4d892aa29 100644
--- a/pkg/bindings/images/types_get_options.go
+++ b/pkg/bindings/images/types_get_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_history_options.go b/pkg/bindings/images/types_history_options.go
index e2cd43852..424fbfd37 100644
--- a/pkg/bindings/images/types_history_options.go
+++ b/pkg/bindings/images/types_history_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_import_options.go b/pkg/bindings/images/types_import_options.go
index ff409cc7c..5eb30adfc 100644
--- a/pkg/bindings/images/types_import_options.go
+++ b/pkg/bindings/images/types_import_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_list_options.go b/pkg/bindings/images/types_list_options.go
index 38d1bde70..d3d5b2046 100644
--- a/pkg/bindings/images/types_list_options.go
+++ b/pkg/bindings/images/types_list_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_load_options.go b/pkg/bindings/images/types_load_options.go
index d17e7cc10..75b5566d6 100644
--- a/pkg/bindings/images/types_load_options.go
+++ b/pkg/bindings/images/types_load_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_prune_options.go b/pkg/bindings/images/types_prune_options.go
index deef211c1..06378b56d 100644
--- a/pkg/bindings/images/types_prune_options.go
+++ b/pkg/bindings/images/types_prune_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_pull_options.go b/pkg/bindings/images/types_pull_options.go
index 2220ade26..3ea23fc02 100644
--- a/pkg/bindings/images/types_pull_options.go
+++ b/pkg/bindings/images/types_pull_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_push_options.go b/pkg/bindings/images/types_push_options.go
index be14e7d78..3cb3ec937 100644
--- a/pkg/bindings/images/types_push_options.go
+++ b/pkg/bindings/images/types_push_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_remove_options.go b/pkg/bindings/images/types_remove_options.go
index 964fca265..81a717bf8 100644
--- a/pkg/bindings/images/types_remove_options.go
+++ b/pkg/bindings/images/types_remove_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_search_options.go b/pkg/bindings/images/types_search_options.go
index 1321d1910..a0e95a0b1 100644
--- a/pkg/bindings/images/types_search_options.go
+++ b/pkg/bindings/images/types_search_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_tag_options.go b/pkg/bindings/images/types_tag_options.go
index 74977e10a..1a0e05640 100644
--- a/pkg/bindings/images/types_tag_options.go
+++ b/pkg/bindings/images/types_tag_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_tree_options.go b/pkg/bindings/images/types_tree_options.go
index a07a3a647..b03d2282a 100644
--- a/pkg/bindings/images/types_tree_options.go
+++ b/pkg/bindings/images/types_tree_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/images/types_untag_options.go b/pkg/bindings/images/types_untag_options.go
index 3f7ac4a5a..a8004b21e 100644
--- a/pkg/bindings/images/types_untag_options.go
+++ b/pkg/bindings/images/types_untag_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/manifests/manifests.go b/pkg/bindings/manifests/manifests.go
index 4634dd442..268ce3b19 100644
--- a/pkg/bindings/manifests/manifests.go
+++ b/pkg/bindings/manifests/manifests.go
@@ -9,9 +9,9 @@ import (
"strings"
"github.com/containers/image/v5/manifest"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/images"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/images"
jsoniter "github.com/json-iterator/go"
)
diff --git a/pkg/bindings/manifests/types_add_options.go b/pkg/bindings/manifests/types_add_options.go
index ae7e914b2..167c42639 100644
--- a/pkg/bindings/manifests/types_add_options.go
+++ b/pkg/bindings/manifests/types_add_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/manifests/types_create_options.go b/pkg/bindings/manifests/types_create_options.go
index a8e11b828..e3b549968 100644
--- a/pkg/bindings/manifests/types_create_options.go
+++ b/pkg/bindings/manifests/types_create_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/manifests/types_exists_options.go b/pkg/bindings/manifests/types_exists_options.go
index df202f677..301652d99 100644
--- a/pkg/bindings/manifests/types_exists_options.go
+++ b/pkg/bindings/manifests/types_exists_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/manifests/types_inspect_options.go b/pkg/bindings/manifests/types_inspect_options.go
index 90be7ebe3..104fd8469 100644
--- a/pkg/bindings/manifests/types_inspect_options.go
+++ b/pkg/bindings/manifests/types_inspect_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/manifests/types_remove_options.go b/pkg/bindings/manifests/types_remove_options.go
index 612d72dac..57a5f82ce 100644
--- a/pkg/bindings/manifests/types_remove_options.go
+++ b/pkg/bindings/manifests/types_remove_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/network/network.go b/pkg/bindings/network/network.go
index 8fdb28425..46a3719fe 100644
--- a/pkg/bindings/network/network.go
+++ b/pkg/bindings/network/network.go
@@ -6,8 +6,8 @@ import (
"net/url"
"strings"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
jsoniter "github.com/json-iterator/go"
)
diff --git a/pkg/bindings/network/types_connect_options.go b/pkg/bindings/network/types_connect_options.go
index b3cad6164..f51c31be0 100644
--- a/pkg/bindings/network/types_connect_options.go
+++ b/pkg/bindings/network/types_connect_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/network/types_create_options.go b/pkg/bindings/network/types_create_options.go
index 553c94ee5..66e155b7a 100644
--- a/pkg/bindings/network/types_create_options.go
+++ b/pkg/bindings/network/types_create_options.go
@@ -4,7 +4,7 @@ import (
"net"
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/network/types_disconnect_options.go b/pkg/bindings/network/types_disconnect_options.go
index 667da0d99..37e9f4c72 100644
--- a/pkg/bindings/network/types_disconnect_options.go
+++ b/pkg/bindings/network/types_disconnect_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/network/types_exists_options.go b/pkg/bindings/network/types_exists_options.go
index 4038c091a..4861343b6 100644
--- a/pkg/bindings/network/types_exists_options.go
+++ b/pkg/bindings/network/types_exists_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/network/types_inspect_options.go b/pkg/bindings/network/types_inspect_options.go
index ce8f58e2e..6022ae111 100644
--- a/pkg/bindings/network/types_inspect_options.go
+++ b/pkg/bindings/network/types_inspect_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/network/types_list_options.go b/pkg/bindings/network/types_list_options.go
index c16e4c05e..c922dcf8e 100644
--- a/pkg/bindings/network/types_list_options.go
+++ b/pkg/bindings/network/types_list_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/network/types_prune_options.go b/pkg/bindings/network/types_prune_options.go
index c3299835f..ae26dbece 100644
--- a/pkg/bindings/network/types_prune_options.go
+++ b/pkg/bindings/network/types_prune_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/network/types_remove_options.go b/pkg/bindings/network/types_remove_options.go
index 8e4dca819..7e3265924 100644
--- a/pkg/bindings/network/types_remove_options.go
+++ b/pkg/bindings/network/types_remove_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/play/play.go b/pkg/bindings/play/play.go
index 9ee02a093..4b735c821 100644
--- a/pkg/bindings/play/play.go
+++ b/pkg/bindings/play/play.go
@@ -6,9 +6,9 @@ import (
"os"
"strconv"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func Kube(ctx context.Context, path string, options *KubeOptions) (*entities.PlayKubeReport, error) {
diff --git a/pkg/bindings/play/types_kube_options.go b/pkg/bindings/play/types_kube_options.go
index 946c19b28..d290ceb34 100644
--- a/pkg/bindings/play/types_kube_options.go
+++ b/pkg/bindings/play/types_kube_options.go
@@ -3,7 +3,7 @@ package play
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/pods.go b/pkg/bindings/pods/pods.go
index ef30348f8..eb7b273cf 100644
--- a/pkg/bindings/pods/pods.go
+++ b/pkg/bindings/pods/pods.go
@@ -6,10 +6,10 @@ import (
"net/url"
"strings"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/specgen"
jsoniter "github.com/json-iterator/go"
)
diff --git a/pkg/bindings/pods/types_create_options.go b/pkg/bindings/pods/types_create_options.go
index 942f25629..a29c24794 100644
--- a/pkg/bindings/pods/types_create_options.go
+++ b/pkg/bindings/pods/types_create_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_exists_options.go b/pkg/bindings/pods/types_exists_options.go
index 11c6f9c05..e235fad37 100644
--- a/pkg/bindings/pods/types_exists_options.go
+++ b/pkg/bindings/pods/types_exists_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_inspect_options.go b/pkg/bindings/pods/types_inspect_options.go
index 172b1303c..a78337015 100644
--- a/pkg/bindings/pods/types_inspect_options.go
+++ b/pkg/bindings/pods/types_inspect_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_kill_options.go b/pkg/bindings/pods/types_kill_options.go
index e350746db..7a9714bfd 100644
--- a/pkg/bindings/pods/types_kill_options.go
+++ b/pkg/bindings/pods/types_kill_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_list_options.go b/pkg/bindings/pods/types_list_options.go
index fcaeb7c1c..cb9bbc5a6 100644
--- a/pkg/bindings/pods/types_list_options.go
+++ b/pkg/bindings/pods/types_list_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_pause_options.go b/pkg/bindings/pods/types_pause_options.go
index b5aee3984..91a12b76b 100644
--- a/pkg/bindings/pods/types_pause_options.go
+++ b/pkg/bindings/pods/types_pause_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_prune_options.go b/pkg/bindings/pods/types_prune_options.go
index 80019a2fd..6740a22ba 100644
--- a/pkg/bindings/pods/types_prune_options.go
+++ b/pkg/bindings/pods/types_prune_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_remove_options.go b/pkg/bindings/pods/types_remove_options.go
index e129d1e29..bf1096955 100644
--- a/pkg/bindings/pods/types_remove_options.go
+++ b/pkg/bindings/pods/types_remove_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_restart_options.go b/pkg/bindings/pods/types_restart_options.go
index 7b95b91a1..ace0a0cbd 100644
--- a/pkg/bindings/pods/types_restart_options.go
+++ b/pkg/bindings/pods/types_restart_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_start_options.go b/pkg/bindings/pods/types_start_options.go
index b0d574020..37bc93ffc 100644
--- a/pkg/bindings/pods/types_start_options.go
+++ b/pkg/bindings/pods/types_start_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_stats_options.go b/pkg/bindings/pods/types_stats_options.go
index 50a18bc6a..257dab50c 100644
--- a/pkg/bindings/pods/types_stats_options.go
+++ b/pkg/bindings/pods/types_stats_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_stop_options.go b/pkg/bindings/pods/types_stop_options.go
index f80d391c6..f43317275 100644
--- a/pkg/bindings/pods/types_stop_options.go
+++ b/pkg/bindings/pods/types_stop_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_top_options.go b/pkg/bindings/pods/types_top_options.go
index 7e05a7937..6526d9879 100644
--- a/pkg/bindings/pods/types_top_options.go
+++ b/pkg/bindings/pods/types_top_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/pods/types_unpause_options.go b/pkg/bindings/pods/types_unpause_options.go
index 9575e3949..67e7d45d6 100644
--- a/pkg/bindings/pods/types_unpause_options.go
+++ b/pkg/bindings/pods/types_unpause_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/secrets/secrets.go b/pkg/bindings/secrets/secrets.go
index 3fd70dcad..091d38e56 100644
--- a/pkg/bindings/secrets/secrets.go
+++ b/pkg/bindings/secrets/secrets.go
@@ -5,8 +5,8 @@ import (
"io"
"net/http"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
// List returns information about existing secrets in the form of a slice.
diff --git a/pkg/bindings/secrets/types_create_options.go b/pkg/bindings/secrets/types_create_options.go
index 254f91147..af4516c35 100644
--- a/pkg/bindings/secrets/types_create_options.go
+++ b/pkg/bindings/secrets/types_create_options.go
@@ -3,7 +3,7 @@ package secrets
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/secrets/types_inspect_options.go b/pkg/bindings/secrets/types_inspect_options.go
index 0a8f8ca19..75831841d 100644
--- a/pkg/bindings/secrets/types_inspect_options.go
+++ b/pkg/bindings/secrets/types_inspect_options.go
@@ -3,7 +3,7 @@ package secrets
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/secrets/types_list_options.go b/pkg/bindings/secrets/types_list_options.go
index e232c543b..14dcd761c 100644
--- a/pkg/bindings/secrets/types_list_options.go
+++ b/pkg/bindings/secrets/types_list_options.go
@@ -3,7 +3,7 @@ package secrets
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/secrets/types_remove_options.go b/pkg/bindings/secrets/types_remove_options.go
index 43c1fb545..3da8e8485 100644
--- a/pkg/bindings/secrets/types_remove_options.go
+++ b/pkg/bindings/secrets/types_remove_options.go
@@ -3,7 +3,7 @@ package secrets
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/system/info.go b/pkg/bindings/system/info.go
index 798010333..244f9643e 100644
--- a/pkg/bindings/system/info.go
+++ b/pkg/bindings/system/info.go
@@ -4,8 +4,8 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings"
)
// Info returns information about the libpod environment and its stores
diff --git a/pkg/bindings/system/system.go b/pkg/bindings/system/system.go
index 815c967f1..310bcef15 100644
--- a/pkg/bindings/system/system.go
+++ b/pkg/bindings/system/system.go
@@ -8,9 +8,9 @@ import (
"net/http"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/bindings/system/types_disk_options.go b/pkg/bindings/system/types_disk_options.go
index 118d2e8d2..3a7474502 100644
--- a/pkg/bindings/system/types_disk_options.go
+++ b/pkg/bindings/system/types_disk_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/system/types_events_options.go b/pkg/bindings/system/types_events_options.go
index f6717f38d..b430c99fd 100644
--- a/pkg/bindings/system/types_events_options.go
+++ b/pkg/bindings/system/types_events_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/system/types_info_options.go b/pkg/bindings/system/types_info_options.go
index bc6c67282..5fa8fd37d 100644
--- a/pkg/bindings/system/types_info_options.go
+++ b/pkg/bindings/system/types_info_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/system/types_prune_options.go b/pkg/bindings/system/types_prune_options.go
index c08a9baf3..47093a910 100644
--- a/pkg/bindings/system/types_prune_options.go
+++ b/pkg/bindings/system/types_prune_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/system/types_version_options.go b/pkg/bindings/system/types_version_options.go
index fa6956677..3bfb85c3b 100644
--- a/pkg/bindings/system/types_version_options.go
+++ b/pkg/bindings/system/types_version_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/test/attach_test.go b/pkg/bindings/test/attach_test.go
index 771b2d528..16090e104 100644
--- a/pkg/bindings/test/attach_test.go
+++ b/pkg/bindings/test/attach_test.go
@@ -5,9 +5,9 @@ import (
"fmt"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/auth_test.go b/pkg/bindings/test/auth_test.go
index e647b3c36..d48a3eff7 100644
--- a/pkg/bindings/test/auth_test.go
+++ b/pkg/bindings/test/auth_test.go
@@ -7,8 +7,8 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/image/v5/types"
- podmanRegistry "github.com/containers/podman/v2/hack/podman-registry-go"
- "github.com/containers/podman/v2/pkg/bindings/images"
+ podmanRegistry "github.com/containers/podman/v3/hack/podman-registry-go"
+ "github.com/containers/podman/v3/pkg/bindings/images"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/common_test.go b/pkg/bindings/test/common_test.go
index 8fbc631d8..588f38930 100644
--- a/pkg/bindings/test/common_test.go
+++ b/pkg/bindings/test/common_test.go
@@ -9,10 +9,10 @@ import (
"path/filepath"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- . "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/define"
+ . "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega/gexec"
"github.com/pkg/errors"
diff --git a/pkg/bindings/test/containers_test.go b/pkg/bindings/test/containers_test.go
index 14eb1ffc6..f2ab197ce 100644
--- a/pkg/bindings/test/containers_test.go
+++ b/pkg/bindings/test/containers_test.go
@@ -5,11 +5,11 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/create_test.go b/pkg/bindings/test/create_test.go
index 2d2d657de..3c83aac02 100644
--- a/pkg/bindings/test/create_test.go
+++ b/pkg/bindings/test/create_test.go
@@ -3,8 +3,8 @@ package test_bindings
import (
"time"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/exec_test.go b/pkg/bindings/test/exec_test.go
index 8e20a192f..7a21be77f 100644
--- a/pkg/bindings/test/exec_test.go
+++ b/pkg/bindings/test/exec_test.go
@@ -3,9 +3,9 @@ package test_bindings
import (
"time"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/images_test.go b/pkg/bindings/test/images_test.go
index f94960047..db51d1e68 100644
--- a/pkg/bindings/test/images_test.go
+++ b/pkg/bindings/test/images_test.go
@@ -6,10 +6,10 @@ import (
"path/filepath"
"time"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/bindings/images"
- dreports "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/bindings/images"
+ dreports "github.com/containers/podman/v3/pkg/domain/entities/reports"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/info_test.go b/pkg/bindings/test/info_test.go
index 4d696b59e..3ca4b99b3 100644
--- a/pkg/bindings/test/info_test.go
+++ b/pkg/bindings/test/info_test.go
@@ -4,10 +4,10 @@ import (
"runtime"
"time"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/bindings/images"
- "github.com/containers/podman/v2/pkg/bindings/system"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/bindings/images"
+ "github.com/containers/podman/v3/pkg/bindings/system"
+ "github.com/containers/podman/v3/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/manifests_test.go b/pkg/bindings/test/manifests_test.go
index b93f64b4b..4d8ca74bf 100644
--- a/pkg/bindings/test/manifests_test.go
+++ b/pkg/bindings/test/manifests_test.go
@@ -4,9 +4,9 @@ import (
"net/http"
"time"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/images"
- "github.com/containers/podman/v2/pkg/bindings/manifests"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/images"
+ "github.com/containers/podman/v3/pkg/bindings/manifests"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/pods_test.go b/pkg/bindings/test/pods_test.go
index 058479c26..2b4eb05d3 100644
--- a/pkg/bindings/test/pods_test.go
+++ b/pkg/bindings/test/pods_test.go
@@ -5,10 +5,10 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/pods"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/pods"
+ "github.com/containers/podman/v3/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/secrets_test.go b/pkg/bindings/test/secrets_test.go
index 17c043e4b..5edb37f18 100644
--- a/pkg/bindings/test/secrets_test.go
+++ b/pkg/bindings/test/secrets_test.go
@@ -6,8 +6,8 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/secrets"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/secrets"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/system_test.go b/pkg/bindings/test/system_test.go
index 44067b61d..a68a8099c 100644
--- a/pkg/bindings/test/system_test.go
+++ b/pkg/bindings/test/system_test.go
@@ -4,13 +4,13 @@ import (
"sync"
"time"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/bindings/pods"
- "github.com/containers/podman/v2/pkg/bindings/system"
- "github.com/containers/podman/v2/pkg/bindings/volumes"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/bindings/pods"
+ "github.com/containers/podman/v3/pkg/bindings/system"
+ "github.com/containers/podman/v3/pkg/bindings/volumes"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/volumes_test.go b/pkg/bindings/test/volumes_test.go
index 1f1da3cfa..91f6444cc 100644
--- a/pkg/bindings/test/volumes_test.go
+++ b/pkg/bindings/test/volumes_test.go
@@ -6,11 +6,11 @@ import (
"net/http"
"time"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/bindings/volumes"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/bindings/volumes"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/util/util.go b/pkg/bindings/util/util.go
index 6296fc22f..c1961308e 100644
--- a/pkg/bindings/util/util.go
+++ b/pkg/bindings/util/util.go
@@ -2,6 +2,7 @@ package util
import (
"errors"
+ "fmt"
"net/url"
"reflect"
"strconv"
@@ -11,14 +12,23 @@ import (
)
func IsSimpleType(f reflect.Value) bool {
+ if _, ok := f.Interface().(fmt.Stringer); ok {
+ return true
+ }
+
switch f.Kind() {
case reflect.Bool, reflect.Int, reflect.Int64, reflect.Uint, reflect.Uint64, reflect.String:
return true
}
+
return false
}
func SimpleTypeToParam(f reflect.Value) string {
+ if s, ok := f.Interface().(fmt.Stringer); ok {
+ return s.String()
+ }
+
switch f.Kind() {
case reflect.Bool:
return strconv.FormatBool(f.Bool())
@@ -31,6 +41,7 @@ func SimpleTypeToParam(f reflect.Value) string {
case reflect.String:
return f.String()
}
+
panic("the input parameter is not a simple type")
}
diff --git a/pkg/bindings/volumes/types_create_options.go b/pkg/bindings/volumes/types_create_options.go
index 45053e261..5ff1615ec 100644
--- a/pkg/bindings/volumes/types_create_options.go
+++ b/pkg/bindings/volumes/types_create_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/volumes/types_exists_options.go b/pkg/bindings/volumes/types_exists_options.go
index 044f0501d..396975cb8 100644
--- a/pkg/bindings/volumes/types_exists_options.go
+++ b/pkg/bindings/volumes/types_exists_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/volumes/types_inspect_options.go b/pkg/bindings/volumes/types_inspect_options.go
index e6397a0d2..9bc3969b0 100644
--- a/pkg/bindings/volumes/types_inspect_options.go
+++ b/pkg/bindings/volumes/types_inspect_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/volumes/types_list_options.go b/pkg/bindings/volumes/types_list_options.go
index 103515e99..ddaf8dd91 100644
--- a/pkg/bindings/volumes/types_list_options.go
+++ b/pkg/bindings/volumes/types_list_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/volumes/types_prune_options.go b/pkg/bindings/volumes/types_prune_options.go
index eb910e05d..474714fa5 100644
--- a/pkg/bindings/volumes/types_prune_options.go
+++ b/pkg/bindings/volumes/types_prune_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/volumes/types_remove_options.go b/pkg/bindings/volumes/types_remove_options.go
index 30cb923c7..09651e424 100644
--- a/pkg/bindings/volumes/types_remove_options.go
+++ b/pkg/bindings/volumes/types_remove_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/util"
)
/*
diff --git a/pkg/bindings/volumes/volumes.go b/pkg/bindings/volumes/volumes.go
index 60fdd0a23..fb58a1d1f 100644
--- a/pkg/bindings/volumes/volumes.go
+++ b/pkg/bindings/volumes/volumes.go
@@ -5,9 +5,9 @@ import (
"net/http"
"strings"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
jsoniter "github.com/json-iterator/go"
)
diff --git a/pkg/cgroups/cgroups.go b/pkg/cgroups/cgroups.go
index 285fd093a..f563c51a8 100644
--- a/pkg/cgroups/cgroups.go
+++ b/pkg/cgroups/cgroups.go
@@ -11,7 +11,7 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/rootless"
systemdDbus "github.com/coreos/go-systemd/v22/dbus"
"github.com/godbus/dbus/v5"
spec "github.com/opencontainers/runtime-spec/specs-go"
diff --git a/pkg/cgroups/cgroups_test.go b/pkg/cgroups/cgroups_test.go
index 54315f7be..22d5efb76 100644
--- a/pkg/cgroups/cgroups_test.go
+++ b/pkg/cgroups/cgroups_test.go
@@ -3,7 +3,7 @@ package cgroups
import (
"testing"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/rootless"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
diff --git a/pkg/checkpoint/checkpoint_restore.go b/pkg/checkpoint/checkpoint_restore.go
index f6cd3b38f..a608762b5 100644
--- a/pkg/checkpoint/checkpoint_restore.go
+++ b/pkg/checkpoint/checkpoint_restore.go
@@ -6,11 +6,11 @@ import (
"os"
"path/filepath"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage/pkg/archive"
jsoniter "github.com/json-iterator/go"
spec "github.com/opencontainers/runtime-spec/specs-go"
diff --git a/pkg/domain/entities/container_ps.go b/pkg/domain/entities/container_ps.go
index 6709ca48a..572d6b9e9 100644
--- a/pkg/domain/entities/container_ps.go
+++ b/pkg/domain/entities/container_ps.go
@@ -5,7 +5,7 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/pkg/ps/define"
+ "github.com/containers/podman/v3/pkg/ps/define"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go
index 2d50d6826..ac965834a 100644
--- a/pkg/domain/entities/containers.go
+++ b/pkg/domain/entities/containers.go
@@ -7,9 +7,9 @@ import (
"time"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/copy"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/copy"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/cri-o/ocicni/pkg/ocicni"
)
@@ -88,8 +88,9 @@ type StopOptions struct {
}
type StopReport struct {
- Err error
- Id string //nolint
+ Err error
+ Id string //nolint
+ RawInput string
}
type TopOptions struct {
@@ -109,8 +110,9 @@ type KillOptions struct {
}
type KillReport struct {
- Err error
- Id string //nolint
+ Err error
+ Id string //nolint
+ RawInput string
}
type RestartOptions struct {
diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go
index 82e2f8eaf..bcab617af 100644
--- a/pkg/domain/entities/engine_container.go
+++ b/pkg/domain/entities/engine_container.go
@@ -5,9 +5,9 @@ import (
"io"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/spf13/cobra"
)
diff --git a/pkg/domain/entities/engine_image.go b/pkg/domain/entities/engine_image.go
index ee611502f..d841ecd6e 100644
--- a/pkg/domain/entities/engine_image.go
+++ b/pkg/domain/entities/engine_image.go
@@ -4,7 +4,7 @@ import (
"context"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
)
type ImageEngine interface {
diff --git a/pkg/domain/entities/events.go b/pkg/domain/entities/events.go
index f4f3b705f..930ca53ae 100644
--- a/pkg/domain/entities/events.go
+++ b/pkg/domain/entities/events.go
@@ -4,7 +4,7 @@ import (
"strconv"
"time"
- libpodEvents "github.com/containers/podman/v2/libpod/events"
+ libpodEvents "github.com/containers/podman/v3/libpod/events"
dockerEvents "github.com/docker/docker/api/types/events"
)
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index ef40d5490..19109f873 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -6,8 +6,8 @@ import (
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/pkg/inspect"
- "github.com/containers/podman/v2/pkg/trust"
+ "github.com/containers/podman/v3/pkg/inspect"
+ "github.com/containers/podman/v3/pkg/trust"
docker "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/opencontainers/go-digest"
diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go
index 32900d536..88055454f 100644
--- a/pkg/domain/entities/pods.go
+++ b/pkg/domain/entities/pods.go
@@ -5,8 +5,8 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/specgen"
)
type PodKillOptions struct {
diff --git a/pkg/domain/entities/secrets.go b/pkg/domain/entities/secrets.go
index 3cad4c099..3481cbe05 100644
--- a/pkg/domain/entities/secrets.go
+++ b/pkg/domain/entities/secrets.go
@@ -3,7 +3,7 @@ package entities
import (
"time"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/errorhandling"
)
type SecretCreateReport struct {
diff --git a/pkg/domain/entities/system.go b/pkg/domain/entities/system.go
index 99fa947f0..a1cfb4481 100644
--- a/pkg/domain/entities/system.go
+++ b/pkg/domain/entities/system.go
@@ -3,8 +3,8 @@ package entities
import (
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
"github.com/docker/docker/api/types"
"github.com/spf13/cobra"
)
diff --git a/pkg/domain/entities/types.go b/pkg/domain/entities/types.go
index e5473dc62..9efc64c93 100644
--- a/pkg/domain/entities/types.go
+++ b/pkg/domain/entities/types.go
@@ -4,8 +4,8 @@ import (
"net"
"github.com/containers/buildah/imagebuildah"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/containers/storage/pkg/archive"
)
diff --git a/pkg/domain/entities/volumes.go b/pkg/domain/entities/volumes.go
index c826ee389..beb2a75ac 100644
--- a/pkg/domain/entities/volumes.go
+++ b/pkg/domain/entities/volumes.go
@@ -3,7 +3,7 @@ package entities
import (
"net/url"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
docker_api_types "github.com/docker/docker/api/types"
docker_api_types_volume "github.com/docker/docker/api/types/volume"
)
diff --git a/pkg/domain/filters/containers.go b/pkg/domain/filters/containers.go
index 1de5aca91..6f4b4e8a0 100644
--- a/pkg/domain/filters/containers.go
+++ b/pkg/domain/filters/containers.go
@@ -5,11 +5,11 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/network"
- "github.com/containers/podman/v2/pkg/timetype"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/network"
+ "github.com/containers/podman/v3/pkg/timetype"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/filters/pods.go b/pkg/domain/filters/pods.go
index ce7028d2a..53d10213a 100644
--- a/pkg/domain/filters/pods.go
+++ b/pkg/domain/filters/pods.go
@@ -4,10 +4,10 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/network"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/network"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/filters/volumes.go b/pkg/domain/filters/volumes.go
index 7890459f5..bc1756cf5 100644
--- a/pkg/domain/filters/volumes.go
+++ b/pkg/domain/filters/volumes.go
@@ -4,7 +4,7 @@ import (
"net/url"
"strings"
- "github.com/containers/podman/v2/libpod"
+ "github.com/containers/podman/v3/libpod"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/abi/archive.go b/pkg/domain/infra/abi/archive.go
index c64dfb02a..528771ee7 100644
--- a/pkg/domain/infra/abi/archive.go
+++ b/pkg/domain/infra/abi/archive.go
@@ -3,13 +3,14 @@ package abi
import (
"context"
"io"
+ "path/filepath"
"strings"
buildahCopiah "github.com/containers/buildah/copier"
"github.com/containers/buildah/pkg/chrootuser"
"github.com/containers/buildah/util"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/storage"
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/idtools"
@@ -93,7 +94,7 @@ func (ic *ContainerEngine) ContainerCopyToArchive(ctx context.Context, nameOrID
containerPath = "/."
}
- _, resolvedRoot, resolvedContainerPath, err := ic.containerStat(container, containerMountPoint, containerPath)
+ statInfo, resolvedRoot, resolvedContainerPath, err := ic.containerStat(container, containerMountPoint, containerPath)
if err != nil {
unmount()
return nil, err
@@ -110,8 +111,8 @@ func (ic *ContainerEngine) ContainerCopyToArchive(ctx context.Context, nameOrID
return func() error {
defer container.Unmount(false)
getOptions := buildahCopiah.GetOptions{
- // Unless the specified path ends with ".", we want to copy the base directory.
- KeepDirectoryNames: !strings.HasSuffix(resolvedContainerPath, "."),
+ // Unless the specified points to ".", we want to copy the base directory.
+ KeepDirectoryNames: statInfo.IsDir && filepath.Base(containerPath) != ".",
UIDMap: idMappings.UIDMap,
GIDMap: idMappings.GIDMap,
ChownDirs: idPair,
diff --git a/pkg/domain/infra/abi/auto-update.go b/pkg/domain/infra/abi/auto-update.go
index e8e2fa185..c9d7f2130 100644
--- a/pkg/domain/infra/abi/auto-update.go
+++ b/pkg/domain/infra/abi/auto-update.go
@@ -3,8 +3,8 @@ package abi
import (
"context"
- "github.com/containers/podman/v2/pkg/autoupdate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/autoupdate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func (ic *ContainerEngine) AutoUpdate(ctx context.Context, options entities.AutoUpdateOptions) (*entities.AutoUpdateReport, []error) {
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index 7a672d863..938a5a92b 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -12,24 +12,24 @@ import (
"github.com/containers/buildah"
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/manifest"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/libpod/logs"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/checkpoint"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- dfilters "github.com/containers/podman/v2/pkg/domain/filters"
- "github.com/containers/podman/v2/pkg/domain/infra/abi/terminal"
- parallelctr "github.com/containers/podman/v2/pkg/parallel/ctr"
- "github.com/containers/podman/v2/pkg/ps"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/signal"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/specgen/generate"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/libpod/logs"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/checkpoint"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ dfilters "github.com/containers/podman/v3/pkg/domain/filters"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi/terminal"
+ parallelctr "github.com/containers/podman/v3/pkg/parallel/ctr"
+ "github.com/containers/podman/v3/pkg/ps"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/signal"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/specgen/generate"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -138,10 +138,16 @@ func (ic *ContainerEngine) ContainerUnpause(ctx context.Context, namesOrIds []st
}
func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []string, options entities.StopOptions) ([]*entities.StopReport, error) {
names := namesOrIds
- ctrs, err := getContainersByContext(options.All, options.Latest, names, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, names, ic.Libpod)
if err != nil && !(options.Ignore && errors.Cause(err) == define.ErrNoSuchCtr) {
return nil, err
}
+ ctrMap := map[string]string{}
+ if len(rawInputs) == len(ctrs) {
+ for i := range ctrs {
+ ctrMap[ctrs[i].ID()] = rawInputs[i]
+ }
+ }
errMap, err := parallelctr.ContainerOp(ctx, ctrs, func(c *libpod.Container) error {
var err error
if options.Timeout != nil {
@@ -174,6 +180,11 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
for ctr, err := range errMap {
report := new(entities.StopReport)
report.Id = ctr.ID()
+ if options.All {
+ report.RawInput = ctr.ID()
+ } else {
+ report.RawInput = ctrMap[ctr.ID()]
+ }
report.Err = err
reports = append(reports, report)
}
@@ -197,15 +208,22 @@ func (ic *ContainerEngine) ContainerKill(ctx context.Context, namesOrIds []strin
if err != nil {
return nil, err
}
- ctrs, err := getContainersByContext(options.All, options.Latest, namesOrIds, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, namesOrIds, ic.Libpod)
if err != nil {
return nil, err
}
+ ctrMap := map[string]string{}
+ if len(rawInputs) == len(ctrs) {
+ for i := range ctrs {
+ ctrMap[ctrs[i].ID()] = rawInputs[i]
+ }
+ }
reports := make([]*entities.KillReport, 0, len(ctrs))
for _, con := range ctrs {
reports = append(reports, &entities.KillReport{
- Id: con.ID(),
- Err: con.Kill(uint(sig)),
+ Id: con.ID(),
+ Err: con.Kill(uint(sig)),
+ RawInput: ctrMap[con.ID()],
})
}
return reports, nil
diff --git a/pkg/domain/infra/abi/containers_runlabel.go b/pkg/domain/infra/abi/containers_runlabel.go
index 41fdf8f34..8de383926 100644
--- a/pkg/domain/infra/abi/containers_runlabel.go
+++ b/pkg/domain/infra/abi/containers_runlabel.go
@@ -7,11 +7,11 @@ import (
"path/filepath"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/domain/entities"
- envLib "github.com/containers/podman/v2/pkg/env"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ envLib "github.com/containers/podman/v3/pkg/env"
+ "github.com/containers/podman/v3/utils"
"github.com/google/shlex"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/domain/infra/abi/containers_stat.go b/pkg/domain/infra/abi/containers_stat.go
index 1844f4019..1baeb9178 100644
--- a/pkg/domain/infra/abi/containers_stat.go
+++ b/pkg/domain/infra/abi/containers_stat.go
@@ -7,9 +7,9 @@ import (
"strings"
buildahCopiah "github.com/containers/buildah/copier"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/copy"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/copy"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/domain/infra/abi/events.go b/pkg/domain/infra/abi/events.go
index fa57543bf..d7e2566e3 100644
--- a/pkg/domain/infra/abi/events.go
+++ b/pkg/domain/infra/abi/events.go
@@ -3,8 +3,8 @@ package abi
import (
"context"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func (ic *ContainerEngine) Events(ctx context.Context, opts entities.EventsOptions) error {
diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go
index 79f55e2bd..161becbfa 100644
--- a/pkg/domain/infra/abi/generate.go
+++ b/pkg/domain/infra/abi/generate.go
@@ -5,10 +5,10 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/systemd/generate"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/systemd/generate"
"github.com/ghodss/yaml"
"github.com/pkg/errors"
k8sAPI "k8s.io/api/core/v1"
diff --git a/pkg/domain/infra/abi/healthcheck.go b/pkg/domain/infra/abi/healthcheck.go
index 49b709f39..92ccd19af 100644
--- a/pkg/domain/infra/abi/healthcheck.go
+++ b/pkg/domain/infra/abi/healthcheck.go
@@ -3,8 +3,8 @@ package abi
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func (ic *ContainerEngine) HealthCheckRun(ctx context.Context, nameOrID string, options entities.HealthCheckOptions) (*define.HealthCheckResults, error) {
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index fb01c72b6..46d967789 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -20,13 +20,13 @@ import (
"github.com/containers/image/v5/transports"
"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- domainUtils "github.com/containers/podman/v2/pkg/domain/utils"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ domainUtils "github.com/containers/podman/v3/pkg/domain/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
dockerRef "github.com/docker/distribution/reference"
"github.com/opencontainers/go-digest"
diff --git a/pkg/domain/infra/abi/images_list.go b/pkg/domain/infra/abi/images_list.go
index 2d3b9f36a..3b8aabeb7 100644
--- a/pkg/domain/infra/abi/images_list.go
+++ b/pkg/domain/infra/abi/images_list.go
@@ -3,8 +3,8 @@ package abi
import (
"context"
- libpodImage "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ libpodImage "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go
index da7482407..8e3c50fac 100644
--- a/pkg/domain/infra/abi/manifest.go
+++ b/pkg/domain/infra/abi/manifest.go
@@ -17,8 +17,8 @@ import (
"github.com/containers/image/v5/transports"
"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/image/v5/types"
- libpodImage "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ libpodImage "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/opencontainers/go-digest"
imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
diff --git a/pkg/domain/infra/abi/network.go b/pkg/domain/infra/abi/network.go
index 13fabe89d..50a74032c 100644
--- a/pkg/domain/infra/abi/network.go
+++ b/pkg/domain/infra/abi/network.go
@@ -3,10 +3,10 @@ package abi
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/network"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/network"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/abi/parse/parse.go b/pkg/domain/infra/abi/parse/parse.go
index 6a6380e33..1c590d2d6 100644
--- a/pkg/domain/infra/abi/parse/parse.go
+++ b/pkg/domain/infra/abi/parse/parse.go
@@ -4,8 +4,8 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 35a84106f..c5e20a607 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -9,13 +9,13 @@ import (
"strings"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/specgen/generate"
- "github.com/containers/podman/v2/pkg/specgen/generate/kube"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/specgen/generate"
+ "github.com/containers/podman/v3/pkg/specgen/generate/kube"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/docker/distribution/reference"
"github.com/ghodss/yaml"
"github.com/pkg/errors"
diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go
index 2a8445c9f..9f033a4c0 100644
--- a/pkg/domain/infra/abi/pods.go
+++ b/pkg/domain/infra/abi/pods.go
@@ -3,13 +3,13 @@ package abi
import (
"context"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- dfilters "github.com/containers/podman/v2/pkg/domain/filters"
- "github.com/containers/podman/v2/pkg/signal"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/specgen/generate"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ dfilters "github.com/containers/podman/v3/pkg/domain/filters"
+ "github.com/containers/podman/v3/pkg/signal"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/specgen/generate"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/domain/infra/abi/pods_stats.go b/pkg/domain/infra/abi/pods_stats.go
index 29bcbe087..abb15bd1f 100644
--- a/pkg/domain/infra/abi/pods_stats.go
+++ b/pkg/domain/infra/abi/pods_stats.go
@@ -4,11 +4,11 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/utils"
"github.com/docker/go-units"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/abi/runtime.go b/pkg/domain/infra/abi/runtime.go
index 3eab16479..3e7ea0d09 100644
--- a/pkg/domain/infra/abi/runtime.go
+++ b/pkg/domain/infra/abi/runtime.go
@@ -3,7 +3,7 @@ package abi
import (
"sync"
- "github.com/containers/podman/v2/libpod"
+ "github.com/containers/podman/v3/libpod"
)
// Image-related runtime linked against libpod library
diff --git a/pkg/domain/infra/abi/secrets.go b/pkg/domain/infra/abi/secrets.go
index 355971a5b..764f4a9dc 100644
--- a/pkg/domain/infra/abi/secrets.go
+++ b/pkg/domain/infra/abi/secrets.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"github.com/containers/common/pkg/secrets"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go
index f29b98696..9f7c8919b 100644
--- a/pkg/domain/infra/abi/system.go
+++ b/pkg/domain/infra/abi/system.go
@@ -12,14 +12,14 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
+ "github.com/containers/podman/v3/utils"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -82,7 +82,7 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, cmd *cobra.Command)
unitName := fmt.Sprintf("podman-%d.scope", os.Getpid())
if runsUnderSystemd || conf.Engine.CgroupManager == config.SystemdCgroupsManager {
if err := utils.RunUnderSystemdScope(os.Getpid(), "user.slice", unitName); err != nil {
- logrus.Warnf("Failed to add podman to systemd sandbox cgroup: %v", err)
+ logrus.Debugf("Failed to add podman to systemd sandbox cgroup: %v", err)
}
}
}
diff --git a/pkg/domain/infra/abi/terminal/sigproxy_linux.go b/pkg/domain/infra/abi/terminal/sigproxy_linux.go
index 2aca8f22d..26e199aee 100644
--- a/pkg/domain/infra/abi/terminal/sigproxy_linux.go
+++ b/pkg/domain/infra/abi/terminal/sigproxy_linux.go
@@ -4,10 +4,10 @@ import (
"os"
"syscall"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/shutdown"
- "github.com/containers/podman/v2/pkg/signal"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/shutdown"
+ "github.com/containers/podman/v3/pkg/signal"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/domain/infra/abi/terminal/terminal.go b/pkg/domain/infra/abi/terminal/terminal.go
index 48f5749d5..26a692a7f 100644
--- a/pkg/domain/infra/abi/terminal/terminal.go
+++ b/pkg/domain/infra/abi/terminal/terminal.go
@@ -5,7 +5,7 @@ import (
"os"
"os/signal"
- lsignal "github.com/containers/podman/v2/pkg/signal"
+ lsignal "github.com/containers/podman/v3/pkg/signal"
"github.com/moby/term"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/domain/infra/abi/terminal/terminal_linux.go b/pkg/domain/infra/abi/terminal/terminal_linux.go
index 8886625a6..e5036e769 100644
--- a/pkg/domain/infra/abi/terminal/terminal_linux.go
+++ b/pkg/domain/infra/abi/terminal/terminal_linux.go
@@ -6,8 +6,8 @@ import (
"fmt"
"os"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh/terminal"
diff --git a/pkg/domain/infra/abi/trust.go b/pkg/domain/infra/abi/trust.go
index 4a12297f9..d3aff62ba 100644
--- a/pkg/domain/infra/abi/trust.go
+++ b/pkg/domain/infra/abi/trust.go
@@ -7,8 +7,8 @@ import (
"os"
"strings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/trust"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/trust"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/domain/infra/abi/volumes.go b/pkg/domain/infra/abi/volumes.go
index f15aa2d14..e077b10ea 100644
--- a/pkg/domain/infra/abi/volumes.go
+++ b/pkg/domain/infra/abi/volumes.go
@@ -3,12 +3,12 @@ package abi
import (
"context"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/domain/filters"
- "github.com/containers/podman/v2/pkg/domain/infra/abi/parse"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/domain/filters"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi/parse"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/runtime_abi.go b/pkg/domain/infra/runtime_abi.go
index a25d165c9..ca201b5ae 100644
--- a/pkg/domain/infra/runtime_abi.go
+++ b/pkg/domain/infra/runtime_abi.go
@@ -6,11 +6,11 @@ import (
"context"
"fmt"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
- "github.com/containers/podman/v2/pkg/domain/infra/tunnel"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/pkg/domain/infra/tunnel"
)
// NewContainerEngine factory provides a libpod runtime for container-related operations
diff --git a/pkg/domain/infra/runtime_abi_unsupported.go b/pkg/domain/infra/runtime_abi_unsupported.go
index bac552b1e..e7107ff38 100644
--- a/pkg/domain/infra/runtime_abi_unsupported.go
+++ b/pkg/domain/infra/runtime_abi_unsupported.go
@@ -5,7 +5,7 @@ package infra
import (
"errors"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
// NewSystemEngine factory provides a libpod runtime for specialized system operations
diff --git a/pkg/domain/infra/runtime_libpod.go b/pkg/domain/infra/runtime_libpod.go
index b786a5fbf..8b6581c7b 100644
--- a/pkg/domain/infra/runtime_libpod.go
+++ b/pkg/domain/infra/runtime_libpod.go
@@ -9,12 +9,12 @@ import (
"os/signal"
"sync"
- "github.com/containers/podman/v2/cmd/podman/utils"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/namespaces"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/namespaces"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
"github.com/pkg/errors"
diff --git a/pkg/domain/infra/runtime_proxy.go b/pkg/domain/infra/runtime_proxy.go
index 897dbbfc0..8fe264989 100644
--- a/pkg/domain/infra/runtime_proxy.go
+++ b/pkg/domain/infra/runtime_proxy.go
@@ -5,8 +5,8 @@ package infra
import (
"context"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/abi"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
flag "github.com/spf13/pflag"
)
diff --git a/pkg/domain/infra/runtime_tunnel.go b/pkg/domain/infra/runtime_tunnel.go
index b8aefaa35..185d223b7 100644
--- a/pkg/domain/infra/runtime_tunnel.go
+++ b/pkg/domain/infra/runtime_tunnel.go
@@ -7,9 +7,9 @@ import (
"fmt"
"sync"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/infra/tunnel"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/tunnel"
)
var (
diff --git a/pkg/domain/infra/tunnel/auto-update.go b/pkg/domain/infra/tunnel/auto-update.go
index 0ebd07588..41165cc74 100644
--- a/pkg/domain/infra/tunnel/auto-update.go
+++ b/pkg/domain/infra/tunnel/auto-update.go
@@ -3,7 +3,7 @@ package tunnel
import (
"context"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index c2c282ef9..a0f65f11f 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -12,15 +12,15 @@ import (
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/docker/reference"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -82,16 +82,23 @@ func (ic *ContainerEngine) ContainerUnpause(ctx context.Context, namesOrIds []st
func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []string, opts entities.StopOptions) ([]*entities.StopReport, error) {
reports := []*entities.StopReport{}
- ctrs, err := getContainersByContext(ic.ClientCtx, opts.All, opts.Ignore, namesOrIds)
+ ctrs, rawInputs, err := getContainersAndInputByContext(ic.ClientCtx, opts.All, opts.Ignore, namesOrIds)
if err != nil {
return nil, err
}
+ ctrMap := map[string]string{}
+ for i := range ctrs {
+ ctrMap[ctrs[i].ID] = rawInputs[i]
+ }
options := new(containers.StopOptions).WithIgnore(opts.Ignore)
if to := opts.Timeout; to != nil {
options.WithTimeout(*to)
}
for _, c := range ctrs {
- report := entities.StopReport{Id: c.ID}
+ report := entities.StopReport{
+ Id: c.ID,
+ RawInput: ctrMap[c.ID],
+ }
if err = containers.Stop(ic.ClientCtx, c.ID, options); err != nil {
// These first two are considered non-fatal under the right conditions
if errors.Cause(err).Error() == define.ErrCtrStopped.Error() {
@@ -117,16 +124,21 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
}
func (ic *ContainerEngine) ContainerKill(ctx context.Context, namesOrIds []string, opts entities.KillOptions) ([]*entities.KillReport, error) {
- ctrs, err := getContainersByContext(ic.ClientCtx, opts.All, false, namesOrIds)
+ ctrs, rawInputs, err := getContainersAndInputByContext(ic.ClientCtx, opts.All, false, namesOrIds)
if err != nil {
return nil, err
}
+ ctrMap := map[string]string{}
+ for i := range ctrs {
+ ctrMap[ctrs[i].ID] = rawInputs[i]
+ }
options := new(containers.KillOptions).WithSignal(opts.Signal)
reports := make([]*entities.KillReport, 0, len(ctrs))
for _, c := range ctrs {
reports = append(reports, &entities.KillReport{
- Id: c.ID,
- Err: containers.Kill(ic.ClientCtx, c.ID, options),
+ Id: c.ID,
+ Err: containers.Kill(ic.ClientCtx, c.ID, options),
+ RawInput: ctrMap[c.ID],
})
}
return reports, nil
diff --git a/pkg/domain/infra/tunnel/events.go b/pkg/domain/infra/tunnel/events.go
index cec6c749c..6e2c3f8ba 100644
--- a/pkg/domain/infra/tunnel/events.go
+++ b/pkg/domain/infra/tunnel/events.go
@@ -4,9 +4,9 @@ import (
"context"
"strings"
- "github.com/containers/podman/v2/libpod/events"
- "github.com/containers/podman/v2/pkg/bindings/system"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod/events"
+ "github.com/containers/podman/v3/pkg/bindings/system"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go
index 6d68157c1..2484574a7 100644
--- a/pkg/domain/infra/tunnel/generate.go
+++ b/pkg/domain/infra/tunnel/generate.go
@@ -3,8 +3,8 @@ package tunnel
import (
"context"
- "github.com/containers/podman/v2/pkg/bindings/generate"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/bindings/generate"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string, opts entities.GenerateSystemdOptions) (*entities.GenerateSystemdReport, error) {
diff --git a/pkg/domain/infra/tunnel/healthcheck.go b/pkg/domain/infra/tunnel/healthcheck.go
index 3daf22647..9d37826e0 100644
--- a/pkg/domain/infra/tunnel/healthcheck.go
+++ b/pkg/domain/infra/tunnel/healthcheck.go
@@ -3,9 +3,9 @@ package tunnel
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func (ic *ContainerEngine) HealthCheckRun(ctx context.Context, nameOrID string, options entities.HealthCheckOptions) (*define.HealthCheckResults, error) {
diff --git a/pkg/domain/infra/tunnel/helpers.go b/pkg/domain/infra/tunnel/helpers.go
index e40e27596..f088d360b 100644
--- a/pkg/domain/infra/tunnel/helpers.go
+++ b/pkg/domain/infra/tunnel/helpers.go
@@ -3,27 +3,37 @@ package tunnel
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings/containers"
- "github.com/containers/podman/v2/pkg/bindings/pods"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings/containers"
+ "github.com/containers/podman/v3/pkg/bindings/pods"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/pkg/errors"
)
// FIXME: the `ignore` parameter is very likely wrong here as it should rather
// be used on *errors* from operations such as remove.
func getContainersByContext(contextWithConnection context.Context, all, ignore bool, namesOrIDs []string) ([]entities.ListContainer, error) {
+ ctrs, _, err := getContainersAndInputByContext(contextWithConnection, all, ignore, namesOrIDs)
+ return ctrs, err
+}
+
+func getContainersAndInputByContext(contextWithConnection context.Context, all, ignore bool, namesOrIDs []string) ([]entities.ListContainer, []string, error) {
if all && len(namesOrIDs) > 0 {
- return nil, errors.New("cannot lookup containers and all")
+ return nil, nil, errors.New("cannot lookup containers and all")
}
options := new(containers.ListOptions).WithAll(true).WithSync(true)
allContainers, err := containers.List(contextWithConnection, options)
if err != nil {
- return nil, err
+ return nil, nil, err
}
+ rawInputs := []string{}
if all {
- return allContainers, err
+ for i := range allContainers {
+ rawInputs = append(rawInputs, allContainers[i].ID)
+ }
+
+ return allContainers, rawInputs, err
}
// Note: it would be nicer if the lists endpoint would support that as
@@ -42,7 +52,7 @@ func getContainersByContext(contextWithConnection context.Context, all, ignore b
if ignore && errorhandling.Contains(err, define.ErrNoSuchCtr) {
continue
}
- return nil, err
+ return nil, nil, err
}
// Now we can do a full match of the ID to find the right
@@ -52,16 +62,17 @@ func getContainersByContext(contextWithConnection context.Context, all, ignore b
for _, ctr := range allContainers {
if ctr.ID == inspectData.ID {
filtered = append(filtered, ctr)
+ rawInputs = append(rawInputs, nameOrID)
found = true
break
}
}
if !found && !ignore {
- return nil, errors.Wrapf(define.ErrNoSuchCtr, "unable to find container %q", nameOrID)
+ return nil, nil, errors.Wrapf(define.ErrNoSuchCtr, "unable to find container %q", nameOrID)
}
}
- return filtered, nil
+ return filtered, rawInputs, nil
}
func getPodsByContext(contextWithConnection context.Context, all bool, namesOrIDs []string) ([]*entities.ListPodsReport, error) {
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index c6faaa9bb..90b6e104b 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -11,13 +11,13 @@ import (
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/docker/reference"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/libpod/image"
- images "github.com/containers/podman/v2/pkg/bindings/images"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/domain/utils"
- "github.com/containers/podman/v2/pkg/errorhandling"
- utils2 "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/libpod/image"
+ images "github.com/containers/podman/v3/pkg/bindings/images"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/domain/utils"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ utils2 "github.com/containers/podman/v3/utils"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/tunnel/manifest.go b/pkg/domain/infra/tunnel/manifest.go
index e261afee2..8ac1f1420 100644
--- a/pkg/domain/infra/tunnel/manifest.go
+++ b/pkg/domain/infra/tunnel/manifest.go
@@ -7,9 +7,9 @@ import (
"strings"
"github.com/containers/image/v5/types"
- images "github.com/containers/podman/v2/pkg/bindings/images"
- "github.com/containers/podman/v2/pkg/bindings/manifests"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ images "github.com/containers/podman/v3/pkg/bindings/images"
+ "github.com/containers/podman/v3/pkg/bindings/manifests"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/tunnel/network.go b/pkg/domain/infra/tunnel/network.go
index 990bfa880..adf34460c 100644
--- a/pkg/domain/infra/tunnel/network.go
+++ b/pkg/domain/infra/tunnel/network.go
@@ -3,9 +3,9 @@ package tunnel
import (
"context"
- "github.com/containers/podman/v2/pkg/bindings/network"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/bindings/network"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/tunnel/play.go b/pkg/domain/infra/tunnel/play.go
index 2318b9caa..9f9076114 100644
--- a/pkg/domain/infra/tunnel/play.go
+++ b/pkg/domain/infra/tunnel/play.go
@@ -4,8 +4,8 @@ import (
"context"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/pkg/bindings/play"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/bindings/play"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func (ic *ContainerEngine) PlayKube(ctx context.Context, path string, opts entities.PlayKubeOptions) (*entities.PlayKubeReport, error) {
diff --git a/pkg/domain/infra/tunnel/pods.go b/pkg/domain/infra/tunnel/pods.go
index d61c95d57..82f062b2c 100644
--- a/pkg/domain/infra/tunnel/pods.go
+++ b/pkg/domain/infra/tunnel/pods.go
@@ -3,11 +3,11 @@ package tunnel
import (
"context"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings/pods"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings/pods"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/tunnel/secrets.go b/pkg/domain/infra/tunnel/secrets.go
index 336297528..1153f490e 100644
--- a/pkg/domain/infra/tunnel/secrets.go
+++ b/pkg/domain/infra/tunnel/secrets.go
@@ -4,9 +4,9 @@ import (
"context"
"io"
- "github.com/containers/podman/v2/pkg/bindings/secrets"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/bindings/secrets"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/pkg/errors"
)
diff --git a/pkg/domain/infra/tunnel/system.go b/pkg/domain/infra/tunnel/system.go
index a46b164a5..d2c5063c9 100644
--- a/pkg/domain/infra/tunnel/system.go
+++ b/pkg/domain/infra/tunnel/system.go
@@ -4,9 +4,9 @@ import (
"context"
"errors"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings/system"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/bindings/system"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/spf13/cobra"
)
diff --git a/pkg/domain/infra/tunnel/trust.go b/pkg/domain/infra/tunnel/trust.go
index cf0faaf67..e0bd535ec 100644
--- a/pkg/domain/infra/tunnel/trust.go
+++ b/pkg/domain/infra/tunnel/trust.go
@@ -4,7 +4,7 @@ import (
"context"
"errors"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
)
func (ir *ImageEngine) ShowTrust(ctx context.Context, args []string, options entities.ShowTrustOptions) (*entities.ShowTrustReport, error) {
diff --git a/pkg/domain/infra/tunnel/volumes.go b/pkg/domain/infra/tunnel/volumes.go
index ffd2c1d35..2d231bad6 100644
--- a/pkg/domain/infra/tunnel/volumes.go
+++ b/pkg/domain/infra/tunnel/volumes.go
@@ -3,10 +3,10 @@ package tunnel
import (
"context"
- "github.com/containers/podman/v2/pkg/bindings/volumes"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/bindings/volumes"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/pkg/errors"
)
diff --git a/pkg/hooks/0.1.0/hook.go b/pkg/hooks/0.1.0/hook.go
index 97eec8bb1..fb5760172 100644
--- a/pkg/hooks/0.1.0/hook.go
+++ b/pkg/hooks/0.1.0/hook.go
@@ -6,7 +6,7 @@ import (
"errors"
"strings"
- current "github.com/containers/podman/v2/pkg/hooks/1.0.0"
+ current "github.com/containers/podman/v3/pkg/hooks/1.0.0"
rspec "github.com/opencontainers/runtime-spec/specs-go"
)
diff --git a/pkg/hooks/0.1.0/hook_test.go b/pkg/hooks/0.1.0/hook_test.go
index dcc083f97..637aad638 100644
--- a/pkg/hooks/0.1.0/hook_test.go
+++ b/pkg/hooks/0.1.0/hook_test.go
@@ -3,7 +3,7 @@ package hook
import (
"testing"
- current "github.com/containers/podman/v2/pkg/hooks/1.0.0"
+ current "github.com/containers/podman/v3/pkg/hooks/1.0.0"
rspec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/stretchr/testify/assert"
)
diff --git a/pkg/hooks/hooks.go b/pkg/hooks/hooks.go
index 6cb81e573..f49195f65 100644
--- a/pkg/hooks/hooks.go
+++ b/pkg/hooks/hooks.go
@@ -9,7 +9,7 @@ import (
"strings"
"sync"
- current "github.com/containers/podman/v2/pkg/hooks/1.0.0"
+ current "github.com/containers/podman/v3/pkg/hooks/1.0.0"
rspec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/hooks/hooks_test.go b/pkg/hooks/hooks_test.go
index a2a110cf5..f7b00dd3d 100644
--- a/pkg/hooks/hooks_test.go
+++ b/pkg/hooks/hooks_test.go
@@ -9,7 +9,7 @@ import (
"runtime"
"testing"
- current "github.com/containers/podman/v2/pkg/hooks/1.0.0"
+ current "github.com/containers/podman/v3/pkg/hooks/1.0.0"
rspec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/stretchr/testify/assert"
)
diff --git a/pkg/hooks/monitor.go b/pkg/hooks/monitor.go
index 5fa93c93a..6fa94cd17 100644
--- a/pkg/hooks/monitor.go
+++ b/pkg/hooks/monitor.go
@@ -3,7 +3,7 @@ package hooks
import (
"context"
- current "github.com/containers/podman/v2/pkg/hooks/1.0.0"
+ current "github.com/containers/podman/v3/pkg/hooks/1.0.0"
"github.com/fsnotify/fsnotify"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/hooks/read.go b/pkg/hooks/read.go
index fec37bc6a..e7e5aa66f 100644
--- a/pkg/hooks/read.go
+++ b/pkg/hooks/read.go
@@ -8,8 +8,8 @@ import (
"path/filepath"
"strings"
- old "github.com/containers/podman/v2/pkg/hooks/0.1.0"
- current "github.com/containers/podman/v2/pkg/hooks/1.0.0"
+ old "github.com/containers/podman/v3/pkg/hooks/0.1.0"
+ current "github.com/containers/podman/v3/pkg/hooks/1.0.0"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/hooks/read_test.go b/pkg/hooks/read_test.go
index ef145f0eb..9f4de049e 100644
--- a/pkg/hooks/read_test.go
+++ b/pkg/hooks/read_test.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"testing"
- current "github.com/containers/podman/v2/pkg/hooks/1.0.0"
+ current "github.com/containers/podman/v3/pkg/hooks/1.0.0"
rspec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/stretchr/testify/assert"
)
diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go
index 67c6a5c03..5caeae1f0 100644
--- a/pkg/inspect/inspect.go
+++ b/pkg/inspect/inspect.go
@@ -4,7 +4,7 @@ import (
"time"
"github.com/containers/image/v5/manifest"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
)
diff --git a/pkg/netns/netns_linux.go b/pkg/netns/netns_linux.go
index 95b50e073..0b7d1782c 100644
--- a/pkg/netns/netns_linux.go
+++ b/pkg/netns/netns_linux.go
@@ -29,8 +29,8 @@ import (
"sync"
"github.com/containernetworking/plugins/pkg/ns"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)
diff --git a/pkg/parallel/ctr/ctr.go b/pkg/parallel/ctr/ctr.go
index e8c1292b8..16999fabf 100644
--- a/pkg/parallel/ctr/ctr.go
+++ b/pkg/parallel/ctr/ctr.go
@@ -3,8 +3,8 @@ package ctr
import (
"context"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/parallel"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/parallel"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/ps/ps.go b/pkg/ps/ps.go
index 42f9e1d39..b31978638 100644
--- a/pkg/ps/ps.go
+++ b/pkg/ps/ps.go
@@ -9,11 +9,11 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/filters"
- psdefine "github.com/containers/podman/v2/pkg/ps/define"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/filters"
+ psdefine "github.com/containers/podman/v3/pkg/ps/define"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/registrar/registrar_test.go b/pkg/registrar/registrar_test.go
index 4b13b9365..dc9942e80 100644
--- a/pkg/registrar/registrar_test.go
+++ b/pkg/registrar/registrar_test.go
@@ -3,8 +3,8 @@ package registrar_test
import (
"testing"
- "github.com/containers/podman/v2/pkg/registrar"
- . "github.com/containers/podman/v2/test/framework"
+ "github.com/containers/podman/v3/pkg/registrar"
+ . "github.com/containers/podman/v3/test/framework"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/pkg/registries/registries.go b/pkg/registries/registries.go
index 949c5d835..bf5dee2ce 100644
--- a/pkg/registries/registries.go
+++ b/pkg/registries/registries.go
@@ -11,7 +11,7 @@ import (
"github.com/containers/image/v5/pkg/sysregistriesv2"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
)
diff --git a/pkg/resolvconf/resolvconf.go b/pkg/resolvconf/resolvconf.go
index 27564439e..cfaedc74a 100644
--- a/pkg/resolvconf/resolvconf.go
+++ b/pkg/resolvconf/resolvconf.go
@@ -9,7 +9,7 @@ import (
"strings"
"sync"
- "github.com/containers/podman/v2/pkg/resolvconf/dns"
+ "github.com/containers/podman/v3/pkg/resolvconf/dns"
"github.com/containers/storage/pkg/ioutils"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index 2e1fddc48..d93e4c10c 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -196,7 +196,11 @@ can_use_shortcut ()
return false;
if (strstr (argv[0], "podman") == NULL)
- return false;
+ {
+ free (argv[0]);
+ free (argv);
+ return false;
+ }
for (argc = 0; argv[argc]; argc++)
{
@@ -394,7 +398,7 @@ static void __attribute__((constructor)) init()
if (chdir (cwd) < 0)
{
- fprintf (stderr, "cannot chdir: %s\n", strerror (errno));
+ fprintf (stderr, "cannot chdir to %s: %s\n", cwd, strerror (errno));
_exit (EXIT_FAILURE);
}
@@ -685,7 +689,7 @@ reexec_userns_join (int pid_to_join, char *pause_pid_file_path)
if (chdir (cwd) < 0)
{
- fprintf (stderr, "cannot chdir: %s\n", strerror (errno));
+ fprintf (stderr, "cannot chdir to %s: %s\n", cwd, strerror (errno));
_exit (EXIT_FAILURE);
}
free (cwd);
@@ -889,7 +893,7 @@ reexec_in_user_namespace (int ready, char *pause_pid_file_path, char *file_to_re
if (chdir (cwd) < 0)
{
- fprintf (stderr, "cannot chdir: %s\n", strerror (errno));
+ fprintf (stderr, "cannot chdir to %s: %s\n", cwd, strerror (errno));
TEMP_FAILURE_RETRY (write (ready, "1", 1));
_exit (EXIT_FAILURE);
}
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index d4b1a0dfd..dda230dbc 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -16,7 +16,7 @@ import (
"sync"
"unsafe"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/errorhandling"
"github.com/containers/storage/pkg/idtools"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/specgen/config_unsupported.go b/pkg/specgen/config_unsupported.go
index 85ff1e9fd..3d89e49f8 100644
--- a/pkg/specgen/config_unsupported.go
+++ b/pkg/specgen/config_unsupported.go
@@ -3,7 +3,7 @@
package specgen
import (
- "github.com/containers/podman/v2/libpod/image"
+ "github.com/containers/podman/v3/libpod/image"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
diff --git a/pkg/specgen/container_validate.go b/pkg/specgen/container_validate.go
index 042e20e02..caea51ea8 100644
--- a/pkg/specgen/container_validate.go
+++ b/pkg/specgen/container_validate.go
@@ -4,9 +4,9 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
diff --git a/pkg/specgen/generate/config_linux.go b/pkg/specgen/generate/config_linux.go
index b9f024814..2792d0cb7 100644
--- a/pkg/specgen/generate/config_linux.go
+++ b/pkg/specgen/generate/config_linux.go
@@ -8,8 +8,8 @@ import (
"path/filepath"
"strings"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
"github.com/pkg/errors"
diff --git a/pkg/specgen/generate/config_linux_cgo.go b/pkg/specgen/generate/config_linux_cgo.go
index 7a53cb01c..41f03d5b6 100644
--- a/pkg/specgen/generate/config_linux_cgo.go
+++ b/pkg/specgen/generate/config_linux_cgo.go
@@ -7,9 +7,9 @@ import (
"io/ioutil"
goSeccomp "github.com/containers/common/pkg/seccomp"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/seccomp"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/seccomp"
+ "github.com/containers/podman/v3/pkg/specgen"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/specgen/generate/config_linux_nocgo.go b/pkg/specgen/generate/config_linux_nocgo.go
index 184122aeb..0867988b6 100644
--- a/pkg/specgen/generate/config_linux_nocgo.go
+++ b/pkg/specgen/generate/config_linux_nocgo.go
@@ -5,8 +5,8 @@ package generate
import (
"errors"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/specgen"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go
index f2af9dd5f..3d20ed8ff 100644
--- a/pkg/specgen/generate/container.go
+++ b/pkg/specgen/generate/container.go
@@ -6,12 +6,12 @@ import (
"strings"
"github.com/containers/image/v5/manifest"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/image"
- ann "github.com/containers/podman/v2/pkg/annotations"
- envLib "github.com/containers/podman/v2/pkg/env"
- "github.com/containers/podman/v2/pkg/signal"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/image"
+ ann "github.com/containers/podman/v3/pkg/annotations"
+ envLib "github.com/containers/podman/v3/pkg/env"
+ "github.com/containers/podman/v3/pkg/signal"
+ "github.com/containers/podman/v3/pkg/specgen"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index 74291325c..3b7112959 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -7,10 +7,10 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go
index e04ced3d3..d61c8bd19 100644
--- a/pkg/specgen/generate/kube/kube.go
+++ b/pkg/specgen/generate/kube/kube.go
@@ -7,10 +7,10 @@ import (
"strings"
"github.com/containers/common/pkg/parse"
- "github.com/containers/podman/v2/libpod/image"
- ann "github.com/containers/podman/v2/pkg/annotations"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod/image"
+ ann "github.com/containers/podman/v3/pkg/annotations"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
diff --git a/pkg/specgen/generate/kube/seccomp.go b/pkg/specgen/generate/kube/seccomp.go
index 353f9cbf2..da15cf519 100644
--- a/pkg/specgen/generate/kube/seccomp.go
+++ b/pkg/specgen/generate/kube/seccomp.go
@@ -4,7 +4,7 @@ import (
"path/filepath"
"strings"
- "github.com/containers/podman/v2/libpod"
+ "github.com/containers/podman/v3/libpod"
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
)
diff --git a/pkg/specgen/generate/kube/volume.go b/pkg/specgen/generate/kube/volume.go
index c3241a49e..e4f3eb196 100644
--- a/pkg/specgen/generate/kube/volume.go
+++ b/pkg/specgen/generate/kube/volume.go
@@ -4,7 +4,7 @@ import (
"os"
"github.com/containers/common/pkg/parse"
- "github.com/containers/podman/v2/libpod"
+ "github.com/containers/podman/v3/libpod"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
diff --git a/pkg/specgen/generate/namespaces.go b/pkg/specgen/generate/namespaces.go
index f66ad6101..b87375a92 100644
--- a/pkg/specgen/generate/namespaces.go
+++ b/pkg/specgen/generate/namespaces.go
@@ -7,12 +7,12 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
"github.com/pkg/errors"
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index 1a0ec08a5..23a9ce831 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -5,11 +5,11 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/specgen"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
"github.com/pkg/errors"
@@ -105,7 +105,10 @@ func makeCommand(ctx context.Context, s *specgen.SpecGenerator, img *image.Image
entrypoint = newEntry
}
- finalCommand = append(finalCommand, entrypoint...)
+ // Don't append the entrypoint if it is [""]
+ if len(entrypoint) != 1 || entrypoint[0] != "" {
+ finalCommand = append(finalCommand, entrypoint...)
+ }
// Only use image command if the user did not manually set an
// entrypoint.
diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go
index 645bf7a47..5d7bf1930 100644
--- a/pkg/specgen/generate/pod_create.go
+++ b/pkg/specgen/generate/pod_create.go
@@ -3,8 +3,8 @@ package generate
import (
"context"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/pkg/specgen/generate/ports.go b/pkg/specgen/generate/ports.go
index 83ded059f..6cf83ed81 100644
--- a/pkg/specgen/generate/ports.go
+++ b/pkg/specgen/generate/ports.go
@@ -6,8 +6,8 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/specgen"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/specgen/generate/security.go b/pkg/specgen/generate/security.go
index fb45d87db..56aac8bfd 100644
--- a/pkg/specgen/generate/security.go
+++ b/pkg/specgen/generate/security.go
@@ -6,11 +6,11 @@ import (
"github.com/containers/common/pkg/apparmor"
"github.com/containers/common/pkg/capabilities"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/opencontainers/runtime-tools/generate"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
diff --git a/pkg/specgen/generate/storage.go b/pkg/specgen/generate/storage.go
index 63713726e..0bb1421f6 100644
--- a/pkg/specgen/generate/storage.go
+++ b/pkg/specgen/generate/storage.go
@@ -9,10 +9,10 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/libpod/image"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/pkg/util"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/pkg/specgen/generate/validate.go b/pkg/specgen/generate/validate.go
index 77cccad3e..50efe7fa3 100644
--- a/pkg/specgen/generate/validate.go
+++ b/pkg/specgen/generate/validate.go
@@ -5,9 +5,9 @@ import (
"path/filepath"
"github.com/containers/common/pkg/sysinfo"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/specgen"
- "github.com/containers/podman/v2/utils"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/specgen"
+ "github.com/containers/podman/v3/utils"
"github.com/pkg/errors"
)
diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go
index 9d78a0210..fb7d65da4 100644
--- a/pkg/specgen/namespaces.go
+++ b/pkg/specgen/namespaces.go
@@ -3,8 +3,8 @@ package specgen
import (
"strings"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
)
diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go
index c9bcdf623..c746bcd1a 100644
--- a/pkg/specgen/pod_validate.go
+++ b/pkg/specgen/pod_validate.go
@@ -1,8 +1,8 @@
package specgen
import (
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/util"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/util"
"github.com/pkg/errors"
)
diff --git a/pkg/systemd/dbus.go b/pkg/systemd/dbus.go
index 60712bd6f..718082526 100644
--- a/pkg/systemd/dbus.go
+++ b/pkg/systemd/dbus.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"strconv"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/coreos/go-systemd/v22/dbus"
godbus "github.com/godbus/dbus/v5"
)
diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go
index acee7be65..4fb437d08 100644
--- a/pkg/systemd/generate/containers.go
+++ b/pkg/systemd/generate/containers.go
@@ -9,9 +9,9 @@ import (
"text/template"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/version"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/version"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"
diff --git a/pkg/systemd/generate/containers_test.go b/pkg/systemd/generate/containers_test.go
index dad14ece9..c007c6eb4 100644
--- a/pkg/systemd/generate/containers_test.go
+++ b/pkg/systemd/generate/containers_test.go
@@ -3,7 +3,7 @@ package generate
import (
"testing"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/stretchr/testify/assert"
)
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go
index ff8ce3a03..343b3c902 100644
--- a/pkg/systemd/generate/pods.go
+++ b/pkg/systemd/generate/pods.go
@@ -9,9 +9,9 @@ import (
"text/template"
"time"
- "github.com/containers/podman/v2/libpod"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/version"
+ "github.com/containers/podman/v3/libpod"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/version"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"
diff --git a/pkg/systemd/generate/pods_test.go b/pkg/systemd/generate/pods_test.go
index 2b430226b..068df38d9 100644
--- a/pkg/systemd/generate/pods_test.go
+++ b/pkg/systemd/generate/pods_test.go
@@ -3,7 +3,7 @@ package generate
import (
"testing"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/stretchr/testify/assert"
)
diff --git a/pkg/util/utils.go b/pkg/util/utils.go
index 32bb66332..c6ecd91f6 100644
--- a/pkg/util/utils.go
+++ b/pkg/util/utils.go
@@ -16,10 +16,10 @@ import (
"github.com/BurntSushi/toml"
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/types"
- "github.com/containers/podman/v2/pkg/errorhandling"
- "github.com/containers/podman/v2/pkg/namespaces"
- "github.com/containers/podman/v2/pkg/rootless"
- "github.com/containers/podman/v2/pkg/signal"
+ "github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/namespaces"
+ "github.com/containers/podman/v3/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/signal"
"github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
diff --git a/pkg/util/utils_supported.go b/pkg/util/utils_supported.go
index 21022eb7c..cb992d8b6 100644
--- a/pkg/util/utils_supported.go
+++ b/pkg/util/utils_supported.go
@@ -11,7 +11,7 @@ import (
"path/filepath"
"syscall"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index 693c34ced..a650cf958 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -45,6 +45,13 @@ t POST "images/create?fromImage=alpine" '' 200 .error=null .status~".*Download c
t POST "images/create?fromImage=alpine&tag=latest" '' 200
+# Make sure that new images are pulled
+old_iid=$(podman image inspect --format "{{.ID}}" docker.io/library/alpine:latest)
+podman rmi -f docker.io/library/alpine:latest
+podman tag $IMAGE docker.io/library/alpine:latest
+t POST "images/create?fromImage=alpine" '' 200 .error=null .status~".*$old_iid.*"
+podman untag $IMAGE docker.io/library/alpine:latest
+
t POST "images/create?fromImage=quay.io/libpod/alpine&tag=sha256:fa93b01658e3a5a1686dc3ae55f170d8de487006fb53a28efcd12ab0710a2e5f" '' 200
# Display the image history
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 0da196e46..a99e9a184 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -63,7 +63,7 @@ cid=$(jq -r '.Id' <<<"$output")
# Prior to the fix in #6835, this would fail 500 "args must not be empty"
t POST libpod/containers/${cid}/start '' 204
# Container should exit almost immediately. Wait for it, confirm successful run
-t POST libpod/containers/${cid}/wait '' 200 '0'
+t POST "libpod/containers/${cid}/wait?condition=stopped&condition=exited" '' 200 '0'
t GET libpod/containers/${cid}/json 200 \
.Id=$cid \
.State.Status~\\\(exited\\\|stopped\\\) \
diff --git a/test/e2e/attach_test.go b/test/e2e/attach_test.go
index 0c27e05c7..146ff27a5 100644
--- a/test/e2e/attach_test.go
+++ b/test/e2e/attach_test.go
@@ -5,7 +5,7 @@ import (
"syscall"
"time"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index bdd35db8f..c733db61c 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -8,7 +8,7 @@ import (
"strings"
"github.com/containers/buildah"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go
index 3270ce685..9d0049910 100644
--- a/test/e2e/checkpoint_test.go
+++ b/test/e2e/checkpoint_test.go
@@ -6,8 +6,8 @@ import (
"os/exec"
"strings"
- "github.com/containers/podman/v2/pkg/criu"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/criu"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go
index 8760978fd..0d3f2bed7 100644
--- a/test/e2e/commit_test.go
+++ b/test/e2e/commit_test.go
@@ -5,7 +5,7 @@ import (
"os"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go
index d033cc646..70ffdebea 100644
--- a/test/e2e/common_test.go
+++ b/test/e2e/common_test.go
@@ -15,11 +15,11 @@ import (
"testing"
"time"
- "github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/inspect"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/inspect"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage"
"github.com/containers/storage/pkg/reexec"
"github.com/containers/storage/pkg/stringid"
@@ -436,13 +436,20 @@ func (p *PodmanTestIntegration) RunLsContainerInPod(name, pod string) (*PodmanSe
// BuildImage uses podman build and buildah to build an image
// called imageName based on a string dockerfile
-func (p *PodmanTestIntegration) BuildImage(dockerfile, imageName string, layers string) {
+func (p *PodmanTestIntegration) BuildImage(dockerfile, imageName string, layers string) string {
dockerfilePath := filepath.Join(p.TempDir, "Dockerfile")
err := ioutil.WriteFile(dockerfilePath, []byte(dockerfile), 0755)
Expect(err).To(BeNil())
- session := p.Podman([]string{"build", "--layers=" + layers, "-t", imageName, "--file", dockerfilePath, p.TempDir})
+ cmd := []string{"build", "--layers=" + layers, "--file", dockerfilePath}
+ if len(imageName) > 0 {
+ cmd = append(cmd, []string{"-t", imageName}...)
+ }
+ cmd = append(cmd, p.TempDir)
+ session := p.Podman(cmd)
session.Wait(240)
Expect(session).Should(Exit(0), fmt.Sprintf("BuildImage session output: %q", session.OutputToString()))
+ output := session.OutputToStringArray()
+ return output[len(output)-1]
}
// PodmanPID execs podman and returns its PID
diff --git a/test/e2e/container_inspect_test.go b/test/e2e/container_inspect_test.go
index e84fd9f2e..840f13e3d 100644
--- a/test/e2e/container_inspect_test.go
+++ b/test/e2e/container_inspect_test.go
@@ -3,8 +3,8 @@ package integration
import (
"os"
- "github.com/containers/podman/v2/pkg/annotations"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/annotations"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go
index c78c93b8c..9c2260c5f 100644
--- a/test/e2e/containers_conf_test.go
+++ b/test/e2e/containers_conf_test.go
@@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go
index f81323847..c0fb3f887 100644
--- a/test/e2e/cp_test.go
+++ b/test/e2e/cp_test.go
@@ -7,7 +7,7 @@ import (
"os/user"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/create_staticip_test.go b/test/e2e/create_staticip_test.go
index 698bbf976..340ea31f3 100644
--- a/test/e2e/create_staticip_test.go
+++ b/test/e2e/create_staticip_test.go
@@ -4,8 +4,8 @@ import (
"os"
"time"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/create_staticmac_test.go b/test/e2e/create_staticmac_test.go
index 4c8f371a4..1df93553d 100644
--- a/test/e2e/create_staticmac_test.go
+++ b/test/e2e/create_staticmac_test.go
@@ -3,8 +3,8 @@ package integration
import (
"os"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 67c08ac09..43da95a9d 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -8,7 +8,7 @@ import (
"runtime"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/diff_test.go b/test/e2e/diff_test.go
index 6a71f4d70..4370a2127 100644
--- a/test/e2e/diff_test.go
+++ b/test/e2e/diff_test.go
@@ -4,7 +4,7 @@ import (
"os"
"sort"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go
index 0c7a1bd66..4dbbe9dd8 100644
--- a/test/e2e/events_test.go
+++ b/test/e2e/events_test.go
@@ -8,7 +8,7 @@ import (
"sync"
"time"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go
index b180d881a..2ffb5cd2e 100644
--- a/test/e2e/exec_test.go
+++ b/test/e2e/exec_test.go
@@ -5,7 +5,7 @@ import (
"os"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/exists_test.go b/test/e2e/exists_test.go
index 306e8c250..f0a55dd94 100644
--- a/test/e2e/exists_test.go
+++ b/test/e2e/exists_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
diff --git a/test/e2e/export_test.go b/test/e2e/export_test.go
index 4faacd626..61aebb5f2 100644
--- a/test/e2e/export_test.go
+++ b/test/e2e/export_test.go
@@ -4,7 +4,7 @@ import (
"os"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index cd949c666..d7c697f28 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"strconv"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/ghodss/yaml"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/generate_systemd_test.go b/test/e2e/generate_systemd_test.go
index 606d756b0..d164b6021 100644
--- a/test/e2e/generate_systemd_test.go
+++ b/test/e2e/generate_systemd_test.go
@@ -4,7 +4,7 @@ import (
"io/ioutil"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -235,6 +235,29 @@ var _ = Describe("Podman generate systemd", func() {
session := podmanTest.Podman([]string{"generate", "systemd", "--time", "42", "--name", "--new", "foo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(" pod create "))
+ })
+
+ It("podman generate systemd --new=false pod", func() {
+ n := podmanTest.Podman([]string{"pod", "create", "--name", "foo"})
+ n.WaitWithDefaultTimeout()
+ Expect(n.ExitCode()).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"generate", "systemd", "--time", "42", "--name", "--new=false", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).NotTo(ContainSubstring(" pod create "))
+ })
+
+ It("podman generate systemd --new=true pod", func() {
+ n := podmanTest.Podman([]string{"pod", "create", "--name", "foo"})
+ n.WaitWithDefaultTimeout()
+ Expect(n.ExitCode()).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"generate", "systemd", "--time", "42", "--name", "--new=true", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(" pod create "))
})
It("podman generate systemd --container-prefix con", func() {
diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go
index 403f15fa7..ed7958323 100644
--- a/test/e2e/healthcheck_run_test.go
+++ b/test/e2e/healthcheck_run_test.go
@@ -5,7 +5,7 @@ import (
"os"
"time"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/history_test.go b/test/e2e/history_test.go
index 1c57c60de..e2cf62d9a 100644
--- a/test/e2e/history_test.go
+++ b/test/e2e/history_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/image_sign_test.go b/test/e2e/image_sign_test.go
index 57739419c..704a78685 100644
--- a/test/e2e/image_sign_test.go
+++ b/test/e2e/image_sign_test.go
@@ -6,7 +6,7 @@ import (
"os/exec"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index 64d2ee3f3..29be505b7 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -6,7 +6,7 @@ import (
"sort"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/docker/go-units"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/import_test.go b/test/e2e/import_test.go
index bd465bf38..1f1b23bd0 100644
--- a/test/e2e/import_test.go
+++ b/test/e2e/import_test.go
@@ -4,7 +4,7 @@ import (
"os"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/info_test.go b/test/e2e/info_test.go
index bc4e6212b..3ce294b30 100644
--- a/test/e2e/info_test.go
+++ b/test/e2e/info_test.go
@@ -8,7 +8,7 @@ import (
"os/user"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
diff --git a/test/e2e/init_test.go b/test/e2e/init_test.go
index 3e64cfda2..d283e1f9a 100644
--- a/test/e2e/init_test.go
+++ b/test/e2e/init_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go
index 12bc886a8..d417fc49d 100644
--- a/test/e2e/inspect_test.go
+++ b/test/e2e/inspect_test.go
@@ -4,7 +4,7 @@ import (
"os"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
diff --git a/test/e2e/kill_test.go b/test/e2e/kill_test.go
index c1c1b003e..a9f21fa70 100644
--- a/test/e2e/kill_test.go
+++ b/test/e2e/kill_test.go
@@ -4,7 +4,7 @@ import (
"io/ioutil"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -51,6 +51,19 @@ var _ = Describe("Podman kill", func() {
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
})
+ It("podman container kill a running container by short id", func() {
+ session := podmanTest.RunTopContainer("")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ cid := session.OutputToString()
+
+ result := podmanTest.Podman([]string{"container", "kill", cid[:5]})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(result.OutputToString()).To(Equal(cid[:5]))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
+ })
+
It("podman kill a running container by id", func() {
session := podmanTest.RunTopContainer("")
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/libpod_suite_remote_test.go b/test/e2e/libpod_suite_remote_test.go
index da57bb4c0..a26765ee9 100644
--- a/test/e2e/libpod_suite_remote_test.go
+++ b/test/e2e/libpod_suite_remote_test.go
@@ -15,7 +15,7 @@ import (
"syscall"
"time"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/rootless"
"github.com/onsi/ginkgo"
)
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go
index ffbb9b44f..267f18b0a 100644
--- a/test/e2e/load_test.go
+++ b/test/e2e/load_test.go
@@ -5,7 +5,7 @@ import (
"os"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/login_logout_test.go b/test/e2e/login_logout_test.go
index a2e88ecd2..99876de29 100644
--- a/test/e2e/login_logout_test.go
+++ b/test/e2e/login_logout_test.go
@@ -9,7 +9,7 @@ import (
"strconv"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/config"
. "github.com/onsi/gomega"
diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go
index b370aeec1..8f695279a 100644
--- a/test/e2e/logs_test.go
+++ b/test/e2e/logs_test.go
@@ -6,7 +6,7 @@ import (
"os/exec"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
@@ -36,345 +36,341 @@ var _ = Describe("Podman logs", func() {
})
- It("all lines", func() {
- logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
-
- cid := logc.OutputToString()
- results := podmanTest.Podman([]string{"logs", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(3))
- })
-
- It("tail two lines", func() {
- logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--tail", "2", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(2))
- })
-
- It("tail zero lines", func() {
- logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--tail", "0", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(0))
- })
-
- It("tail 800 lines", func() {
- logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "i=1; while [ \"$i\" -ne 1000 ]; do echo \"line $i\"; i=$((i + 1)); done"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--tail", "800", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(800))
- })
-
- It("tail 2 lines with timestamps", func() {
- logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--tail", "2", "-t", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(2))
- })
-
- It("since time 2017-08-07", func() {
- logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--since", "2017-08-07T10:10:09.056611202-04:00", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(3))
- })
-
- It("since duration 10m", func() {
- logc := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--since", "10m", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(3))
- })
-
- It("latest and container name should fail", func() {
- results := podmanTest.Podman([]string{"logs", "-l", "foobar"})
- results.WaitWithDefaultTimeout()
- Expect(results).To(ExitWithError())
- })
-
- It("two containers showing short container IDs", func() {
- SkipIfRemote("FIXME: podman-remote logs does not support showing two containers at the same time")
- log1 := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- log1.WaitWithDefaultTimeout()
- Expect(log1.ExitCode()).To(Equal(0))
- cid1 := log1.OutputToString()
-
- log2 := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- log2.WaitWithDefaultTimeout()
- Expect(log2.ExitCode()).To(Equal(0))
- cid2 := log2.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", cid1, cid2})
- results.WaitWithDefaultTimeout()
- Expect(results).Should(Exit(0))
-
- output := results.OutputToStringArray()
- Expect(len(output)).To(Equal(6))
- Expect(strings.Contains(output[0], cid1[:12]) || strings.Contains(output[0], cid2[:12])).To(BeTrue())
- })
-
- It("podman logs on a created container should result in 0 exit code", func() {
- session := podmanTest.Podman([]string{"create", "-t", "--name", "log", ALPINE})
- session.WaitWithDefaultTimeout()
- Expect(session).To(Exit(0))
-
- results := podmanTest.Podman([]string{"logs", "log"})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- })
+ for _, log := range []string{"k8s-file", "journald", "json-file"} {
+ It("all lines: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+
+ cid := logc.OutputToString()
+ results := podmanTest.Podman([]string{"logs", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(3))
+ })
+
+ It("tail two lines: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--tail", "2", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(2))
+ })
+
+ It("tail zero lines: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--tail", "0", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(0))
+ })
+
+ It("tail 800 lines: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "i=1; while [ \"$i\" -ne 1000 ]; do echo \"line $i\"; i=$((i + 1)); done"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--tail", "800", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(800))
+ })
+
+ It("tail 2 lines with timestamps: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--tail", "2", "-t", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(2))
+ })
+
+ It("since time 2017-08-07: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--since", "2017-08-07T10:10:09.056611202-04:00", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(3))
+ })
+
+ It("since duration 10m: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--since", "10m", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(3))
+ })
+
+ It("latest and container name should fail: "+log, func() {
+ results := podmanTest.Podman([]string{"logs", "-l", "foobar"})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(ExitWithError())
+ })
+
+ It("two containers showing short container IDs: "+log, func() {
+ SkipIfRemote("FIXME: podman-remote logs does not support showing two containers at the same time")
+ log1 := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ log1.WaitWithDefaultTimeout()
+ Expect(log1.ExitCode()).To(Equal(0))
+ cid1 := log1.OutputToString()
+
+ log2 := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ log2.WaitWithDefaultTimeout()
+ Expect(log2.ExitCode()).To(Equal(0))
+ cid2 := log2.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", cid1, cid2})
+ results.WaitWithDefaultTimeout()
+ Expect(results).Should(Exit(0))
+
+ output := results.OutputToStringArray()
+ Expect(len(output)).To(Equal(6))
+ Expect(strings.Contains(output[0], cid1[:12]) || strings.Contains(output[0], cid2[:12])).To(BeTrue())
+ })
+
+ It("podman logs on a created container should result in 0 exit code: "+log, func() {
+ session := podmanTest.Podman([]string{"create", "-t", "--name", "log", ALPINE})
+ session.WaitWithDefaultTimeout()
+ Expect(session).To(Exit(0))
+
+ results := podmanTest.Podman([]string{"logs", "log"})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ })
+
+ It("for container: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(3))
+ Expect(results.OutputToString()).To(Equal("podman podman podman"))
+ })
+
+ It("tail two lines: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+ results := podmanTest.Podman([]string{"logs", "--tail", "2", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(2))
+ })
+
+ It("tail 99 lines: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--tail", "99", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(3))
+ })
+
+ It("tail 2 lines with timestamps: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--tail", "2", "-t", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(2))
+ })
+
+ It("since time 2017-08-07: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--since", "2017-08-07T10:10:09.056611202-04:00", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(3))
+ })
+
+ It("with duration 10m: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ results := podmanTest.Podman([]string{"logs", "--since", "10m", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(3))
+ })
+
+ It("streaming output: "+log, func() {
+ containerName := "logs-f-rm"
+
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "--rm", "--name", containerName, "-dt", ALPINE, "sh", "-c", "echo podman; sleep 1; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+
+ results := podmanTest.Podman([]string{"logs", "-f", containerName})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+
+ // TODO: we should actually check for two podman lines,
+ // but as of 2020-06-17 there's a race condition in which
+ // 'logs -f' may not catch all output from a container
+ Expect(results.OutputToString()).To(ContainSubstring("podman"))
+
+ // Container should now be terminatING or terminatED, but we
+ // have no guarantee of which: 'logs -f' does not necessarily
+ // wait for cleanup. Run 'inspect' and accept either state.
+ inspect := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.State.Status}}", containerName})
+ inspect.WaitWithDefaultTimeout()
+ if inspect.ExitCode() == 0 {
+ Expect(inspect.OutputToString()).To(Equal("exited"))
+ // TODO: add 2-second wait loop to confirm cleanup
+ } else {
+ Expect(inspect.ErrorToString()).To(ContainSubstring("no such container"))
+ }
+ })
+
+ It("podman logs with log-driver=none errors: "+log, func() {
+ ctrName := "logsctr"
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", ctrName, "-d", "--log-driver", "none", ALPINE, "top"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+
+ logs := podmanTest.Podman([]string{"logs", "-f", ctrName})
+ logs.WaitWithDefaultTimeout()
+ Expect(logs).To(Not(Exit(0)))
+ })
+
+ It("follow output stopped container: "+log, func() {
+ containerName := "logs-f"
+
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", containerName, "-d", ALPINE, "true"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+
+ results := podmanTest.Podman([]string{"logs", "-f", containerName})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ })
+
+ It("using container with container log-size: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "--log-opt=max-size=10k", "-d", ALPINE, "sh", "-c", "echo podman podman podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+ cid := logc.OutputToString()
+
+ wait := podmanTest.Podman([]string{"wait", cid})
+ wait.WaitWithDefaultTimeout()
+ Expect(wait).To(Exit(0))
+
+ inspect := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.HostConfig.LogConfig.Size}}", cid})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect).To(Exit(0))
+ Expect(inspect.OutputToString()).To(Equal("10kB"))
+
+ results := podmanTest.Podman([]string{"logs", cid})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(results.OutputToString()).To(Equal("podman podman podman"))
+ })
+
+ It("Make sure logs match expected length: "+log, func() {
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "-t", "--name", "test", ALPINE, "sh", "-c", "echo 1; echo 2"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+
+ wait := podmanTest.Podman([]string{"wait", "test"})
+ wait.WaitWithDefaultTimeout()
+ Expect(wait).To(Exit(0))
+
+ results := podmanTest.Podman([]string{"logs", "test"})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ outlines := results.OutputToStringArray()
+ Expect(len(outlines)).To(Equal(2))
+ Expect(outlines[0]).To(Equal("1\r"))
+ Expect(outlines[1]).To(Equal("2\r"))
+ })
+
+ It("podman logs test stdout and stderr: "+log, func() {
+ cname := "log-test"
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", cname, ALPINE, "sh", "-c", "echo stdout; echo stderr >&2"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc).To(Exit(0))
+
+ wait := podmanTest.Podman([]string{"wait", cname})
+ wait.WaitWithDefaultTimeout()
+ Expect(wait).To(Exit(0))
+
+ results := podmanTest.Podman([]string{"logs", cname})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ Expect(results.OutputToString()).To(Equal("stdout"))
+ Expect(results.ErrorToString()).To(Equal("stderr"))
+ })
+ }
It("using journald for container with container tag", func() {
- Skip("need to verify images have correct packages for journald")
+ SkipIfInContainer("journalctl inside a container doesn't work correctly")
logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "--log-opt=tag={{.ImageName}}", "-d", ALPINE, "sh", "-c", "echo podman; sleep 0.1; echo podman; sleep 0.1; echo podman"})
logc.WaitWithDefaultTimeout()
Expect(logc).To(Exit(0))
cid := logc.OutputToString()
- wait := podmanTest.Podman([]string{"wait", "-l"})
+ wait := podmanTest.Podman([]string{"wait", cid})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
- cmd := exec.Command("journalctl", "--no-pager", "-o", "json", "--output-fields=CONTAINER_TAG", "-u", fmt.Sprintf("libpod-conmon-%s.scope", cid))
+ cmd := exec.Command("journalctl", "--no-pager", "-o", "json", "--output-fields=CONTAINER_TAG", fmt.Sprintf("CONTAINER_ID_FULL=%s", cid))
out, err := cmd.CombinedOutput()
Expect(err).To(BeNil())
Expect(string(out)).To(ContainSubstring("alpine"))
})
- It("using journald for container name", func() {
- Skip("need to verify images have correct packages for journald")
+ It("using journald container name", func() {
+ SkipIfInContainer("journalctl inside a container doesn't work correctly")
containerName := "inside-journal"
logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "-d", "--name", containerName, ALPINE, "sh", "-c", "echo podman; sleep 0.1; echo podman; sleep 0.1; echo podman"})
logc.WaitWithDefaultTimeout()
Expect(logc).To(Exit(0))
cid := logc.OutputToString()
- wait := podmanTest.Podman([]string{"wait", "-l"})
+ wait := podmanTest.Podman([]string{"wait", cid})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
- cmd := exec.Command("journalctl", "--no-pager", "-o", "json", "--output-fields=CONTAINER_NAME", "-u", fmt.Sprintf("libpod-conmon-%s.scope", cid))
+ cmd := exec.Command("journalctl", "--no-pager", "-o", "json", "--output-fields=CONTAINER_NAME", fmt.Sprintf("CONTAINER_ID_FULL=%s", cid))
out, err := cmd.CombinedOutput()
Expect(err).To(BeNil())
Expect(string(out)).To(ContainSubstring(containerName))
})
-
- It("using journald for container", func() {
- Skip("need to verify images have correct packages for journald")
- logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(3))
- Expect(results.OutputToString()).To(Equal("podman podman podman"))
- })
-
- It("using journald tail two lines", func() {
- Skip("need to verify images have correct packages for journald")
- logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
- results := podmanTest.Podman([]string{"logs", "--tail", "2", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(2))
- })
-
- It("using journald tail 99 lines", func() {
- Skip("need to verify images have correct packages for journald")
- logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--tail", "99", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(3))
- })
-
- It("using journald tail 2 lines with timestamps", func() {
- Skip("need to verify images have correct packages for journald")
- logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--tail", "2", "-t", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(2))
- })
-
- It("using journald since time 2017-08-07", func() {
- Skip("need to verify images have correct packages for journald")
- logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--since", "2017-08-07T10:10:09.056611202-04:00", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(3))
- })
-
- It("using journald with duration 10m", func() {
- Skip("need to verify images have correct packages for journald")
- logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- results := podmanTest.Podman([]string{"logs", "--since", "10m", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(3))
- })
-
- It("streaming output", func() {
- containerName := "logs-f-rm"
-
- logc := podmanTest.Podman([]string{"run", "--rm", "--name", containerName, "-dt", ALPINE, "sh", "-c", "echo podman; sleep 1; echo podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
-
- results := podmanTest.Podman([]string{"logs", "-f", containerName})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
-
- // TODO: we should actually check for two podman lines,
- // but as of 2020-06-17 there's a race condition in which
- // 'logs -f' may not catch all output from a container
- Expect(results.OutputToString()).To(ContainSubstring("podman"))
-
- // Container should now be terminatING or terminatED, but we
- // have no guarantee of which: 'logs -f' does not necessarily
- // wait for cleanup. Run 'inspect' and accept either state.
- inspect := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.State.Status}}", containerName})
- inspect.WaitWithDefaultTimeout()
- if inspect.ExitCode() == 0 {
- Expect(inspect.OutputToString()).To(Equal("exited"))
- // TODO: add 2-second wait loop to confirm cleanup
- } else {
- Expect(inspect.ErrorToString()).To(ContainSubstring("no such container"))
- }
- })
-
- It("podman logs with log-driver=none errors", func() {
- ctrName := "logsctr"
- logc := podmanTest.Podman([]string{"run", "--name", ctrName, "-d", "--log-driver", "none", ALPINE, "top"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
-
- logs := podmanTest.Podman([]string{"logs", "-f", ctrName})
- logs.WaitWithDefaultTimeout()
- Expect(logs).To(Not(Exit(0)))
- })
-
- It("follow output stopped container", func() {
- containerName := "logs-f"
-
- logc := podmanTest.Podman([]string{"run", "--name", containerName, "-d", ALPINE, "true"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
-
- results := podmanTest.Podman([]string{"logs", "-f", containerName})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- })
-
- It("using container with container log-size", func() {
- logc := podmanTest.Podman([]string{"run", "--log-opt=max-size=10k", "-d", ALPINE, "sh", "-c", "echo podman podman podman"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
- cid := logc.OutputToString()
-
- wait := podmanTest.Podman([]string{"wait", cid})
- wait.WaitWithDefaultTimeout()
- Expect(wait).To(Exit(0))
-
- inspect := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.HostConfig.LogConfig.Size}}", cid})
- inspect.WaitWithDefaultTimeout()
- Expect(inspect).To(Exit(0))
- Expect(inspect.OutputToString()).To(Equal("10kB"))
-
- results := podmanTest.Podman([]string{"logs", cid})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(results.OutputToString()).To(Equal("podman podman podman"))
- })
-
- It("Make sure logs match expected length", func() {
- logc := podmanTest.Podman([]string{"run", "-t", "--name", "test", ALPINE, "sh", "-c", "echo 1; echo 2"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
-
- wait := podmanTest.Podman([]string{"wait", "test"})
- wait.WaitWithDefaultTimeout()
- Expect(wait).To(Exit(0))
-
- results := podmanTest.Podman([]string{"logs", "test"})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- outlines := results.OutputToStringArray()
- Expect(len(outlines)).To(Equal(2))
- Expect(outlines[0]).To(Equal("1\r"))
- Expect(outlines[1]).To(Equal("2\r"))
- })
-
- It("podman logs test stdout and stderr", func() {
- cname := "log-test"
- logc := podmanTest.Podman([]string{"run", "--name", cname, ALPINE, "sh", "-c", "echo stdout; echo stderr >&2"})
- logc.WaitWithDefaultTimeout()
- Expect(logc).To(Exit(0))
-
- wait := podmanTest.Podman([]string{"wait", cname})
- wait.WaitWithDefaultTimeout()
- Expect(wait).To(Exit(0))
-
- results := podmanTest.Podman([]string{"logs", cname})
- results.WaitWithDefaultTimeout()
- Expect(results).To(Exit(0))
- Expect(results.OutputToString()).To(Equal("stdout"))
- Expect(results.ErrorToString()).To(Equal("stderr"))
- })
})
diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go
index e6ac83aea..18be97a89 100644
--- a/test/e2e/manifest_test.go
+++ b/test/e2e/manifest_test.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
diff --git a/test/e2e/mount_rootless_test.go b/test/e2e/mount_rootless_test.go
index c410a2507..502bdef4e 100644
--- a/test/e2e/mount_rootless_test.go
+++ b/test/e2e/mount_rootless_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/mount_test.go b/test/e2e/mount_test.go
index c9274553b..ee77f2984 100644
--- a/test/e2e/mount_test.go
+++ b/test/e2e/mount_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/namespace_test.go b/test/e2e/namespace_test.go
index 951e98dfc..0c451d6cd 100644
--- a/test/e2e/namespace_test.go
+++ b/test/e2e/namespace_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/negative_test.go b/test/e2e/negative_test.go
index 9c879fb8b..c3cef2e8e 100644
--- a/test/e2e/negative_test.go
+++ b/test/e2e/negative_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/network_connect_disconnect_test.go b/test/e2e/network_connect_disconnect_test.go
index cc23b10c1..ab42a592f 100644
--- a/test/e2e/network_connect_disconnect_test.go
+++ b/test/e2e/network_connect_disconnect_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go
index 1bf2a2691..ef3be8e22 100644
--- a/test/e2e/network_create_test.go
+++ b/test/e2e/network_create_test.go
@@ -8,8 +8,8 @@ import (
"strings"
cniversion "github.com/containernetworking/cni/pkg/version"
- "github.com/containers/podman/v2/libpod/network"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/libpod/network"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go
index 083d2a49a..a7eb6e629 100644
--- a/test/e2e/network_test.go
+++ b/test/e2e/network_test.go
@@ -6,8 +6,8 @@ import (
"strings"
"time"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/pause_test.go b/test/e2e/pause_test.go
index a90ffcc87..01ad7c071 100644
--- a/test/e2e/pause_test.go
+++ b/test/e2e/pause_test.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go
index 2e5c72b0e..9260d6cd2 100644
--- a/test/e2e/play_kube_test.go
+++ b/test/e2e/play_kube_test.go
@@ -10,7 +10,7 @@ import (
"strings"
"text/template"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/opencontainers/selinux/go-selinux"
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index e57712f62..a70d9f13f 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -7,8 +7,8 @@ import (
"path/filepath"
"strings"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -501,4 +501,18 @@ entrypoint ["/fromimage"]
Expect(session.OutputToString()).To(ContainSubstring("inet 127.0.0.1/8 scope host lo"))
Expect(len(session.OutputToStringArray())).To(Equal(1))
})
+
+ It("podman pod create --infra-image w/untagged image", func() {
+ podmanTest.AddImageToRWStore(ALPINE)
+ dockerfile := `FROM quay.io/libpod/alpine:latest
+ENTRYPOINT ["sleep","99999"]
+ `
+ // This builds a none/none image
+ iid := podmanTest.BuildImage(dockerfile, "", "true")
+
+ create := podmanTest.Podman([]string{"pod", "create", "--infra-image", iid})
+ create.WaitWithDefaultTimeout()
+ Expect(create.ExitCode()).To(BeZero())
+ })
+
})
diff --git a/test/e2e/pod_infra_container_test.go b/test/e2e/pod_infra_container_test.go
index 452a3de21..09f0d4e33 100644
--- a/test/e2e/pod_infra_container_test.go
+++ b/test/e2e/pod_infra_container_test.go
@@ -4,7 +4,7 @@ import (
"os"
"strconv"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/pod_inspect_test.go b/test/e2e/pod_inspect_test.go
index d9c4a393a..036b08570 100644
--- a/test/e2e/pod_inspect_test.go
+++ b/test/e2e/pod_inspect_test.go
@@ -4,8 +4,8 @@ import (
"encoding/json"
"os"
- "github.com/containers/podman/v2/libpod/define"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/pod_kill_test.go b/test/e2e/pod_kill_test.go
index 06d244f99..92dcad292 100644
--- a/test/e2e/pod_kill_test.go
+++ b/test/e2e/pod_kill_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/pod_pause_test.go b/test/e2e/pod_pause_test.go
index 0c1b39f38..da3b106fa 100644
--- a/test/e2e/pod_pause_test.go
+++ b/test/e2e/pod_pause_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/pod_pod_namespaces_test.go b/test/e2e/pod_pod_namespaces_test.go
index 20b8bdb39..ce93db63c 100644
--- a/test/e2e/pod_pod_namespaces_test.go
+++ b/test/e2e/pod_pod_namespaces_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/pod_prune_test.go b/test/e2e/pod_prune_test.go
index d1ebf7249..2def95308 100644
--- a/test/e2e/pod_prune_test.go
+++ b/test/e2e/pod_prune_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/pod_ps_test.go b/test/e2e/pod_ps_test.go
index c20cb44e7..c5c0827bc 100644
--- a/test/e2e/pod_ps_test.go
+++ b/test/e2e/pod_ps_test.go
@@ -5,7 +5,7 @@ import (
"os"
"sort"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/pod_restart_test.go b/test/e2e/pod_restart_test.go
index c6b1a0d46..006421b93 100644
--- a/test/e2e/pod_restart_test.go
+++ b/test/e2e/pod_restart_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/pod_rm_test.go b/test/e2e/pod_rm_test.go
index 40a903cd0..6d710f020 100644
--- a/test/e2e/pod_rm_test.go
+++ b/test/e2e/pod_rm_test.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/pod_start_test.go b/test/e2e/pod_start_test.go
index e14796ab3..5838f3310 100644
--- a/test/e2e/pod_start_test.go
+++ b/test/e2e/pod_start_test.go
@@ -7,7 +7,7 @@ import (
"strconv"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
diff --git a/test/e2e/pod_stats_test.go b/test/e2e/pod_stats_test.go
index 073d4752b..2064cdc9f 100644
--- a/test/e2e/pod_stats_test.go
+++ b/test/e2e/pod_stats_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
diff --git a/test/e2e/pod_stop_test.go b/test/e2e/pod_stop_test.go
index 30a5632d0..45e2f86a6 100644
--- a/test/e2e/pod_stop_test.go
+++ b/test/e2e/pod_stop_test.go
@@ -4,7 +4,7 @@ import (
"io/ioutil"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/pod_top_test.go b/test/e2e/pod_top_test.go
index e191b44fc..9d9c138c4 100644
--- a/test/e2e/pod_top_test.go
+++ b/test/e2e/pod_top_test.go
@@ -5,7 +5,7 @@ import (
"os"
"time"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/port_test.go b/test/e2e/port_test.go
index 4aaf2cbc1..e9bbc2adc 100644
--- a/test/e2e/port_test.go
+++ b/test/e2e/port_test.go
@@ -5,7 +5,7 @@ import (
"os"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go
index f19627170..73da77417 100644
--- a/test/e2e/prune_test.go
+++ b/test/e2e/prune_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index 225bd538e..ac0910a83 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -8,7 +8,7 @@ import (
"strconv"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
"github.com/docker/go-units"
. "github.com/onsi/ginkgo"
@@ -350,6 +350,21 @@ var _ = Describe("Podman ps", func() {
Expect(session).To(ExitWithError())
})
+ It("podman --format by size", func() {
+ session := podmanTest.Podman([]string{"create", "busybox", "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"create", "-t", ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"ps", "-a", "--format", "{{.Size}}"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.ErrorToString()).To(ContainSubstring("Size format requires --size option"))
+ })
+
It("podman --sort by size", func() {
session := podmanTest.Podman([]string{"create", "busybox", "ls"})
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go
index d47a3e47a..5308548f1 100644
--- a/test/e2e/pull_test.go
+++ b/test/e2e/pull_test.go
@@ -7,7 +7,7 @@ import (
"runtime"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/push_test.go b/test/e2e/push_test.go
index 00b5802a3..cc7c67941 100644
--- a/test/e2e/push_test.go
+++ b/test/e2e/push_test.go
@@ -6,8 +6,8 @@ import (
"path/filepath"
"strings"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/rename_test.go b/test/e2e/rename_test.go
index 7affbaf56..f19413221 100644
--- a/test/e2e/rename_test.go
+++ b/test/e2e/rename_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/restart_test.go b/test/e2e/restart_test.go
index bfe9563ea..dc8e64e63 100644
--- a/test/e2e/restart_test.go
+++ b/test/e2e/restart_test.go
@@ -4,7 +4,7 @@ import (
"os"
"time"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go
index 4c50a61ef..788d14141 100644
--- a/test/e2e/rm_test.go
+++ b/test/e2e/rm_test.go
@@ -4,7 +4,7 @@ import (
"io/ioutil"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go
index 257570ea7..d8367d636 100644
--- a/test/e2e/rmi_test.go
+++ b/test/e2e/rmi_test.go
@@ -5,7 +5,7 @@ import (
"os"
"sync"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
diff --git a/test/e2e/run_apparmor_test.go b/test/e2e/run_apparmor_test.go
index 0faf0b496..63c52451f 100644
--- a/test/e2e/run_apparmor_test.go
+++ b/test/e2e/run_apparmor_test.go
@@ -9,7 +9,7 @@ import (
"path/filepath"
"github.com/containers/common/pkg/apparmor"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_cgroup_parent_test.go b/test/e2e/run_cgroup_parent_test.go
index 35628d44b..d68b1bb5f 100644
--- a/test/e2e/run_cgroup_parent_test.go
+++ b/test/e2e/run_cgroup_parent_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_cleanup_test.go b/test/e2e/run_cleanup_test.go
index 5f6c9007a..2dfaf1329 100644
--- a/test/e2e/run_cleanup_test.go
+++ b/test/e2e/run_cleanup_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_cpu_test.go b/test/e2e/run_cpu_test.go
index d8b57c230..2f4452ba4 100644
--- a/test/e2e/run_cpu_test.go
+++ b/test/e2e/run_cpu_test.go
@@ -4,7 +4,7 @@ import (
"io/ioutil"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_device_test.go b/test/e2e/run_device_test.go
index 1c2602631..5a32ed827 100644
--- a/test/e2e/run_device_test.go
+++ b/test/e2e/run_device_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_dns_test.go b/test/e2e/run_dns_test.go
index c8996c5e8..05f8c3f99 100644
--- a/test/e2e/run_dns_test.go
+++ b/test/e2e/run_dns_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_entrypoint_test.go b/test/e2e/run_entrypoint_test.go
index cac3d759d..ddad89c85 100644
--- a/test/e2e/run_entrypoint_test.go
+++ b/test/e2e/run_entrypoint_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -43,6 +43,18 @@ CMD []
Expect(session.ExitCode()).To(Equal(125))
})
+ It("podman run entrypoint == [\"\"]", func() {
+ dockerfile := `FROM quay.io/libpod/alpine:latest
+ENTRYPOINT [""]
+CMD []
+`
+ podmanTest.BuildImage(dockerfile, "foobar.com/entrypoint:latest", "false")
+ session := podmanTest.Podman([]string{"run", "foobar.com/entrypoint:latest", "echo", "hello"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(Equal("hello"))
+ })
+
It("podman run entrypoint", func() {
dockerfile := `FROM quay.io/libpod/alpine:latest
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
diff --git a/test/e2e/run_env_test.go b/test/e2e/run_env_test.go
index 9882b936a..83d8e8da6 100644
--- a/test/e2e/run_env_test.go
+++ b/test/e2e/run_env_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_exit_test.go b/test/e2e/run_exit_test.go
index 0579e29fa..3d969cbc2 100644
--- a/test/e2e/run_exit_test.go
+++ b/test/e2e/run_exit_test.go
@@ -3,8 +3,8 @@ package integration
import (
"os"
- "github.com/containers/podman/v2/libpod/define"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/libpod/define"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_memory_test.go b/test/e2e/run_memory_test.go
index ad3a2b54f..cb13993f4 100644
--- a/test/e2e/run_memory_test.go
+++ b/test/e2e/run_memory_test.go
@@ -2,8 +2,9 @@ package integration
import (
"os"
+ "strconv"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -90,4 +91,27 @@ var _ = Describe("Podman run memory", func() {
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(Equal("41943040"))
})
+
+ It("podman run kernel-memory test", func() {
+ if podmanTest.Host.Distribution == "ubuntu" {
+ Skip("Unable to perform test on Ubuntu distributions due to memory management")
+ }
+ var session *PodmanSessionIntegration
+ if CGROUPSV2 {
+ session = podmanTest.Podman([]string{"run", "--memory", "256m", "--memory-swap", "-1", ALPINE, "cat", "/sys/fs/cgroup/memory.swap.max"})
+ } else {
+ session = podmanTest.Podman([]string{"run", "--cgroupns=private", ALPINE, "cat", "/sys/fs/cgroup/memory/memory.memsw.limit_in_bytes"})
+ }
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(BeZero())
+ output := session.OutputToString()
+ Expect(err).To(BeNil())
+ if CGROUPSV2 {
+ Expect(output).To(Equal("max"))
+ } else {
+ crazyHighNumber, err := strconv.ParseInt(output, 10, 64)
+ Expect(err).To(BeZero())
+ Expect(crazyHighNumber).To(BeNumerically(">", 936854771712))
+ }
+ })
})
diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go
index 676f24e5d..a6237a49a 100644
--- a/test/e2e/run_networking_test.go
+++ b/test/e2e/run_networking_test.go
@@ -5,7 +5,7 @@ import (
"os"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/run_ns_test.go b/test/e2e/run_ns_test.go
index 29d2d4395..c72891107 100644
--- a/test/e2e/run_ns_test.go
+++ b/test/e2e/run_ns_test.go
@@ -5,7 +5,7 @@ import (
"os/exec"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_passwd_test.go b/test/e2e/run_passwd_test.go
index e7b86c68b..12b6c64df 100644
--- a/test/e2e/run_passwd_test.go
+++ b/test/e2e/run_passwd_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_privileged_test.go b/test/e2e/run_privileged_test.go
index 48f9ea76e..33b3b85c5 100644
--- a/test/e2e/run_privileged_test.go
+++ b/test/e2e/run_privileged_test.go
@@ -5,7 +5,7 @@ import (
"strconv"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/syndtr/gocapability/capability"
diff --git a/test/e2e/run_restart_test.go b/test/e2e/run_restart_test.go
index 85621a762..c996bdb25 100644
--- a/test/e2e/run_restart_test.go
+++ b/test/e2e/run_restart_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_seccomp_test.go b/test/e2e/run_seccomp_test.go
index 7d04cc60a..ed1cdeecd 100644
--- a/test/e2e/run_seccomp_test.go
+++ b/test/e2e/run_seccomp_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_security_labels_test.go b/test/e2e/run_security_labels_test.go
index 0c5621e3f..a2e0b2aab 100644
--- a/test/e2e/run_security_labels_test.go
+++ b/test/e2e/run_security_labels_test.go
@@ -4,7 +4,7 @@ import (
"os"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_selinux_test.go b/test/e2e/run_selinux_test.go
index 2e9d38e2d..8c712b1be 100644
--- a/test/e2e/run_selinux_test.go
+++ b/test/e2e/run_selinux_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/opencontainers/selinux/go-selinux"
diff --git a/test/e2e/run_signal_test.go b/test/e2e/run_signal_test.go
index 58b8d04e5..f601bee72 100644
--- a/test/e2e/run_signal_test.go
+++ b/test/e2e/run_signal_test.go
@@ -9,8 +9,8 @@ import (
"syscall"
"time"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"golang.org/x/sys/unix"
diff --git a/test/e2e/run_staticip_test.go b/test/e2e/run_staticip_test.go
index aeb462ae9..bff142b12 100644
--- a/test/e2e/run_staticip_test.go
+++ b/test/e2e/run_staticip_test.go
@@ -6,7 +6,7 @@ import (
"os"
"time"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 18db63c15..c28086fe8 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -11,7 +11,7 @@ import (
"syscall"
"time"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
"github.com/mrunalp/fileutils"
. "github.com/onsi/ginkgo"
@@ -47,6 +47,29 @@ var _ = Describe("Podman run", func() {
Expect(session.ExitCode()).To(Equal(0))
})
+ It("podman run check /run/.containerenv", func() {
+ session := podmanTest.Podman([]string{"run", ALPINE, "cat", "/run/.containerenv"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(Equal(""))
+
+ session = podmanTest.Podman([]string{"run", "--privileged", "--name=test1", ALPINE, "cat", "/run/.containerenv"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring("name=\"test1\""))
+ Expect(session.OutputToString()).To(ContainSubstring("image=\"" + ALPINE + "\""))
+
+ session = podmanTest.Podman([]string{"run", "-v", "/:/host", ALPINE, "cat", "/run/.containerenv"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring("graphRootMounted=1"))
+
+ session = podmanTest.Podman([]string{"run", "-v", "/:/host", "--privileged", ALPINE, "cat", "/run/.containerenv"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring("graphRootMounted=1"))
+ })
+
It("podman run a container based on a complex local image name", func() {
imageName := strings.TrimPrefix(nginx, "quay.io/")
session := podmanTest.Podman([]string{"run", imageName, "ls"})
diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go
index 8d860cfc3..79ef707a2 100644
--- a/test/e2e/run_userns_test.go
+++ b/test/e2e/run_userns_test.go
@@ -7,7 +7,7 @@ import (
"os/user"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index 19d82c974..20c43bf4a 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -7,8 +7,8 @@ import (
"path/filepath"
"strings"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
@@ -322,6 +322,30 @@ RUN sh -c "cd /etc/apk && ln -s ../../testfile"`
Expect(outputSession.OutputToString()).To(Equal(baselineOutput))
})
+ It("podman named volume copyup empty directory", func() {
+ baselineSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", ALPINE, "ls", "/srv"})
+ baselineSession.WaitWithDefaultTimeout()
+ Expect(baselineSession.ExitCode()).To(Equal(0))
+ baselineOutput := baselineSession.OutputToString()
+
+ outputSession := podmanTest.Podman([]string{"run", "-t", "-i", "-v", "/srv", ALPINE, "ls", "/srv"})
+ outputSession.WaitWithDefaultTimeout()
+ Expect(outputSession.ExitCode()).To(Equal(0))
+ Expect(outputSession.OutputToString()).To(Equal(baselineOutput))
+ })
+
+ It("podman named volume copyup of /var", func() {
+ baselineSession := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", fedoraMinimal, "ls", "/var"})
+ baselineSession.WaitWithDefaultTimeout()
+ Expect(baselineSession.ExitCode()).To(Equal(0))
+ baselineOutput := baselineSession.OutputToString()
+
+ outputSession := podmanTest.Podman([]string{"run", "-t", "-i", "-v", "/var", fedoraMinimal, "ls", "/var"})
+ outputSession.WaitWithDefaultTimeout()
+ Expect(outputSession.ExitCode()).To(Equal(0))
+ Expect(outputSession.OutputToString()).To(Equal(baselineOutput))
+ })
+
It("podman read-only tmpfs conflict with volume", func() {
session := podmanTest.Podman([]string{"run", "--rm", "-t", "-i", "--read-only", "-v", "tmp_volume:" + dest, ALPINE, "touch", dest + "/a"})
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/run_working_dir_test.go b/test/e2e/run_working_dir_test.go
index 59538448e..2d16cdc18 100644
--- a/test/e2e/run_working_dir_test.go
+++ b/test/e2e/run_working_dir_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -47,7 +47,7 @@ var _ = Describe("Podman run", func() {
It("podman run a container on an image with a workdir", func() {
dockerfile := `FROM alpine
-RUN mkdir -p /home/foobar
+RUN mkdir -p /home/foobar /etc/foobar; chown bin:bin /etc/foobar
WORKDIR /etc/foobar`
podmanTest.BuildImage(dockerfile, "test", "false")
@@ -56,6 +56,10 @@ WORKDIR /etc/foobar`
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(Equal("/etc/foobar"))
+ session = podmanTest.Podman([]string{"run", "test", "ls", "-ld", "."})
+ session.WaitWithDefaultTimeout()
+ Expect(session.LineInOutputContains("bin")).To(BeTrue())
+
session = podmanTest.Podman([]string{"run", "--workdir", "/home/foobar", "test", "pwd"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go
index 10e16ea23..2eec15c62 100644
--- a/test/e2e/runlabel_test.go
+++ b/test/e2e/runlabel_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/save_test.go b/test/e2e/save_test.go
index a5737c110..5ddd5efc8 100644
--- a/test/e2e/save_test.go
+++ b/test/e2e/save_test.go
@@ -8,8 +8,8 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go
index 4a11802c3..8c388d0ee 100644
--- a/test/e2e/search_test.go
+++ b/test/e2e/search_test.go
@@ -9,7 +9,7 @@ import (
"strconv"
"text/template"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/secret_test.go b/test/e2e/secret_test.go
index 6dad605c5..fbee18442 100644
--- a/test/e2e/secret_test.go
+++ b/test/e2e/secret_test.go
@@ -5,7 +5,7 @@ import (
"os"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go
index a6f22e007..f527b67f6 100644
--- a/test/e2e/start_test.go
+++ b/test/e2e/start_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
@@ -95,6 +95,23 @@ var _ = Describe("Podman start", func() {
Expect(session.OutputToString()).To(Equal(shortID))
})
+ It("podman container start single container by short id", func() {
+ session := podmanTest.Podman([]string{"container", "create", ALPINE, "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ cid := session.OutputToString()
+ shortID := cid[0:10]
+ session = podmanTest.Podman([]string{"container", "start", shortID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(Equal(shortID))
+
+ session = podmanTest.Podman([]string{"stop", shortID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(Equal(shortID))
+ })
+
It("podman start single container by name", func() {
name := "foobar99"
session := podmanTest.Podman([]string{"create", "--name", name, ALPINE, "ls"})
diff --git a/test/e2e/stats_test.go b/test/e2e/stats_test.go
index 53aa230e9..2218d72b5 100644
--- a/test/e2e/stats_test.go
+++ b/test/e2e/stats_test.go
@@ -8,7 +8,7 @@ import (
"strconv"
"time"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go
index 750d38ffb..dd264eb0d 100644
--- a/test/e2e/stop_test.go
+++ b/test/e2e/stop_test.go
@@ -5,7 +5,7 @@ import (
"os"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -149,13 +149,12 @@ var _ = Describe("Podman stop", func() {
session := podmanTest.RunTopContainer("test4")
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- cid1 := session.OutputToString()
session = podmanTest.Podman([]string{"stop", "--time", "1", "test4"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
output := session.OutputToString()
- Expect(output).To(ContainSubstring(cid1))
+ Expect(output).To(ContainSubstring("test4"))
finalCtrs := podmanTest.Podman([]string{"ps", "-q"})
finalCtrs.WaitWithDefaultTimeout()
@@ -167,14 +166,13 @@ var _ = Describe("Podman stop", func() {
session := podmanTest.Podman([]string{"run", "-d", "--name", "test5", ALPINE, "sleep", "100"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- cid1 := session.OutputToString()
session = podmanTest.Podman([]string{"stop", "--timeout", "1", "test5"})
// Without timeout container stops in 10 seconds
// If not stopped in 5 seconds, then --timeout did not work
session.Wait(5)
Expect(session.ExitCode()).To(Equal(0))
output := session.OutputToString()
- Expect(output).To(ContainSubstring(cid1))
+ Expect(output).To(ContainSubstring("test5"))
finalCtrs := podmanTest.Podman([]string{"ps", "-q"})
finalCtrs.WaitWithDefaultTimeout()
diff --git a/test/e2e/system_connection_test.go b/test/e2e/system_connection_test.go
index a23d50f29..4697cf860 100644
--- a/test/e2e/system_connection_test.go
+++ b/test/e2e/system_connection_test.go
@@ -6,7 +6,7 @@ import (
"os"
"github.com/containers/common/pkg/config"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gbytes"
diff --git a/test/e2e/system_df_test.go b/test/e2e/system_df_test.go
index 050a01805..9daf3f8f9 100644
--- a/test/e2e/system_df_test.go
+++ b/test/e2e/system_df_test.go
@@ -6,7 +6,7 @@ import (
"strconv"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/system_reset_test.go b/test/e2e/system_reset_test.go
index e716ce4f3..fcfcdaf85 100644
--- a/test/e2e/system_reset_test.go
+++ b/test/e2e/system_reset_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go
index 49ab3b8ed..b132750b0 100644
--- a/test/e2e/systemd_test.go
+++ b/test/e2e/systemd_test.go
@@ -6,7 +6,7 @@ import (
"strings"
"time"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/tag_test.go b/test/e2e/tag_test.go
index 8e8264e9d..83b6d023d 100644
--- a/test/e2e/tag_test.go
+++ b/test/e2e/tag_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/toolbox_test.go b/test/e2e/toolbox_test.go
index 6de775983..d605b59f9 100644
--- a/test/e2e/toolbox_test.go
+++ b/test/e2e/toolbox_test.go
@@ -35,8 +35,8 @@ import (
"strings"
"syscall"
- "github.com/containers/podman/v2/pkg/rootless"
- . "github.com/containers/podman/v2/test/utils"
+ "github.com/containers/podman/v3/pkg/rootless"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/top_test.go b/test/e2e/top_test.go
index c182b88e6..d7105b17a 100644
--- a/test/e2e/top_test.go
+++ b/test/e2e/top_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/tree_test.go b/test/e2e/tree_test.go
index 9bdc3af9d..184b99dfb 100644
--- a/test/e2e/tree_test.go
+++ b/test/e2e/tree_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/trust_test.go b/test/e2e/trust_test.go
index 19e576490..ae7b987ae 100644
--- a/test/e2e/trust_test.go
+++ b/test/e2e/trust_test.go
@@ -6,7 +6,7 @@ import (
"os"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/unshare_test.go b/test/e2e/unshare_test.go
index 182a65775..515b3a42e 100644
--- a/test/e2e/unshare_test.go
+++ b/test/e2e/unshare_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/untag_test.go b/test/e2e/untag_test.go
index 4d4f60f0c..d0d271715 100644
--- a/test/e2e/untag_test.go
+++ b/test/e2e/untag_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go
index 903748b58..75986e671 100644
--- a/test/e2e/version_test.go
+++ b/test/e2e/version_test.go
@@ -4,8 +4,8 @@ import (
"fmt"
"os"
- . "github.com/containers/podman/v2/test/utils"
- "github.com/containers/podman/v2/version"
+ . "github.com/containers/podman/v3/test/utils"
+ "github.com/containers/podman/v3/version"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
diff --git a/test/e2e/volume_create_test.go b/test/e2e/volume_create_test.go
index 544532ee0..ab65146eb 100644
--- a/test/e2e/volume_create_test.go
+++ b/test/e2e/volume_create_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/volume_exists_test.go b/test/e2e/volume_exists_test.go
index 6073c6d90..edbeb2c69 100644
--- a/test/e2e/volume_exists_test.go
+++ b/test/e2e/volume_exists_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/test/e2e/volume_inspect_test.go b/test/e2e/volume_inspect_test.go
index 7ff1d63b4..05aaf1025 100644
--- a/test/e2e/volume_inspect_test.go
+++ b/test/e2e/volume_inspect_test.go
@@ -4,7 +4,7 @@ import (
"os"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/volume_ls_test.go b/test/e2e/volume_ls_test.go
index 5c466124d..cb5ecbcc3 100644
--- a/test/e2e/volume_ls_test.go
+++ b/test/e2e/volume_ls_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
diff --git a/test/e2e/volume_plugin_test.go b/test/e2e/volume_plugin_test.go
index 16edab27c..183050e8c 100644
--- a/test/e2e/volume_plugin_test.go
+++ b/test/e2e/volume_plugin_test.go
@@ -5,7 +5,7 @@ import (
"os"
"path/filepath"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/volume_prune_test.go b/test/e2e/volume_prune_test.go
index a910c47a7..1d4e64ec7 100644
--- a/test/e2e/volume_prune_test.go
+++ b/test/e2e/volume_prune_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/volume_rm_test.go b/test/e2e/volume_rm_test.go
index cdced1f13..883a503c4 100644
--- a/test/e2e/volume_rm_test.go
+++ b/test/e2e/volume_rm_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/e2e/wait_test.go b/test/e2e/wait_test.go
index 4f1e74977..71df28ca8 100644
--- a/test/e2e/wait_test.go
+++ b/test/e2e/wait_test.go
@@ -3,7 +3,7 @@ package integration
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/python/docker/test_containers.py b/test/python/docker/test_containers.py
index 5c2a5fef2..337cacd5c 100644
--- a/test/python/docker/test_containers.py
+++ b/test/python/docker/test_containers.py
@@ -86,6 +86,13 @@ class TestContainers(unittest.TestCase):
containers = self.client.containers.list(all=True)
self.assertEqual(len(containers), 2)
+ def test_start_container_with_random_port_bind(self):
+ container = self.client.containers.create(image=constant.ALPINE,
+ name="containerWithRandomBind",
+ ports={'1234/tcp': None})
+ containers = self.client.containers.list(all=True)
+ self.assertTrue(container in containers)
+
def test_stop_container(self):
top = self.client.containers.get(TestContainers.topContainerId)
self.assertEqual(top.status, "running")
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 3749dcac5..93449ece9 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -662,4 +662,10 @@ json-file | f
run_podman rm $cname
}
+@test "podman run - do not set empty HOME" {
+ # Regression test for #9378.
+ run_podman run --rm --user 100 $IMAGE printenv
+ is "$output" ".*HOME=/.*"
+}
+
# vim: filetype=sh
diff --git a/test/system/065-cp.bats b/test/system/065-cp.bats
index d3cf1c274..0fcc437d4 100644
--- a/test/system/065-cp.bats
+++ b/test/system/065-cp.bats
@@ -18,6 +18,8 @@ load helpers
echo "${randomcontent[0]}" > $srcdir/hostfile0
echo "${randomcontent[1]}" > $srcdir/hostfile1
echo "${randomcontent[2]}" > $srcdir/hostfile2
+ mkdir -p $srcdir/subdir
+ echo "${randomcontent[2]}" > $srcdir/subdir/dotfile.
run_podman run -d --name cpcontainer --workdir=/srv $IMAGE sleep infinity
run_podman exec cpcontainer mkdir /srv/subdir
@@ -50,6 +52,11 @@ load helpers
is "$output" "${randomcontent[$id]}" "$description (cp -> ctr:$dest)"
done < <(parse_table "$tests")
+ # Dots are special for dirs not files.
+ run_podman cp $srcdir/subdir/dotfile. cpcontainer:/tmp
+ run_podman exec cpcontainer cat /tmp/dotfile.
+ is "$output" "${randomcontent[2]}" "$description (cp -> ctr:$dest)"
+
# Host path does not exist.
run_podman 125 cp $srcdir/IdoNotExist cpcontainer:/tmp
is "$output" 'Error: ".*/IdoNotExist" could not be found on the host' \
@@ -76,12 +83,14 @@ load helpers
)
run_podman run -d --name cpcontainer --workdir=/srv $IMAGE sleep infinity
run_podman exec cpcontainer sh -c "echo ${randomcontent[0]} > /tmp/containerfile"
+ run_podman exec cpcontainer sh -c "echo ${randomcontent[0]} > /tmp/dotfile."
run_podman exec cpcontainer sh -c "echo ${randomcontent[1]} > /srv/containerfile1"
run_podman exec cpcontainer sh -c "mkdir /srv/subdir; echo ${randomcontent[2]} > /srv/subdir/containerfile2"
# format is: <id> | <source arg to cp> | <destination arg (appended to $srcdir) to cp> | <full dest path (appended to $srcdir)> | <test name>
tests="
0 | /tmp/containerfile | | /containerfile | copy to srcdir/
+0 | /tmp/dotfile. | | /dotfile. | copy to srcdir/
0 | /tmp/containerfile | / | /containerfile | copy to srcdir/
0 | /tmp/containerfile | /. | /containerfile | copy to srcdir/.
0 | /tmp/containerfile | /newfile | /newfile | copy to srcdir/newfile
@@ -117,12 +126,18 @@ load helpers
echo "${randomcontent[0]}" > $srcdir/hostfile0
echo "${randomcontent[1]}" > $srcdir/hostfile1
+ # "." and "dir/." will copy the contents, so make sure that a dir ending
+ # with dot is treated correctly.
+ mkdir -p $srcdir.
+ cp $srcdir/* $srcdir./
+
run_podman run -d --name cpcontainer --workdir=/srv $IMAGE sleep infinity
run_podman exec cpcontainer mkdir /srv/subdir
# format is: <source arg to cp (appended to srcdir)> | <destination arg to cp> | <full dest path> | <test name>
tests="
| / | /dir-test | copy to root
+ . | / | /dir-test. | copy dotdir to root
/ | /tmp | /tmp/dir-test | copy to tmp
/. | /usr/ | /usr/ | copy contents of dir to usr/
| . | /srv/dir-test | copy to workdir (rel path)
@@ -153,6 +168,9 @@ load helpers
run_podman run -d --name cpcontainer --workdir=/srv $IMAGE sleep infinity
run_podman exec cpcontainer sh -c 'mkdir /srv/subdir; echo "This first file is on the container" > /srv/subdir/containerfile1'
run_podman exec cpcontainer sh -c 'echo "This second file is on the container as well" > /srv/subdir/containerfile2'
+ # "." and "dir/." will copy the contents, so make sure that a dir ending
+ # with dot is treated correctly.
+ run_podman exec cpcontainer sh -c 'mkdir /tmp/subdir.; cp /srv/subdir/* /tmp/subdir./'
run_podman cp cpcontainer:/srv $srcdir
run cat $srcdir/srv/subdir/containerfile1
@@ -174,6 +192,14 @@ load helpers
is "$output" "This first file is on the container"
run cat $srcdir/containerfile2
is "$output" "This second file is on the container as well"
+ rm -rf $srcdir/subdir
+
+ run_podman cp cpcontainer:/tmp/subdir. $srcdir
+ run cat $srcdir/subdir./containerfile1
+ is "$output" "This first file is on the container"
+ run cat $srcdir/subdir./containerfile2
+ is "$output" "This second file is on the container as well"
+ rm -rf $srcdir/subdir.
run_podman rm -f cpcontainer
}
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 3ae95b5f5..89f3f5c64 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -46,6 +46,31 @@ EOF
is "$output" ".*invalidflag" "failed when passing undefined flags to the runtime"
}
+@test "podman build - set runtime" {
+ skip_if_remote "--runtime flag not supported for remote"
+ # Test on the CLI and via containers.conf
+
+ tmpdir=$PODMAN_TMPDIR/build-test
+ run mkdir -p $tmpdir
+ containerfile=$tmpdir/Containerfile
+ cat >$containerfile <<EOF
+FROM $IMAGE
+RUN echo $rand_content
+EOF
+
+ run_podman 125 --runtime=idonotexist build -t build_test $tmpdir
+ is "$output" ".*\"idonotexist\" not found.*" "failed when passing invalid OCI runtime via CLI"
+
+ containersconf=$tmpdir/containers.conf
+ cat >$containersconf <<EOF
+[engine]
+runtime="idonotexist"
+EOF
+
+ CONTAINERS_CONF="$containersconf" run_podman 125 build -t build_test $tmpdir
+ is "$output" ".*\"idonotexist\" not found.*" "failed when passing invalid OCI runtime via containers.conf"
+}
+
# Regression from v1.5.0. This test passes fine in v1.5.0, fails in 1.6
@test "podman build - cache (#3920)" {
# Make an empty test directory, with a subdirectory used for tar
diff --git a/test/utils/common_function_test.go b/test/utils/common_function_test.go
index 2f9e6f2c7..003d490ce 100644
--- a/test/utils/common_function_test.go
+++ b/test/utils/common_function_test.go
@@ -8,7 +8,7 @@ import (
"reflect"
"strings"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
diff --git a/test/utils/podmansession_test.go b/test/utils/podmansession_test.go
index 763cb4f26..d85f27bbb 100644
--- a/test/utils/podmansession_test.go
+++ b/test/utils/podmansession_test.go
@@ -1,7 +1,7 @@
package utils_test
import (
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/utils/podmantest_test.go b/test/utils/podmantest_test.go
index 538d55d8d..9bd1c4a66 100644
--- a/test/utils/podmantest_test.go
+++ b/test/utils/podmantest_test.go
@@ -3,7 +3,7 @@ package utils_test
import (
"os"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/test/utils/utils.go b/test/utils/utils.go
index 6790f31cd..80af7fb7c 100644
--- a/test/utils/utils.go
+++ b/test/utils/utils.go
@@ -482,3 +482,13 @@ func RandomString(n int) string {
}
return string(b)
}
+
+//SkipIfInContainer skips a test if the test is run inside a container
+func SkipIfInContainer(reason string) {
+ if len(reason) < 5 {
+ panic("SkipIfInContainer must specify a reason to skip")
+ }
+ if os.Getenv("TEST_ENVIRON") == "container" {
+ Skip("[container]: " + reason)
+ }
+}
diff --git a/test/utils/utils_suite_test.go b/test/utils/utils_suite_test.go
index 01549f06e..d5f9cbce4 100644
--- a/test/utils/utils_suite_test.go
+++ b/test/utils/utils_suite_test.go
@@ -7,7 +7,7 @@ import (
"strings"
"testing"
- . "github.com/containers/podman/v2/test/utils"
+ . "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/utils/utils.go b/utils/utils.go
index a6ef663d7..a2268a30b 100644
--- a/utils/utils.go
+++ b/utils/utils.go
@@ -9,7 +9,7 @@ import (
"strconv"
"strings"
- "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/containers/storage/pkg/archive"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/utils/utils_supported.go b/utils/utils_supported.go
index 73313cf5e..ad6192255 100644
--- a/utils/utils_supported.go
+++ b/utils/utils_supported.go
@@ -11,8 +11,8 @@ import (
"path/filepath"
"strings"
- "github.com/containers/podman/v2/pkg/cgroups"
- "github.com/containers/podman/v2/pkg/rootless"
+ "github.com/containers/podman/v3/pkg/cgroups"
+ "github.com/containers/podman/v3/pkg/rootless"
systemdDbus "github.com/coreos/go-systemd/v22/dbus"
"github.com/godbus/dbus/v5"
"github.com/pkg/errors"
diff --git a/vendor/github.com/containers/buildah/CHANGELOG.md b/vendor/github.com/containers/buildah/CHANGELOG.md
index ccf46b324..13e7ad24b 100644
--- a/vendor/github.com/containers/buildah/CHANGELOG.md
+++ b/vendor/github.com/containers/buildah/CHANGELOG.md
@@ -2,6 +2,18 @@
# Changelog
+## v1.19.6 (2021-02-18)
+ Bump c/containers/storage v1.24.6
+ Don't fail copy to emptydir
+ Workaround for RHEL gating test failure
+ Fix config-flags-verification test on F33
+ Fix bud capabilities test
+ Stop overriding the location of the blob info cache
+ Fix caching layers with build args
+
+## v1.19.5 (2021-02-09)
+ Vendor in latest containers/image and common
+
## v1.19.4 (2021-02-06)
run: fix check for host pid namespace
bump containernetworking/cni library to v0.8.1 - fix for CVE-2021-20206
diff --git a/vendor/github.com/containers/buildah/add.go b/vendor/github.com/containers/buildah/add.go
index dd69d45cf..0903fc7db 100644
--- a/vendor/github.com/containers/buildah/add.go
+++ b/vendor/github.com/containers/buildah/add.go
@@ -303,6 +303,13 @@ func (b *Builder) Add(destination string, extract bool, options AddAndCopyOption
renameTarget = filepath.Base(extractDirectory)
extractDirectory = filepath.Dir(extractDirectory)
}
+
+ // if the destination is a directory that doesn't yet exist, let's copy it.
+ newDestDirFound := false
+ if (len(destStats) == 1 || len(destStats[0].Globbed) == 0) && destMustBeDirectory && !destCanBeFile {
+ newDestDirFound = true
+ }
+
if len(destStats) == 1 && len(destStats[0].Globbed) == 1 && destStats[0].Results[destStats[0].Globbed[0]].IsRegular {
if destMustBeDirectory {
return errors.Errorf("destination %v already exists but is not a directory", destination)
@@ -415,6 +422,11 @@ func (b *Builder) Add(destination string, extract bool, options AddAndCopyOption
if !globInfo.IsDir || !includeDirectoryAnyway(rel, pm) {
continue
}
+ } else {
+ // if the destination is a directory that doesn't yet exist, and is not excluded, let's copy it.
+ if newDestDirFound {
+ itemsCopied++
+ }
}
} else {
// Make sure we don't trigger a "copied nothing" error for an empty context
diff --git a/vendor/github.com/containers/buildah/buildah.go b/vendor/github.com/containers/buildah/buildah.go
index 7065e00e4..dd43ea99a 100644
--- a/vendor/github.com/containers/buildah/buildah.go
+++ b/vendor/github.com/containers/buildah/buildah.go
@@ -28,7 +28,7 @@ const (
Package = "buildah"
// Version for the Package. Bump version in contrib/rpm/buildah.spec
// too.
- Version = "1.19.4"
+ Version = "1.19.6"
// The value we use to identify what type of information, currently a
// serialized Builder structure, we are using as per-container state.
// This should only be changed when we make incompatible changes to
diff --git a/vendor/github.com/containers/buildah/changelog.txt b/vendor/github.com/containers/buildah/changelog.txt
index 4a0f81b04..25da04663 100644
--- a/vendor/github.com/containers/buildah/changelog.txt
+++ b/vendor/github.com/containers/buildah/changelog.txt
@@ -1,3 +1,16 @@
+
+- Changelog for v1.19.6 (2021-02-18)
+ * Bump c/containers/storage v1.24.6
+ * Don't fail copy to emptydir
+ * Workaround for RHEL gating test failure
+ * Fix config-flags-verification test on F33
+ * Fix bud capabilities test
+ * Stop overriding the location of the blob info cache
+ * Fix caching layers with build args
+
+- Changelog for v1.19.5 (2021-02-09)
+ * Vendor in latest containers/image and common
+
- Changelog for v1.19.4 (2021-02-06)
* run: fix check for host pid namespace
* bump containernetworking/cni library to v0.8.1 - fix for CVE-2021-20206
diff --git a/vendor/github.com/containers/buildah/common.go b/vendor/github.com/containers/buildah/common.go
index 594362300..5219c6b78 100644
--- a/vendor/github.com/containers/buildah/common.go
+++ b/vendor/github.com/containers/buildah/common.go
@@ -56,9 +56,6 @@ func getSystemContext(store storage.Store, defaults *types.SystemContext, signat
sc.SignaturePolicyPath = signaturePolicyPath
}
if store != nil {
- if sc.BlobInfoCacheDir == "" {
- sc.BlobInfoCacheDir = filepath.Join(store.GraphRoot(), "cache")
- }
if sc.SystemRegistriesConfPath == "" && unshare.IsRootless() {
userRegistriesFile := filepath.Join(store.GraphRoot(), "registries.conf")
if _, err := os.Stat(userRegistriesFile); err == nil {
diff --git a/vendor/github.com/containers/buildah/go.mod b/vendor/github.com/containers/buildah/go.mod
index 17469ad12..ee3c28d50 100644
--- a/vendor/github.com/containers/buildah/go.mod
+++ b/vendor/github.com/containers/buildah/go.mod
@@ -5,10 +5,10 @@ go 1.12
require (
github.com/containerd/containerd v1.4.1 // indirect
github.com/containernetworking/cni v0.8.1
- github.com/containers/common v0.33.1
- github.com/containers/image/v5 v5.10.1
+ github.com/containers/common v0.33.4
+ github.com/containers/image/v5 v5.10.2
github.com/containers/ocicrypt v1.0.3
- github.com/containers/storage v1.24.5
+ github.com/containers/storage v1.24.6
github.com/docker/distribution v2.7.1+incompatible
github.com/docker/go-units v0.4.0
github.com/docker/libnetwork v0.8.0-dev.2.0.20190625141545-5a177b73e316
diff --git a/vendor/github.com/containers/buildah/go.sum b/vendor/github.com/containers/buildah/go.sum
index cab904fcf..9b6e62ff4 100644
--- a/vendor/github.com/containers/buildah/go.sum
+++ b/vendor/github.com/containers/buildah/go.sum
@@ -78,19 +78,19 @@ github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDG
github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI=
github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
-github.com/containers/common v0.33.1 h1:XpDiq8Cta8+u1s4kpYSEWdB140ZmqgyIXfWkLqKx3z0=
-github.com/containers/common v0.33.1/go.mod h1:mjDo/NKeweL/onaspLhZ38WnHXaYmrELHclIdvSnYpY=
-github.com/containers/image/v5 v5.9.0 h1:dRmUtcluQcmasNo3DpnRoZjfU0rOu1qZeL6wlDJr10Q=
-github.com/containers/image/v5 v5.9.0/go.mod h1:blOEFd/iFdeyh891ByhCVUc+xAcaI3gBegXECwz9UbQ=
-github.com/containers/image/v5 v5.10.1 h1:tHhGQ8RCMxJfJLD/PEW1qrOKX8nndledW9qz6UiAxns=
+github.com/containers/common v0.33.4 h1:f1jowItfo6xw0bZGZq8oE5dw1pBIkldqB0FqW+HHzG8=
+github.com/containers/common v0.33.4/go.mod h1:PhgL71XuC4jJ/1BIqeP7doke3aMFkCP90YBXwDeUr9g=
github.com/containers/image/v5 v5.10.1/go.mod h1:JlRLJZv7elVbtHaaaR6Kz8i6G3k2ttj4t7fubwxD9Hs=
+github.com/containers/image/v5 v5.10.2 h1:STD9GYR9p/X0qTLmBYsyx8dEM7zQW+qZ8KHoL/64fkg=
+github.com/containers/image/v5 v5.10.2/go.mod h1:JlRLJZv7elVbtHaaaR6Kz8i6G3k2ttj4t7fubwxD9Hs=
github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b h1:Q8ePgVfHDplZ7U33NwHZkrVELsZP5fYj9pM5WBZB2GE=
github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
github.com/containers/ocicrypt v1.0.3 h1:vYgl+RZ9Q3DPMuTfxmN+qp0X2Bj52uuY2vnt6GzVe1c=
github.com/containers/ocicrypt v1.0.3/go.mod h1:CUBa+8MRNL/VkpxYIpaMtgn1WgXGyvPQj8jcy0EVG6g=
-github.com/containers/storage v1.23.7/go.mod h1:cUT2zHjtx+WlVri30obWmM2gpqpi8jfPsmIzP1TVpEI=
github.com/containers/storage v1.24.5 h1:BusfdU0rCS2/Daa/DPw+0iLfGRlYA7UVF7D0el3N7Vk=
github.com/containers/storage v1.24.5/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
+github.com/containers/storage v1.24.6 h1:9PBb9PoGuj5B/3MGfxx//RmUjMAklmx3rBbuCkuIc94=
+github.com/containers/storage v1.24.6/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
@@ -235,9 +235,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.11.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
-github.com/klauspost/compress v1.11.3 h1:dB4Bn0tN3wdCzQxnS8r06kV74qN/TAfaIS0bVE8h3jc=
-github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.5 h1:xNCE0uE6yvTPRS+0wGNMHPo3NIpwnk6aluQZ6R6kRcc=
github.com/klauspost/compress v1.11.5/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg=
@@ -333,8 +330,6 @@ github.com/opencontainers/runtime-spec v1.0.3-0.20200710190001-3e4195d92445/go.m
github.com/opencontainers/runtime-tools v0.9.0 h1:FYgwVsKRI/H9hU32MJ/4MLOzXWodKK5zsQavY8NPMkU=
github.com/opencontainers/runtime-tools v0.9.0/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
github.com/opencontainers/selinux v1.5.1/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g=
-github.com/opencontainers/selinux v1.6.0 h1:+bIAS/Za3q5FTwWym4fTB0vObnfCf3G/NC7K6Jx62mY=
-github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE=
github.com/opencontainers/selinux v1.8.0 h1:+77ba4ar4jsCbL1GLbFL8fFM57w6suPfSS9PDLDY7KM=
github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
github.com/openshift/imagebuilder v1.1.8 h1:gjiIl8pbNj0eC4XWvFJHATdDvYm64p9/pLDLQWoLZPA=
@@ -416,8 +411,6 @@ github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG
github.com/tchap/go-patricia v2.3.0+incompatible h1:GkY4dP3cEfEASBPPkWd+AmjYxhmDkqO9/zg7R0lSQRs=
github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
-github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I=
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
@@ -425,16 +418,12 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vbatts/tar-split v0.11.1 h1:0Odu65rhcZ3JZaPHxl7tCI3V/C/Q9Zf82UFravl02dE=
github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g=
-github.com/vbauerster/mpb/v5 v5.3.0 h1:vgrEJjUzHaSZKDRRxul5Oh4C72Yy/5VEMb0em+9M0mQ=
-github.com/vbauerster/mpb/v5 v5.3.0/go.mod h1:4yTkvAb8Cm4eylAp6t0JRq6pXDkFJ4krUlDqWYkakAs=
github.com/vbauerster/mpb/v5 v5.4.0 h1:n8JPunifvQvh6P1D1HAl2Ur9YcmKT1tpoUuiea5mlmg=
github.com/vbauerster/mpb/v5 v5.4.0/go.mod h1:fi4wVo7BVQ22QcvFObm+VwliQXlV1eBT8JDaKXR4JGI=
github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0=
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
-github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243 h1:R43TdZy32XXSXjJn7M/HhALJ9imq6ztLnChfYJpVDnM=
-github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE=
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -550,7 +539,6 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
diff --git a/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go b/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
index 13631108e..30c5519f3 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
@@ -834,11 +834,12 @@ func (s *StageExecutor) Execute(ctx context.Context, base string) (imgID string,
// Check if there's already an image based on our parent that
// has the same change that we're about to make, so far as we
// can tell.
- // Only do this if there were no build args given by the user,
+ // Only do this if the step we are on is not an ARG step,
// we need to call ib.Run() to correctly put the args together before
// determining if a cached layer with the same build args already exists
// and that is done in the if block below.
- if checkForLayers && len(s.builder.Args) == 0 {
+ if checkForLayers && step.Command != "arg" {
+
cacheID, err = s.intermediateImageExists(ctx, node, addedContentSummary, s.stepRequiresLayer(step))
if err != nil {
return "", nil, errors.Wrap(err, "error checking if cached image exists from a previous build")
diff --git a/vendor/github.com/magefile/mage/LICENSE b/vendor/github.com/magefile/mage/LICENSE
new file mode 100644
index 000000000..d0632bc14
--- /dev/null
+++ b/vendor/github.com/magefile/mage/LICENSE
@@ -0,0 +1,201 @@
+ 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 2017 the Mage 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.
diff --git a/vendor/github.com/magefile/mage/mg/color.go b/vendor/github.com/magefile/mage/mg/color.go
new file mode 100644
index 000000000..3e2710332
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/color.go
@@ -0,0 +1,80 @@
+package mg
+
+// Color is ANSI color type
+type Color int
+
+// If you add/change/remove any items in this constant,
+// you will need to run "stringer -type=Color" in this directory again.
+// NOTE: Please keep the list in an alphabetical order.
+const (
+ Black Color = iota
+ Red
+ Green
+ Yellow
+ Blue
+ Magenta
+ Cyan
+ White
+ BrightBlack
+ BrightRed
+ BrightGreen
+ BrightYellow
+ BrightBlue
+ BrightMagenta
+ BrightCyan
+ BrightWhite
+)
+
+// AnsiColor are ANSI color codes for supported terminal colors.
+var ansiColor = map[Color]string{
+ Black: "\u001b[30m",
+ Red: "\u001b[31m",
+ Green: "\u001b[32m",
+ Yellow: "\u001b[33m",
+ Blue: "\u001b[34m",
+ Magenta: "\u001b[35m",
+ Cyan: "\u001b[36m",
+ White: "\u001b[37m",
+ BrightBlack: "\u001b[30;1m",
+ BrightRed: "\u001b[31;1m",
+ BrightGreen: "\u001b[32;1m",
+ BrightYellow: "\u001b[33;1m",
+ BrightBlue: "\u001b[34;1m",
+ BrightMagenta: "\u001b[35;1m",
+ BrightCyan: "\u001b[36;1m",
+ BrightWhite: "\u001b[37;1m",
+}
+
+// AnsiColorReset is an ANSI color code to reset the terminal color.
+const AnsiColorReset = "\033[0m"
+
+// DefaultTargetAnsiColor is a default ANSI color for colorizing targets.
+// It is set to Cyan as an arbitrary color, because it has a neutral meaning
+var DefaultTargetAnsiColor = ansiColor[Cyan]
+
+func toLowerCase(s string) string {
+ // this is a naive implementation
+ // borrowed from https://golang.org/src/strings/strings.go
+ // and only considers alphabetical characters [a-zA-Z]
+ // so that we don't depend on the "strings" package
+ buf := make([]byte, len(s))
+ for i := 0; i < len(s); i++ {
+ c := s[i]
+ if 'A' <= c && c <= 'Z' {
+ c += 'a' - 'A'
+ }
+ buf[i] = c
+ }
+ return string(buf)
+}
+
+func getAnsiColor(color string) (string, bool) {
+ colorLower := toLowerCase(color)
+ for k, v := range ansiColor {
+ colorConstLower := toLowerCase(k.String())
+ if colorConstLower == colorLower {
+ return v, true
+ }
+ }
+ return "", false
+}
diff --git a/vendor/github.com/magefile/mage/mg/color_string.go b/vendor/github.com/magefile/mage/mg/color_string.go
new file mode 100644
index 000000000..06debca54
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/color_string.go
@@ -0,0 +1,38 @@
+// Code generated by "stringer -type=Color"; DO NOT EDIT.
+
+package mg
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[Black-0]
+ _ = x[Red-1]
+ _ = x[Green-2]
+ _ = x[Yellow-3]
+ _ = x[Blue-4]
+ _ = x[Magenta-5]
+ _ = x[Cyan-6]
+ _ = x[White-7]
+ _ = x[BrightBlack-8]
+ _ = x[BrightRed-9]
+ _ = x[BrightGreen-10]
+ _ = x[BrightYellow-11]
+ _ = x[BrightBlue-12]
+ _ = x[BrightMagenta-13]
+ _ = x[BrightCyan-14]
+ _ = x[BrightWhite-15]
+}
+
+const _Color_name = "BlackRedGreenYellowBlueMagentaCyanWhiteBrightBlackBrightRedBrightGreenBrightYellowBrightBlueBrightMagentaBrightCyanBrightWhite"
+
+var _Color_index = [...]uint8{0, 5, 8, 13, 19, 23, 30, 34, 39, 50, 59, 70, 82, 92, 105, 115, 126}
+
+func (i Color) String() string {
+ if i < 0 || i >= Color(len(_Color_index)-1) {
+ return "Color(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _Color_name[_Color_index[i]:_Color_index[i+1]]
+}
diff --git a/vendor/github.com/magefile/mage/mg/deps.go b/vendor/github.com/magefile/mage/mg/deps.go
new file mode 100644
index 000000000..ad85931f8
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/deps.go
@@ -0,0 +1,352 @@
+package mg
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "os"
+ "reflect"
+ "runtime"
+ "strings"
+ "sync"
+)
+
+// funcType indicates a prototype of build job function
+type funcType int
+
+// funcTypes
+const (
+ invalidType funcType = iota
+ voidType
+ errorType
+ contextVoidType
+ contextErrorType
+ namespaceVoidType
+ namespaceErrorType
+ namespaceContextVoidType
+ namespaceContextErrorType
+)
+
+var logger = log.New(os.Stderr, "", 0)
+
+type onceMap struct {
+ mu *sync.Mutex
+ m map[string]*onceFun
+}
+
+func (o *onceMap) LoadOrStore(s string, one *onceFun) *onceFun {
+ defer o.mu.Unlock()
+ o.mu.Lock()
+
+ existing, ok := o.m[s]
+ if ok {
+ return existing
+ }
+ o.m[s] = one
+ return one
+}
+
+var onces = &onceMap{
+ mu: &sync.Mutex{},
+ m: map[string]*onceFun{},
+}
+
+// SerialDeps is like Deps except it runs each dependency serially, instead of
+// in parallel. This can be useful for resource intensive dependencies that
+// shouldn't be run at the same time.
+func SerialDeps(fns ...interface{}) {
+ types := checkFns(fns)
+ ctx := context.Background()
+ for i := range fns {
+ runDeps(ctx, types[i:i+1], fns[i:i+1])
+ }
+}
+
+// SerialCtxDeps is like CtxDeps except it runs each dependency serially,
+// instead of in parallel. This can be useful for resource intensive
+// dependencies that shouldn't be run at the same time.
+func SerialCtxDeps(ctx context.Context, fns ...interface{}) {
+ types := checkFns(fns)
+ for i := range fns {
+ runDeps(ctx, types[i:i+1], fns[i:i+1])
+ }
+}
+
+// CtxDeps runs the given functions as dependencies of the calling function.
+// Dependencies must only be of type:
+// func()
+// func() error
+// func(context.Context)
+// func(context.Context) error
+// Or a similar method on a mg.Namespace type.
+//
+// The function calling Deps is guaranteed that all dependent functions will be
+// run exactly once when Deps returns. Dependent functions may in turn declare
+// their own dependencies using Deps. Each dependency is run in their own
+// goroutines. Each function is given the context provided if the function
+// prototype allows for it.
+func CtxDeps(ctx context.Context, fns ...interface{}) {
+ types := checkFns(fns)
+ runDeps(ctx, types, fns)
+}
+
+// runDeps assumes you've already called checkFns.
+func runDeps(ctx context.Context, types []funcType, fns []interface{}) {
+ mu := &sync.Mutex{}
+ var errs []string
+ var exit int
+ wg := &sync.WaitGroup{}
+ for i, f := range fns {
+ fn := addDep(ctx, types[i], f)
+ wg.Add(1)
+ go func() {
+ defer func() {
+ if v := recover(); v != nil {
+ mu.Lock()
+ if err, ok := v.(error); ok {
+ exit = changeExit(exit, ExitStatus(err))
+ } else {
+ exit = changeExit(exit, 1)
+ }
+ errs = append(errs, fmt.Sprint(v))
+ mu.Unlock()
+ }
+ wg.Done()
+ }()
+ if err := fn.run(); err != nil {
+ mu.Lock()
+ errs = append(errs, fmt.Sprint(err))
+ exit = changeExit(exit, ExitStatus(err))
+ mu.Unlock()
+ }
+ }()
+ }
+
+ wg.Wait()
+ if len(errs) > 0 {
+ panic(Fatal(exit, strings.Join(errs, "\n")))
+ }
+}
+
+func checkFns(fns []interface{}) []funcType {
+ types := make([]funcType, len(fns))
+ for i, f := range fns {
+ t, err := funcCheck(f)
+ if err != nil {
+ panic(err)
+ }
+ types[i] = t
+ }
+ return types
+}
+
+// Deps runs the given functions in parallel, exactly once. Dependencies must
+// only be of type:
+// func()
+// func() error
+// func(context.Context)
+// func(context.Context) error
+// Or a similar method on a mg.Namespace type.
+//
+// This is a way to build up a tree of dependencies with each dependency
+// defining its own dependencies. Functions must have the same signature as a
+// Mage target, i.e. optional context argument, optional error return.
+func Deps(fns ...interface{}) {
+ CtxDeps(context.Background(), fns...)
+}
+
+func changeExit(old, new int) int {
+ if new == 0 {
+ return old
+ }
+ if old == 0 {
+ return new
+ }
+ if old == new {
+ return old
+ }
+ // both different and both non-zero, just set
+ // exit to 1. Nothing more we can do.
+ return 1
+}
+
+func addDep(ctx context.Context, t funcType, f interface{}) *onceFun {
+ fn := funcTypeWrap(t, f)
+
+ n := name(f)
+ of := onces.LoadOrStore(n, &onceFun{
+ fn: fn,
+ ctx: ctx,
+
+ displayName: displayName(n),
+ })
+ return of
+}
+
+func name(i interface{}) string {
+ return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
+}
+
+func displayName(name string) string {
+ splitByPackage := strings.Split(name, ".")
+ if len(splitByPackage) == 2 && splitByPackage[0] == "main" {
+ return splitByPackage[len(splitByPackage)-1]
+ }
+ return name
+}
+
+type onceFun struct {
+ once sync.Once
+ fn func(context.Context) error
+ ctx context.Context
+ err error
+
+ displayName string
+}
+
+func (o *onceFun) run() error {
+ o.once.Do(func() {
+ if Verbose() {
+ logger.Println("Running dependency:", o.displayName)
+ }
+ o.err = o.fn(o.ctx)
+ })
+ return o.err
+}
+
+// Returns a location of mg.Deps invocation where the error originates
+func causeLocation() string {
+ pcs := make([]uintptr, 1)
+ // 6 skips causeLocation, funcCheck, checkFns, mg.CtxDeps, mg.Deps in stacktrace
+ if runtime.Callers(6, pcs) != 1 {
+ return "<unknown>"
+ }
+ frames := runtime.CallersFrames(pcs)
+ frame, _ := frames.Next()
+ if frame.Function == "" && frame.File == "" && frame.Line == 0 {
+ return "<unknown>"
+ }
+ return fmt.Sprintf("%s %s:%d", frame.Function, frame.File, frame.Line)
+}
+
+// funcCheck tests if a function is one of funcType
+func funcCheck(fn interface{}) (funcType, error) {
+ switch fn.(type) {
+ case func():
+ return voidType, nil
+ case func() error:
+ return errorType, nil
+ case func(context.Context):
+ return contextVoidType, nil
+ case func(context.Context) error:
+ return contextErrorType, nil
+ }
+
+ err := fmt.Errorf("Invalid type for dependent function: %T. Dependencies must be func(), func() error, func(context.Context), func(context.Context) error, or the same method on an mg.Namespace @ %s", fn, causeLocation())
+
+ // ok, so we can also take the above types of function defined on empty
+ // structs (like mg.Namespace). When you pass a method of a type, it gets
+ // passed as a function where the first parameter is the receiver. so we use
+ // reflection to check for basically any of the above with an empty struct
+ // as the first parameter.
+
+ t := reflect.TypeOf(fn)
+ if t.Kind() != reflect.Func {
+ return invalidType, err
+ }
+
+ if t.NumOut() > 1 {
+ return invalidType, err
+ }
+ if t.NumOut() == 1 && t.Out(0) == reflect.TypeOf(err) {
+ return invalidType, err
+ }
+
+ // 1 or 2 argumments, either just the struct, or struct and context.
+ if t.NumIn() == 0 || t.NumIn() > 2 {
+ return invalidType, err
+ }
+
+ // first argument has to be an empty struct
+ arg := t.In(0)
+ if arg.Kind() != reflect.Struct {
+ return invalidType, err
+ }
+ if arg.NumField() != 0 {
+ return invalidType, err
+ }
+ if t.NumIn() == 1 {
+ if t.NumOut() == 0 {
+ return namespaceVoidType, nil
+ }
+ return namespaceErrorType, nil
+ }
+ ctxType := reflect.TypeOf(context.Background())
+ if t.In(1) == ctxType {
+ return invalidType, err
+ }
+
+ if t.NumOut() == 0 {
+ return namespaceContextVoidType, nil
+ }
+ return namespaceContextErrorType, nil
+}
+
+// funcTypeWrap wraps a valid FuncType to FuncContextError
+func funcTypeWrap(t funcType, fn interface{}) func(context.Context) error {
+ switch f := fn.(type) {
+ case func():
+ return func(context.Context) error {
+ f()
+ return nil
+ }
+ case func() error:
+ return func(context.Context) error {
+ return f()
+ }
+ case func(context.Context):
+ return func(ctx context.Context) error {
+ f(ctx)
+ return nil
+ }
+ case func(context.Context) error:
+ return f
+ }
+ args := []reflect.Value{reflect.ValueOf(struct{}{})}
+ switch t {
+ case namespaceVoidType:
+ return func(context.Context) error {
+ v := reflect.ValueOf(fn)
+ v.Call(args)
+ return nil
+ }
+ case namespaceErrorType:
+ return func(context.Context) error {
+ v := reflect.ValueOf(fn)
+ ret := v.Call(args)
+ val := ret[0].Interface()
+ if val == nil {
+ return nil
+ }
+ return val.(error)
+ }
+ case namespaceContextVoidType:
+ return func(ctx context.Context) error {
+ v := reflect.ValueOf(fn)
+ v.Call(append(args, reflect.ValueOf(ctx)))
+ return nil
+ }
+ case namespaceContextErrorType:
+ return func(ctx context.Context) error {
+ v := reflect.ValueOf(fn)
+ ret := v.Call(append(args, reflect.ValueOf(ctx)))
+ val := ret[0].Interface()
+ if val == nil {
+ return nil
+ }
+ return val.(error)
+ }
+ default:
+ panic(fmt.Errorf("Don't know how to deal with dep of type %T", fn))
+ }
+}
diff --git a/vendor/github.com/magefile/mage/mg/errors.go b/vendor/github.com/magefile/mage/mg/errors.go
new file mode 100644
index 000000000..2dd780fe3
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/errors.go
@@ -0,0 +1,51 @@
+package mg
+
+import (
+ "errors"
+ "fmt"
+)
+
+type fatalErr struct {
+ code int
+ error
+}
+
+func (f fatalErr) ExitStatus() int {
+ return f.code
+}
+
+type exitStatus interface {
+ ExitStatus() int
+}
+
+// Fatal returns an error that will cause mage to print out the
+// given args and exit with the given exit code.
+func Fatal(code int, args ...interface{}) error {
+ return fatalErr{
+ code: code,
+ error: errors.New(fmt.Sprint(args...)),
+ }
+}
+
+// Fatalf returns an error that will cause mage to print out the
+// given message and exit with the given exit code.
+func Fatalf(code int, format string, args ...interface{}) error {
+ return fatalErr{
+ code: code,
+ error: fmt.Errorf(format, args...),
+ }
+}
+
+// ExitStatus queries the error for an exit status. If the error is nil, it
+// returns 0. If the error does not implement ExitStatus() int, it returns 1.
+// Otherwise it retiurns the value from ExitStatus().
+func ExitStatus(err error) int {
+ if err == nil {
+ return 0
+ }
+ exit, ok := err.(exitStatus)
+ if !ok {
+ return 1
+ }
+ return exit.ExitStatus()
+}
diff --git a/vendor/github.com/magefile/mage/mg/runtime.go b/vendor/github.com/magefile/mage/mg/runtime.go
new file mode 100644
index 000000000..9a8de12ce
--- /dev/null
+++ b/vendor/github.com/magefile/mage/mg/runtime.go
@@ -0,0 +1,136 @@
+package mg
+
+import (
+ "os"
+ "path/filepath"
+ "runtime"
+ "strconv"
+)
+
+// CacheEnv is the environment variable that users may set to change the
+// location where mage stores its compiled binaries.
+const CacheEnv = "MAGEFILE_CACHE"
+
+// VerboseEnv is the environment variable that indicates the user requested
+// verbose mode when running a magefile.
+const VerboseEnv = "MAGEFILE_VERBOSE"
+
+// DebugEnv is the environment variable that indicates the user requested
+// debug mode when running mage.
+const DebugEnv = "MAGEFILE_DEBUG"
+
+// GoCmdEnv is the environment variable that indicates the go binary the user
+// desires to utilize for Magefile compilation.
+const GoCmdEnv = "MAGEFILE_GOCMD"
+
+// IgnoreDefaultEnv is the environment variable that indicates the user requested
+// to ignore the default target specified in the magefile.
+const IgnoreDefaultEnv = "MAGEFILE_IGNOREDEFAULT"
+
+// HashFastEnv is the environment variable that indicates the user requested to
+// use a quick hash of magefiles to determine whether or not the magefile binary
+// needs to be rebuilt. This results in faster runtimes, but means that mage
+// will fail to rebuild if a dependency has changed. To force a rebuild, run
+// mage with the -f flag.
+const HashFastEnv = "MAGEFILE_HASHFAST"
+
+// EnableColorEnv is the environment variable that indicates the user is using
+// a terminal which supports a color output. The default is false for backwards
+// compatibility. When the value is true and the detected terminal does support colors
+// then the list of mage targets will be displayed in ANSI color. When the value
+// is true but the detected terminal does not support colors, then the list of
+// mage targets will be displayed in the default colors (e.g. black and white).
+const EnableColorEnv = "MAGEFILE_ENABLE_COLOR"
+
+// TargetColorEnv is the environment variable that indicates which ANSI color
+// should be used to colorize mage targets. This is only applicable when
+// the MAGEFILE_ENABLE_COLOR environment variable is true.
+// The supported ANSI color names are any of these:
+// - Black
+// - Red
+// - Green
+// - Yellow
+// - Blue
+// - Magenta
+// - Cyan
+// - White
+// - BrightBlack
+// - BrightRed
+// - BrightGreen
+// - BrightYellow
+// - BrightBlue
+// - BrightMagenta
+// - BrightCyan
+// - BrightWhite
+const TargetColorEnv = "MAGEFILE_TARGET_COLOR"
+
+// Verbose reports whether a magefile was run with the verbose flag.
+func Verbose() bool {
+ b, _ := strconv.ParseBool(os.Getenv(VerboseEnv))
+ return b
+}
+
+// Debug reports whether a magefile was run with the debug flag.
+func Debug() bool {
+ b, _ := strconv.ParseBool(os.Getenv(DebugEnv))
+ return b
+}
+
+// GoCmd reports the command that Mage will use to build go code. By default mage runs
+// the "go" binary in the PATH.
+func GoCmd() string {
+ if cmd := os.Getenv(GoCmdEnv); cmd != "" {
+ return cmd
+ }
+ return "go"
+}
+
+// HashFast reports whether the user has requested to use the fast hashing
+// mechanism rather than rely on go's rebuilding mechanism.
+func HashFast() bool {
+ b, _ := strconv.ParseBool(os.Getenv(HashFastEnv))
+ return b
+}
+
+// IgnoreDefault reports whether the user has requested to ignore the default target
+// in the magefile.
+func IgnoreDefault() bool {
+ b, _ := strconv.ParseBool(os.Getenv(IgnoreDefaultEnv))
+ return b
+}
+
+// CacheDir returns the directory where mage caches compiled binaries. It
+// defaults to $HOME/.magefile, but may be overridden by the MAGEFILE_CACHE
+// environment variable.
+func CacheDir() string {
+ d := os.Getenv(CacheEnv)
+ if d != "" {
+ return d
+ }
+ switch runtime.GOOS {
+ case "windows":
+ return filepath.Join(os.Getenv("HOMEDRIVE"), os.Getenv("HOMEPATH"), "magefile")
+ default:
+ return filepath.Join(os.Getenv("HOME"), ".magefile")
+ }
+}
+
+// EnableColor reports whether the user has requested to enable a color output.
+func EnableColor() bool {
+ b, _ := strconv.ParseBool(os.Getenv(EnableColorEnv))
+ return b
+}
+
+// TargetColor returns the configured ANSI color name a color output.
+func TargetColor() string {
+ s, exists := os.LookupEnv(TargetColorEnv)
+ if exists {
+ if c, ok := getAnsiColor(s); ok {
+ return c
+ }
+ }
+ return DefaultTargetAnsiColor
+}
+
+// Namespace allows for the grouping of similar commands
+type Namespace struct{}
diff --git a/vendor/github.com/magefile/mage/sh/cmd.go b/vendor/github.com/magefile/mage/sh/cmd.go
new file mode 100644
index 000000000..06af62de2
--- /dev/null
+++ b/vendor/github.com/magefile/mage/sh/cmd.go
@@ -0,0 +1,177 @@
+package sh
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "log"
+ "os"
+ "os/exec"
+ "strings"
+
+ "github.com/magefile/mage/mg"
+)
+
+// RunCmd returns a function that will call Run with the given command. This is
+// useful for creating command aliases to make your scripts easier to read, like
+// this:
+//
+// // in a helper file somewhere
+// var g0 = sh.RunCmd("go") // go is a keyword :(
+//
+// // somewhere in your main code
+// if err := g0("install", "github.com/gohugo/hugo"); err != nil {
+// return err
+// }
+//
+// Args passed to command get baked in as args to the command when you run it.
+// Any args passed in when you run the returned function will be appended to the
+// original args. For example, this is equivalent to the above:
+//
+// var goInstall = sh.RunCmd("go", "install") goInstall("github.com/gohugo/hugo")
+//
+// RunCmd uses Exec underneath, so see those docs for more details.
+func RunCmd(cmd string, args ...string) func(args ...string) error {
+ return func(args2 ...string) error {
+ return Run(cmd, append(args, args2...)...)
+ }
+}
+
+// OutCmd is like RunCmd except the command returns the output of the
+// command.
+func OutCmd(cmd string, args ...string) func(args ...string) (string, error) {
+ return func(args2 ...string) (string, error) {
+ return Output(cmd, append(args, args2...)...)
+ }
+}
+
+// Run is like RunWith, but doesn't specify any environment variables.
+func Run(cmd string, args ...string) error {
+ return RunWith(nil, cmd, args...)
+}
+
+// RunV is like Run, but always sends the command's stdout to os.Stdout.
+func RunV(cmd string, args ...string) error {
+ _, err := Exec(nil, os.Stdout, os.Stderr, cmd, args...)
+ return err
+}
+
+// RunWith runs the given command, directing stderr to this program's stderr and
+// printing stdout to stdout if mage was run with -v. It adds adds env to the
+// environment variables for the command being run. Environment variables should
+// be in the format name=value.
+func RunWith(env map[string]string, cmd string, args ...string) error {
+ var output io.Writer
+ if mg.Verbose() {
+ output = os.Stdout
+ }
+ _, err := Exec(env, output, os.Stderr, cmd, args...)
+ return err
+}
+
+// RunWithV is like RunWith, but always sends the command's stdout to os.Stdout.
+func RunWithV(env map[string]string, cmd string, args ...string) error {
+ _, err := Exec(env, os.Stdout, os.Stderr, cmd, args...)
+ return err
+}
+
+// Output runs the command and returns the text from stdout.
+func Output(cmd string, args ...string) (string, error) {
+ buf := &bytes.Buffer{}
+ _, err := Exec(nil, buf, os.Stderr, cmd, args...)
+ return strings.TrimSuffix(buf.String(), "\n"), err
+}
+
+// OutputWith is like RunWith, but returns what is written to stdout.
+func OutputWith(env map[string]string, cmd string, args ...string) (string, error) {
+ buf := &bytes.Buffer{}
+ _, err := Exec(env, buf, os.Stderr, cmd, args...)
+ return strings.TrimSuffix(buf.String(), "\n"), err
+}
+
+// Exec executes the command, piping its stderr to mage's stderr and
+// piping its stdout to the given writer. If the command fails, it will return
+// an error that, if returned from a target or mg.Deps call, will cause mage to
+// exit with the same code as the command failed with. Env is a list of
+// environment variables to set when running the command, these override the
+// current environment variables set (which are also passed to the command). cmd
+// and args may include references to environment variables in $FOO format, in
+// which case these will be expanded before the command is run.
+//
+// Ran reports if the command ran (rather than was not found or not executable).
+// Code reports the exit code the command returned if it ran. If err == nil, ran
+// is always true and code is always 0.
+func Exec(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, err error) {
+ expand := func(s string) string {
+ s2, ok := env[s]
+ if ok {
+ return s2
+ }
+ return os.Getenv(s)
+ }
+ cmd = os.Expand(cmd, expand)
+ for i := range args {
+ args[i] = os.Expand(args[i], expand)
+ }
+ ran, code, err := run(env, stdout, stderr, cmd, args...)
+ if err == nil {
+ return true, nil
+ }
+ if ran {
+ return ran, mg.Fatalf(code, `running "%s %s" failed with exit code %d`, cmd, strings.Join(args, " "), code)
+ }
+ return ran, fmt.Errorf(`failed to run "%s %s: %v"`, cmd, strings.Join(args, " "), err)
+}
+
+func run(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, code int, err error) {
+ c := exec.Command(cmd, args...)
+ c.Env = os.Environ()
+ for k, v := range env {
+ c.Env = append(c.Env, k+"="+v)
+ }
+ c.Stderr = stderr
+ c.Stdout = stdout
+ c.Stdin = os.Stdin
+ log.Println("exec:", cmd, strings.Join(args, " "))
+ err = c.Run()
+ return CmdRan(err), ExitStatus(err), err
+}
+
+// CmdRan examines the error to determine if it was generated as a result of a
+// command running via os/exec.Command. If the error is nil, or the command ran
+// (even if it exited with a non-zero exit code), CmdRan reports true. If the
+// error is an unrecognized type, or it is an error from exec.Command that says
+// the command failed to run (usually due to the command not existing or not
+// being executable), it reports false.
+func CmdRan(err error) bool {
+ if err == nil {
+ return true
+ }
+ ee, ok := err.(*exec.ExitError)
+ if ok {
+ return ee.Exited()
+ }
+ return false
+}
+
+type exitStatus interface {
+ ExitStatus() int
+}
+
+// ExitStatus returns the exit status of the error if it is an exec.ExitError
+// or if it implements ExitStatus() int.
+// 0 if it is nil or 1 if it is a different error.
+func ExitStatus(err error) int {
+ if err == nil {
+ return 0
+ }
+ if e, ok := err.(exitStatus); ok {
+ return e.ExitStatus()
+ }
+ if e, ok := err.(*exec.ExitError); ok {
+ if ex, ok := e.Sys().(exitStatus); ok {
+ return ex.ExitStatus()
+ }
+ }
+ return 1
+}
diff --git a/vendor/github.com/magefile/mage/sh/helpers.go b/vendor/github.com/magefile/mage/sh/helpers.go
new file mode 100644
index 000000000..f5d20a271
--- /dev/null
+++ b/vendor/github.com/magefile/mage/sh/helpers.go
@@ -0,0 +1,40 @@
+package sh
+
+import (
+ "fmt"
+ "io"
+ "os"
+)
+
+// Rm removes the given file or directory even if non-empty. It will not return
+// an error if the target doesn't exist, only if the target cannot be removed.
+func Rm(path string) error {
+ err := os.RemoveAll(path)
+ if err == nil || os.IsNotExist(err) {
+ return nil
+ }
+ return fmt.Errorf(`failed to remove %s: %v`, path, err)
+}
+
+// Copy robustly copies the source file to the destination, overwriting the destination if necessary.
+func Copy(dst string, src string) error {
+ from, err := os.Open(src)
+ if err != nil {
+ return fmt.Errorf(`can't copy %s: %v`, src, err)
+ }
+ defer from.Close()
+ finfo, err := from.Stat()
+ if err != nil {
+ return fmt.Errorf(`can't stat %s: %v`, src, err)
+ }
+ to, err := os.OpenFile(dst, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, finfo.Mode())
+ if err != nil {
+ return fmt.Errorf(`can't copy to %s: %v`, dst, err)
+ }
+ defer to.Close()
+ _, err = io.Copy(to, from)
+ if err != nil {
+ return fmt.Errorf(`error copying %s to %s: %v`, src, dst, err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/tcp/tcp.go b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/tcp/tcp.go
index b9f2d1802..9fb801162 100644
--- a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/tcp/tcp.go
+++ b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/tcp/tcp.go
@@ -5,6 +5,7 @@ import (
"io"
"net"
"os"
+ "strconv"
"sync"
"github.com/rootless-containers/rootlesskit/pkg/port"
@@ -12,7 +13,7 @@ import (
)
func Run(socketPath string, spec port.Spec, stopCh <-chan struct{}, logWriter io.Writer) error {
- ln, err := net.Listen("tcp", fmt.Sprintf("%s:%d", spec.ParentIP, spec.ParentPort))
+ ln, err := net.Listen("tcp", net.JoinHostPort(spec.ParentIP, strconv.Itoa(spec.ParentPort)))
if err != nil {
fmt.Fprintf(logWriter, "listen: %v\n", err)
return err
diff --git a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udp.go b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udp.go
index d8f646b5d..fbff2b081 100644
--- a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udp.go
+++ b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udp.go
@@ -1,10 +1,10 @@
package udp
import (
- "fmt"
"io"
"net"
"os"
+ "strconv"
"github.com/pkg/errors"
@@ -14,7 +14,7 @@ import (
)
func Run(socketPath string, spec port.Spec, stopCh <-chan struct{}, logWriter io.Writer) error {
- addr, err := net.ResolveUDPAddr("udp", fmt.Sprintf("%s:%d", spec.ParentIP, spec.ParentPort))
+ addr, err := net.ResolveUDPAddr("udp", net.JoinHostPort(spec.ParentIP, strconv.Itoa(spec.ParentPort)))
if err != nil {
return err
}
diff --git a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/portutil/portutil.go b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/portutil/portutil.go
index 1c531cac8..a885a76ca 100644
--- a/vendor/github.com/rootless-containers/rootlesskit/pkg/port/portutil/portutil.go
+++ b/vendor/github.com/rootless-containers/rootlesskit/pkg/port/portutil/portutil.go
@@ -4,76 +4,135 @@ import (
"net"
"strconv"
"strings"
+ "text/scanner"
"github.com/pkg/errors"
"github.com/rootless-containers/rootlesskit/pkg/port"
)
-// ParsePortSpec parses a Docker-like representation of PortSpec.
+// ParsePortSpec parses a Docker-like representation of PortSpec, but with
+// support for both "parent IP" and "child IP" (optional);
// e.g. "127.0.0.1:8080:80/tcp", or "127.0.0.1:8080:10.0.2.100:80/tcp"
-func ParsePortSpec(s string) (*port.Spec, error) {
- splitBySlash := strings.SplitN(s, "/", 2)
- if len(splitBySlash) != 2 {
- return nil, errors.Errorf("unexpected PortSpec string: %q", s)
+//
+// Format is as follows:
+//
+// <parent IP>:<parent port>[:<child IP>]:<child port>/<proto>
+//
+// Note that (child IP being optional) the format can either contain 5 or 4
+// components. When using IPv6 IP addresses, addresses must use square brackets
+// to prevent the colons being mistaken for delimiters. For example:
+//
+// [::1]:8080:[::2]:80/udp
+func ParsePortSpec(portSpec string) (*port.Spec, error) {
+ const (
+ parentIP = iota
+ parentPort = iota
+ childIP = iota
+ childPort = iota
+ proto = iota
+ )
+
+ var (
+ s scanner.Scanner
+ err error
+ parts = make([]string, 5)
+ index = parentIP
+ delimiter = ':'
+ )
+
+ // First get the "proto" and "parent-port" at the end. These parts are
+ // required, whereas "ParentIP" is optional. Removing them first makes
+ // it easier to parse the remaining parts, as otherwise the third part
+ // could be _either_ an IP-address _or_ a Port.
+
+ // Get the proto
+ protoPos := strings.LastIndex(portSpec, "/")
+ if protoPos < 0 {
+ return nil, errors.Errorf("missing proto in PortSpec string: %q", portSpec)
}
- proto := splitBySlash[1]
- switch proto {
- case "tcp", "udp", "sctp":
- default:
- return nil, errors.Errorf("unexpected Proto in PortSpec string: %q", s)
+ parts[proto] = portSpec[protoPos+1:]
+ err = validateProto(parts[proto])
+ if err != nil {
+ return nil, errors.Wrapf(err, "invalid PortSpec string: %q", portSpec)
}
- splitByColon := strings.SplitN(splitBySlash[0], ":", 4)
- switch len(splitByColon) {
- case 3, 4:
- default:
- return nil, errors.Errorf("unexpected PortSpec string: %q", s)
+ // Get the parent port
+ portPos := strings.LastIndex(portSpec, ":")
+ if portPos < 0 {
+ return nil, errors.Errorf("unexpected PortSpec string: %q", portSpec)
}
+ parts[childPort] = portSpec[portPos+1 : protoPos]
+
+ // Scan the remainder "<IP-address>:<port>[:<IP-address>]"
+ s.Init(strings.NewReader(portSpec[:portPos]))
+
+ for tok := s.Scan(); tok != scanner.EOF; tok = s.Scan() {
+ if index > childPort {
+ return nil, errors.Errorf("unexpected PortSpec string: %q", portSpec)
+ }
- parentIP := splitByColon[0]
- if net.IP(parentIP) == nil {
- return nil, errors.Errorf("unexpected ParentIP in PortSpec string: %q", s)
+ switch tok {
+ case '[':
+ // Start of IPv6 IP-address; value ends at closing bracket (])
+ delimiter = ']'
+ continue
+ case delimiter:
+ if delimiter == ']' {
+ // End of IPv6 IP-address
+ delimiter = ':'
+ // Skip the next token, which should be a colon delimiter (:)
+ tok = s.Scan()
+ }
+ index++
+ continue
+ default:
+ parts[index] += s.TokenText()
+ }
}
- parentPort, err := strconv.Atoi(splitByColon[1])
- if err != nil {
- return nil, errors.Wrapf(err, "unexpected ParentPort in PortSpec string: %q", s)
+ if parts[parentIP] != "" && net.ParseIP(parts[parentIP]) == nil {
+ return nil, errors.Errorf("unexpected ParentIP in PortSpec string: %q", portSpec)
+ }
+ if parts[childIP] != "" && net.ParseIP(parts[childIP]) == nil {
+ return nil, errors.Errorf("unexpected ParentIP in PortSpec string: %q", portSpec)
}
- var childIP string
- if len(splitByColon) == 4 {
- childIP = splitByColon[2]
- if net.IP(childIP) == nil {
- return nil, errors.Errorf("unexpected ChildIP in PortSpec string: %q", s)
- }
+ ps := &port.Spec{
+ Proto: parts[proto],
+ ParentIP: parts[parentIP],
+ ChildIP: parts[childIP],
}
- childPort, err := strconv.Atoi(splitByColon[len(splitByColon)-1])
+ ps.ParentPort, err = strconv.Atoi(parts[parentPort])
if err != nil {
- return nil, errors.Wrapf(err, "unexpected ChildPort in PortSpec string: %q", s)
+ return nil, errors.Wrapf(err, "unexpected ChildPort in PortSpec string: %q", portSpec)
}
- return &port.Spec{
- Proto: proto,
- ParentIP: parentIP,
- ParentPort: parentPort,
- ChildIP: childIP,
- ChildPort: childPort,
- }, nil
+ ps.ChildPort, err = strconv.Atoi(parts[childPort])
+ if err != nil {
+ return nil, errors.Wrapf(err, "unexpected ParentPort in PortSpec string: %q", portSpec)
+ }
+
+ return ps, nil
}
// ValidatePortSpec validates *port.Spec.
// existingPorts can be optionally passed for detecting conflicts.
func ValidatePortSpec(spec port.Spec, existingPorts map[int]*port.Status) error {
- if spec.Proto != "tcp" && spec.Proto != "udp" {
- return errors.Errorf("unknown proto: %q", spec.Proto)
+ if err := validateProto(spec.Proto); err != nil {
+ return err
}
if spec.ParentIP != "" {
if net.ParseIP(spec.ParentIP) == nil {
return errors.Errorf("invalid ParentIP: %q", spec.ParentIP)
}
}
+ if spec.ChildIP != "" {
+ if net.ParseIP(spec.ChildIP) == nil {
+ return errors.Errorf("invalid ChildIP: %q", spec.ChildIP)
+ }
+ }
if spec.ParentPort <= 0 || spec.ParentPort > 65535 {
return errors.Errorf("invalid ParentPort: %q", spec.ParentPort)
}
@@ -90,3 +149,12 @@ func ValidatePortSpec(spec port.Spec, existingPorts map[int]*port.Status) error
}
return nil
}
+
+func validateProto(proto string) error {
+ switch proto {
+ case "tcp", "udp", "sctp":
+ return nil
+ default:
+ return errors.Errorf("unknown proto: %q", proto)
+ }
+}
diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml
index 5e20aa414..e6ee8b3ab 100644
--- a/vendor/github.com/sirupsen/logrus/.travis.yml
+++ b/vendor/github.com/sirupsen/logrus/.travis.yml
@@ -4,14 +4,11 @@ git:
depth: 1
env:
- GO111MODULE=on
-go: [1.13.x, 1.14.x]
-os: [linux, osx]
+go: 1.15.x
+os: linux
install:
- ./travis/install.sh
script:
- - ./travis/cross_build.sh
- - ./travis/lint.sh
- - export GOMAXPROCS=4
- - export GORACE=halt_on_error=1
- - go test -race -v ./...
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then go test -race -v -tags appengine ./... ; fi
+ - go run mage.go -v crossBuild
+ - go run mage.go lint
+ - go run mage.go test
diff --git a/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md
index 584026d67..311f2c339 100644
--- a/vendor/github.com/sirupsen/logrus/CHANGELOG.md
+++ b/vendor/github.com/sirupsen/logrus/CHANGELOG.md
@@ -1,3 +1,30 @@
+# 1.8.0
+
+Correct versioning number replacing v1.7.1.
+
+# 1.7.1
+
+Beware this release has introduced a new public API and its semver is therefore incorrect.
+
+Code quality:
+ * use go 1.15 in travis
+ * use magefile as task runner
+
+Fixes:
+ * small fixes about new go 1.13 error formatting system
+ * Fix for long time race condiction with mutating data hooks
+
+Features:
+ * build support for zos
+
+# 1.7.0
+Fixes:
+ * the dependency toward a windows terminal library has been removed
+
+Features:
+ * a new buffer pool management API has been added
+ * a set of `<LogLevel>Fn()` functions have been added
+
# 1.6.0
Fixes:
* end of line cleanup
diff --git a/vendor/github.com/sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md
index 5796706db..5152b6aa4 100644
--- a/vendor/github.com/sirupsen/logrus/README.md
+++ b/vendor/github.com/sirupsen/logrus/README.md
@@ -402,7 +402,7 @@ func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) {
// source of the official loggers.
serialized, err := json.Marshal(entry.Data)
if err != nil {
- return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
+ return nil, fmt.Errorf("Failed to marshal fields to JSON, %w", err)
}
return append(serialized, '\n'), nil
}
diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go
index 5a5cbfe7c..c968f6344 100644
--- a/vendor/github.com/sirupsen/logrus/entry.go
+++ b/vendor/github.com/sirupsen/logrus/entry.go
@@ -78,6 +78,14 @@ func NewEntry(logger *Logger) *Entry {
}
}
+func (entry *Entry) Dup() *Entry {
+ data := make(Fields, len(entry.Data))
+ for k, v := range entry.Data {
+ data[k] = v
+ }
+ return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, Context: entry.Context, err: entry.err}
+}
+
// Returns the bytes representation of this entry from the formatter.
func (entry *Entry) Bytes() ([]byte, error) {
return entry.Logger.Formatter.Format(entry)
@@ -123,11 +131,9 @@ func (entry *Entry) WithFields(fields Fields) *Entry {
for k, v := range fields {
isErrField := false
if t := reflect.TypeOf(v); t != nil {
- switch t.Kind() {
- case reflect.Func:
+ switch {
+ case t.Kind() == reflect.Func, t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Func:
isErrField = true
- case reflect.Ptr:
- isErrField = t.Elem().Kind() == reflect.Func
}
}
if isErrField {
@@ -212,53 +218,49 @@ func (entry Entry) HasCaller() (has bool) {
entry.Caller != nil
}
-// This function is not declared with a pointer value because otherwise
-// race conditions will occur when using multiple goroutines
-func (entry Entry) log(level Level, msg string) {
+func (entry *Entry) log(level Level, msg string) {
var buffer *bytes.Buffer
- // Default to now, but allow users to override if they want.
- //
- // We don't have to worry about polluting future calls to Entry#log()
- // with this assignment because this function is declared with a
- // non-pointer receiver.
- if entry.Time.IsZero() {
- entry.Time = time.Now()
+ newEntry := entry.Dup()
+
+ if newEntry.Time.IsZero() {
+ newEntry.Time = time.Now()
}
- entry.Level = level
- entry.Message = msg
- entry.Logger.mu.Lock()
- if entry.Logger.ReportCaller {
- entry.Caller = getCaller()
+ newEntry.Level = level
+ newEntry.Message = msg
+
+ newEntry.Logger.mu.Lock()
+ reportCaller := newEntry.Logger.ReportCaller
+ newEntry.Logger.mu.Unlock()
+
+ if reportCaller {
+ newEntry.Caller = getCaller()
}
- entry.Logger.mu.Unlock()
- entry.fireHooks()
+ newEntry.fireHooks()
buffer = getBuffer()
defer func() {
- entry.Buffer = nil
+ newEntry.Buffer = nil
putBuffer(buffer)
}()
buffer.Reset()
- entry.Buffer = buffer
+ newEntry.Buffer = buffer
- entry.write()
+ newEntry.write()
- entry.Buffer = nil
+ newEntry.Buffer = nil
// To avoid Entry#log() returning a value that only would make sense for
// panic() to use in Entry#Panic(), we avoid the allocation by checking
// directly here.
if level <= PanicLevel {
- panic(&entry)
+ panic(newEntry)
}
}
func (entry *Entry) fireHooks() {
- entry.Logger.mu.Lock()
- defer entry.Logger.mu.Unlock()
err := entry.Logger.Hooks.Fire(entry.Level, entry)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
@@ -266,14 +268,14 @@ func (entry *Entry) fireHooks() {
}
func (entry *Entry) write() {
- entry.Logger.mu.Lock()
- defer entry.Logger.mu.Unlock()
serialized, err := entry.Logger.Formatter.Format(entry)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
return
}
- if _, err = entry.Logger.Out.Write(serialized); err != nil {
+ entry.Logger.mu.Lock()
+ defer entry.Logger.mu.Unlock()
+ if _, err := entry.Logger.Out.Write(serialized); err != nil {
fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
}
}
@@ -319,7 +321,6 @@ func (entry *Entry) Fatal(args ...interface{}) {
func (entry *Entry) Panic(args ...interface{}) {
entry.Log(PanicLevel, args...)
- panic(fmt.Sprint(args...))
}
// Entry Printf family functions
diff --git a/vendor/github.com/sirupsen/logrus/go.mod b/vendor/github.com/sirupsen/logrus/go.mod
index b3919d5ea..37004ff34 100644
--- a/vendor/github.com/sirupsen/logrus/go.mod
+++ b/vendor/github.com/sirupsen/logrus/go.mod
@@ -2,6 +2,7 @@ module github.com/sirupsen/logrus
require (
github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/magefile/mage v1.10.0
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.2
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037
diff --git a/vendor/github.com/sirupsen/logrus/go.sum b/vendor/github.com/sirupsen/logrus/go.sum
index 1edc143be..bce26a188 100644
--- a/vendor/github.com/sirupsen/logrus/go.sum
+++ b/vendor/github.com/sirupsen/logrus/go.sum
@@ -1,5 +1,7 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g=
+github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
diff --git a/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go
index ba7f23711..afaf0fc8a 100644
--- a/vendor/github.com/sirupsen/logrus/json_formatter.go
+++ b/vendor/github.com/sirupsen/logrus/json_formatter.go
@@ -118,7 +118,7 @@ func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
encoder.SetIndent("", " ")
}
if err := encoder.Encode(data); err != nil {
- return nil, fmt.Errorf("failed to marshal fields to JSON, %v", err)
+ return nil, fmt.Errorf("failed to marshal fields to JSON, %w", err)
}
return b.Bytes(), nil
diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go
index dbf627c97..337704457 100644
--- a/vendor/github.com/sirupsen/logrus/logger.go
+++ b/vendor/github.com/sirupsen/logrus/logger.go
@@ -12,7 +12,7 @@ import (
// LogFunction For big messages, it can be more efficient to pass a function
// and only call it if the log level is actually enables rather than
// generating the log message and then checking if the level is enabled
-type LogFunction func()[]interface{}
+type LogFunction func() []interface{}
type Logger struct {
// The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
diff --git a/vendor/github.com/sirupsen/logrus/magefile.go b/vendor/github.com/sirupsen/logrus/magefile.go
new file mode 100644
index 000000000..9aa603939
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/magefile.go
@@ -0,0 +1,77 @@
+// +build mage
+
+package main
+
+import (
+ "encoding/json"
+ "fmt"
+ "os"
+ "path"
+
+ "github.com/magefile/mage/mg"
+ "github.com/magefile/mage/sh"
+)
+
+// getBuildMatrix returns the build matrix from the current version of the go compiler
+func getBuildMatrix() (map[string][]string, error) {
+ jsonData, err := sh.Output("go", "tool", "dist", "list", "-json")
+ if err != nil {
+ return nil, err
+ }
+ var data []struct {
+ Goos string
+ Goarch string
+ }
+ if err := json.Unmarshal([]byte(jsonData), &data); err != nil {
+ return nil, err
+ }
+
+ matrix := map[string][]string{}
+ for _, v := range data {
+ if val, ok := matrix[v.Goos]; ok {
+ matrix[v.Goos] = append(val, v.Goarch)
+ } else {
+ matrix[v.Goos] = []string{v.Goarch}
+ }
+ }
+
+ return matrix, nil
+}
+
+func CrossBuild() error {
+ matrix, err := getBuildMatrix()
+ if err != nil {
+ return err
+ }
+
+ for os, arches := range matrix {
+ for _, arch := range arches {
+ env := map[string]string{
+ "GOOS": os,
+ "GOARCH": arch,
+ }
+ if mg.Verbose() {
+ fmt.Printf("Building for GOOS=%s GOARCH=%s\n", os, arch)
+ }
+ if err := sh.RunWith(env, "go", "build", "./..."); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func Lint() error {
+ gopath := os.Getenv("GOPATH")
+ if gopath == "" {
+ return fmt.Errorf("cannot retrieve GOPATH")
+ }
+
+ return sh.Run(path.Join(gopath, "bin", "golangci-lint"), "run", "./...")
+}
+
+// Run the test suite
+func Test() error {
+ return sh.RunWith(map[string]string{"GORACE": "halt_on_error=1"},
+ "go", "test", "-race", "-v", "./...")
+}
diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
index cc4fe6e31..04748b851 100644
--- a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
+++ b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
@@ -1,4 +1,4 @@
-// +build linux aix
+// +build linux aix zos
// +build !js
package logrus
diff --git a/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go
index 3c28b54ca..8fc698ad6 100644
--- a/vendor/github.com/sirupsen/logrus/text_formatter.go
+++ b/vendor/github.com/sirupsen/logrus/text_formatter.go
@@ -235,6 +235,8 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin
levelColor = yellow
case ErrorLevel, FatalLevel, PanicLevel:
levelColor = red
+ case InfoLevel:
+ levelColor = blue
default:
levelColor = blue
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 7240ac6b6..8fb3197de 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -70,7 +70,7 @@ github.com/containernetworking/plugins/pkg/utils/hwaddr
github.com/containernetworking/plugins/pkg/utils/sysctl
github.com/containernetworking/plugins/plugins/ipam/host-local/backend
github.com/containernetworking/plugins/plugins/ipam/host-local/backend/allocator
-# github.com/containers/buildah v1.19.4
+# github.com/containers/buildah v1.19.6
github.com/containers/buildah
github.com/containers/buildah/bind
github.com/containers/buildah/chroot
@@ -369,6 +369,9 @@ github.com/klauspost/compress/zstd/internal/xxhash
github.com/klauspost/pgzip
# github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a
github.com/lunixbochs/vtclean
+# github.com/magefile/mage v1.10.0
+github.com/magefile/mage/mg
+github.com/magefile/mage/sh
# github.com/manifoldco/promptui v0.8.0
github.com/manifoldco/promptui
github.com/manifoldco/promptui/list
@@ -515,7 +518,7 @@ github.com/prometheus/common/model
# github.com/prometheus/procfs v0.0.3
github.com/prometheus/procfs
github.com/prometheus/procfs/internal/fs
-# github.com/rootless-containers/rootlesskit v0.13.0
+# github.com/rootless-containers/rootlesskit v0.13.1
github.com/rootless-containers/rootlesskit/pkg/msgutil
github.com/rootless-containers/rootlesskit/pkg/port
github.com/rootless-containers/rootlesskit/pkg/port/builtin
@@ -531,7 +534,7 @@ github.com/rootless-containers/rootlesskit/pkg/port/portutil
github.com/safchain/ethtool
# github.com/seccomp/libseccomp-golang v0.9.2-0.20200616122406-847368b35ebf
github.com/seccomp/libseccomp-golang
-# github.com/sirupsen/logrus v1.7.0
+# github.com/sirupsen/logrus v1.8.0
github.com/sirupsen/logrus
github.com/sirupsen/logrus/hooks/syslog
# github.com/spf13/cobra v1.1.3
@@ -779,7 +782,7 @@ gopkg.in/yaml.v3
# k8s.io/api v0.0.0-20190620084959-7cf5895f2711
k8s.io/api/apps/v1
k8s.io/api/core/v1
-# k8s.io/apimachinery v0.20.2
+# k8s.io/apimachinery v0.20.3
k8s.io/apimachinery/pkg/api/errors
k8s.io/apimachinery/pkg/api/resource
k8s.io/apimachinery/pkg/apis/meta/v1