summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xAPI.md2
-rw-r--r--cmd/podman/commands.go1
-rw-r--r--cmd/podman/info.go17
-rw-r--r--cmd/podman/main.go1
-rw-r--r--cmd/podman/varlink/io.podman.varlink3
-rw-r--r--cmd/podman/version.go18
-rw-r--r--commands.md13
-rw-r--r--docs/podman-image-trust.1.md2
-rw-r--r--libpod/version.go22
-rw-r--r--pkg/varlinkapi/system.go11
-rw-r--r--test/e2e/version_test.go2
-rw-r--r--transfer.md41
-rw-r--r--vendor.conf2
-rw-r--r--vendor/github.com/containers/storage/drivers/overlay/overlay.go20
-rw-r--r--vendor/github.com/containers/storage/vendor.conf2
-rw-r--r--version/version.go5
16 files changed, 112 insertions, 50 deletions
diff --git a/API.md b/API.md
index 872d3ee07..fc14f1035 100755
--- a/API.md
+++ b/API.md
@@ -1654,6 +1654,8 @@ git_commit [string](https://godoc.org/builtin#string)
built [int](https://godoc.org/builtin#int)
os_arch [string](https://godoc.org/builtin#string)
+
+remote_api_version [int](https://godoc.org/builtin#int)
## Errors
### <a name="ContainerNotFound"></a>type ContainerNotFound
diff --git a/cmd/podman/commands.go b/cmd/podman/commands.go
index 98eb92bab..718717009 100644
--- a/cmd/podman/commands.go
+++ b/cmd/podman/commands.go
@@ -38,7 +38,6 @@ func getAppCommands() []cli.Command {
topCommand,
umountCommand,
unpauseCommand,
- versionCommand,
volumeCommand,
waitCommand,
}
diff --git a/cmd/podman/info.go b/cmd/podman/info.go
index c33ede548..3888829a3 100644
--- a/cmd/podman/info.go
+++ b/cmd/podman/info.go
@@ -1,11 +1,13 @@
package main
import (
- "runtime"
+ "fmt"
+ rt "runtime"
"github.com/containers/libpod/cmd/podman/formats"
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/libpod/adapter"
+ "github.com/containers/libpod/version"
"github.com/pkg/errors"
"github.com/urfave/cli"
)
@@ -38,6 +40,7 @@ func infoCmd(c *cli.Context) error {
return err
}
info := map[string]interface{}{}
+ remoteClientInfo := map[string]interface{}{}
runtime, err := adapter.GetRuntime(c)
if err != nil {
@@ -49,9 +52,13 @@ func infoCmd(c *cli.Context) error {
if err != nil {
return errors.Wrapf(err, "error getting info")
}
+ if runtime.Remote {
+ remoteClientInfo["RemoteAPI Version"] = version.RemoteAPIVersion
+ remoteClientInfo["Podman Version"] = version.Version
+ remoteClientInfo["OS Arch"] = fmt.Sprintf("%s/%s", rt.GOOS, rt.GOARCH)
+ infoArr = append(infoArr, libpod.InfoData{Type: "client", Data: remoteClientInfo})
+ }
- // TODO This is no a problem child because we don't know if we should add information
- // TODO about the client or the backend. Only do for traditional podman for now.
if !runtime.Remote && c.Bool("debug") {
debugInfo := debugInfo(c)
infoArr = append(infoArr, libpod.InfoData{Type: "debug", Data: debugInfo})
@@ -80,8 +87,8 @@ func infoCmd(c *cli.Context) error {
// top-level "debug" info
func debugInfo(c *cli.Context) map[string]interface{} {
info := map[string]interface{}{}
- info["compiler"] = runtime.Compiler
- info["go version"] = runtime.Version()
+ info["compiler"] = rt.Compiler
+ info["go version"] = rt.Version()
info["podman version"] = c.App.Version
version, _ := libpod.GetVersion()
info["git commit"] = version.GitCommit
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 20486e80d..c10590006 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -96,6 +96,7 @@ func main() {
pullCommand,
rmiCommand,
tagCommand,
+ versionCommand,
}
app.Commands = append(app.Commands, getAppCommands()...)
diff --git a/cmd/podman/varlink/io.podman.varlink b/cmd/podman/varlink/io.podman.varlink
index 79300f9bc..86c3eb7ff 100644
--- a/cmd/podman/varlink/io.podman.varlink
+++ b/cmd/podman/varlink/io.podman.varlink
@@ -9,7 +9,8 @@ type Version (
go_version: string,
git_commit: string,
built: int,
- os_arch: string
+ os_arch: string,
+ remote_api_version: int
)
type NotImplemented (
diff --git a/cmd/podman/version.go b/cmd/podman/version.go
index d81deb696..fd7f06b7c 100644
--- a/cmd/podman/version.go
+++ b/cmd/podman/version.go
@@ -2,6 +2,8 @@ package main
import (
"fmt"
+ "os"
+ "text/tabwriter"
"time"
"github.com/containers/libpod/cmd/podman/formats"
@@ -26,20 +28,22 @@ func versionCmd(c *cli.Context) error {
default:
out = formats.StdoutTemplate{Output: output, Template: versionOutputFormat}
}
- formats.Writer(out).Out()
- return nil
+ return formats.Writer(out).Out()
}
- fmt.Println("Version: ", output.Version)
- fmt.Println("Go Version: ", output.GoVersion)
+ w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
+ defer w.Flush()
+ fmt.Fprintf(w, "Version:\t%s\n", output.Version)
+ fmt.Fprintf(w, "RemoteAPI Version:\t%d\n", output.RemoteAPIVersion)
+ fmt.Fprintf(w, "Go Version:\t%s\n", output.GoVersion)
if output.GitCommit != "" {
- fmt.Println("Git Commit: ", output.GitCommit)
+ fmt.Fprintf(w, "Git Commit:\t%s\n", output.GitCommit)
}
// Prints out the build time in readable format
if output.Built != 0 {
- fmt.Println("Built: ", time.Unix(output.Built, 0).Format(time.ANSIC))
+ fmt.Fprintf(w, "Built:\t%s\n", time.Unix(output.Built, 0).Format(time.ANSIC))
}
- fmt.Println("OS/Arch: ", output.OsArch)
+ fmt.Fprintf(w, "OS/Arch:\t%s\n", output.OsArch)
return nil
}
diff --git a/commands.md b/commands.md
index 43796722f..00be4f1bd 100644
--- a/commands.md
+++ b/commands.md
@@ -8,9 +8,14 @@
| [podman-attach(1)](/docs/podman-attach.1.md) | Attach to a running container |[![...](/docs/play.png)](https://asciinema.org/a/XDlocUrHVETFECg4zlO9nBbLf)|
| [podman-build(1)](/docs/podman-build.1.md) | Build an image using instructions from Dockerfiles ||
| [podman-commit(1)](/docs/podman-commit.1.md) | Create new image based on the changed container ||
-| [podman-container(1)](/docs/podman-container.1.md) | Manage Containers ||
+| [podman-container(1)](/docs/podman-container.1.md) | Manage Containers ||
+| [podman-container-checkpoint(1)](/docs/podman-container-checkpoint.1.md) | Checkpoints one or more running containers ||
| [podman-container-cleanup(1)](/docs/podman-container-cleanup.1.md) | Cleanup Container storage and networks ||
+| [podman-container-exists(1)](/docs/podman-container-exists.1.md) | Check if an container exists in local storage ||
+| [podman-container-prune(1)](/docs/podman-container-prune.1.md) | Remove all stopped containers ||
| [podman-container-refresh(1)](/docs/podman-container-refresh.1.md) | Refresh all containers state in database ||
+| [podman-container-restore(1)](/docs/podman-container-restore.1.md) | Restores one or more running containers ||
+| [podman-container-runlabel(1)](/docs/podman-container-runlabel.1.md) | Execute Image Label Method ||
| [podman-cp(1)](/docs/podman-cp.1.md) | Instead of providing a `podman cp` command, the man page `podman-cp` describes how to use the `podman mount` command to have even more flexibility and functionality||
| [podman-create(1)](/docs/podman-create.1.md) | Create a new container ||
| [podman-diff(1)](/docs/podman-diff.1.md) | Inspect changes on a container or image's filesystem |[![...](/docs/play.png)](https://asciinema.org/a/FXfWB9CKYFwYM4EfqW3NSZy1G)|
@@ -18,7 +23,11 @@
| [podman-export(1)](/docs/podman-export.1.md) | Export container's filesystem contents as a tar archive |[![...](/docs/play.png)](https://asciinema.org/a/913lBIRAg5hK8asyIhhkQVLtV)|
| [podman-generate(1)](/docs/podman-generate.1.md) | Generate structured output based on Podman containers and pods | |
| [podman-history(1)](/docs/podman-history.1.md) | Shows the history of an image |[![...](/docs/play.png)](https://asciinema.org/a/bCvUQJ6DkxInMELZdc5DinNSx)|
-| [podman-image(1)](/docs/podman-image.1.md) | Manage Images||
+| [podman-image(1)](/docs/podman-image.1.md) | Manage Images||
+| [podman-image-exists(1)](/docs/podman-image-exists.1.md) | Check if an image exists in local storage||
+| [podman-image-prune(1)](/docs/podman-image-prune.1.md) | Remove all unused images||
+| [podman-image-sign(1)](/docs/podman-image-sign.1.md) | Create a signature for an image||
+| [podman-image-trust(1)](/docs/podman-image-trust.1.md) | Manage container registry image trust policy||
| [podman-images(1)](/docs/podman-images.1.md) | List images in local storage |[![...](/docs/play.png)](https://asciinema.org/a/133649)|
| [podman-import(1)](/docs/podman-import.1.md) | Import a tarball and save it as a filesystem image ||
| [podman-info(1)](/docs/podman-info.1.md) | Display system information |[![...](/docs/play.png)](https://asciinema.org/a/yKbi5fQ89y5TJ8e1RfJd4ivTD)|
diff --git a/docs/podman-image-trust.1.md b/docs/podman-image-trust.1.md
index 24209698c..3b6564315 100644
--- a/docs/podman-image-trust.1.md
+++ b/docs/podman-image-trust.1.md
@@ -1,7 +1,7 @@
% podman-image-trust "1"
# NAME
-podman\-trust - Manage container image trust policy
+podman\-trust - Manage container registry image trust policy
# SYNOPSIS
diff --git a/libpod/version.go b/libpod/version.go
index 966588ae9..d2b99a275 100644
--- a/libpod/version.go
+++ b/libpod/version.go
@@ -19,11 +19,12 @@ var (
//Version is an output struct for varlink
type Version struct {
- Version string
- GoVersion string
- GitCommit string
- Built int64
- OsArch string
+ RemoteAPIVersion int64
+ Version string
+ GoVersion string
+ GitCommit string
+ Built int64
+ OsArch string
}
// GetVersion returns a VersionOutput struct for varlink and podman
@@ -39,10 +40,11 @@ func GetVersion() (Version, error) {
}
}
return Version{
- Version: podmanVersion.Version,
- GoVersion: runtime.Version(),
- GitCommit: gitCommit,
- Built: buildTime,
- OsArch: runtime.GOOS + "/" + runtime.GOARCH,
+ RemoteAPIVersion: podmanVersion.RemoteAPIVersion,
+ Version: podmanVersion.Version,
+ GoVersion: runtime.Version(),
+ GitCommit: gitCommit,
+ Built: buildTime,
+ OsArch: runtime.GOOS + "/" + runtime.GOARCH,
}, nil
}
diff --git a/pkg/varlinkapi/system.go b/pkg/varlinkapi/system.go
index e50643dd0..376502f21 100644
--- a/pkg/varlinkapi/system.go
+++ b/pkg/varlinkapi/system.go
@@ -16,11 +16,12 @@ func (i *LibpodAPI) GetVersion(call iopodman.VarlinkCall) error {
}
return call.ReplyGetVersion(iopodman.Version{
- Version: versionInfo.Version,
- Go_version: versionInfo.GoVersion,
- Git_commit: versionInfo.GitCommit,
- Built: versionInfo.Built,
- Os_arch: versionInfo.OsArch,
+ Remote_api_version: versionInfo.RemoteAPIVersion,
+ Version: versionInfo.Version,
+ Go_version: versionInfo.GoVersion,
+ Git_commit: versionInfo.GitCommit,
+ Built: versionInfo.Built,
+ Os_arch: versionInfo.OsArch,
})
}
diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go
index 8ae2eb9ca..68a462bdb 100644
--- a/test/e2e/version_test.go
+++ b/test/e2e/version_test.go
@@ -1,5 +1,3 @@
-// +build !remoteclient
-
package integration
import (
diff --git a/transfer.md b/transfer.md
index 00e732265..c0d309575 100644
--- a/transfer.md
+++ b/transfer.md
@@ -40,7 +40,7 @@ There are other equivalents for these tools
| `docker attach` | [`podman exec`](./docs/podman-attach.1.md) |
| `docker build` | [`podman build`](./docs/podman-build.1.md) |
| `docker commit` | [`podman commit`](./docs/podman-commit.1.md) |
-| `docker container`|[`podman container`](./docs/podman-container.1.md) |
+| `docker container`|[`podman container`](./docs/podman-container.1.md) |
| `docker cp` | [`podman mount`](./docs/podman-cp.1.md) **** |
| `docker create` | [`podman create`](./docs/podman-create.1.md) |
| `docker diff` | [`podman diff`](./docs/podman-diff.1.md) |
@@ -70,7 +70,13 @@ There are other equivalents for these tools
| `docker top` | [`podman top`](./docs/podman-top.1.md) |
| `docker unpause` | [`podman unpause`](./docs/podman-unpause.1.md) |
| `docker version` | [`podman version`](./docs/podman-version.1.md) |
-| `docker wait` | [`podman wait`](./docs/podman-wait.1.md) |
+| `docker volume` | [`podman volume`](./docs/podman-volume.1.md) |
+| `docker volume create` | [`podman volume create`](./docs/podman-volume-create.1.md) |
+| `docker volume inspect`| [`podman volume inspect`](./docs/podman-volume-inspect.1.md)|
+| `docker volume ls` | [`podman volume ls`](./docs/podman-volume-ls.1.md) |
+| `docker volume prune` | [`podman volume prune`](./docs/podman-volume-prune.1.md) |
+| `docker volume rm` | [`podman volume rm`](./docs/podman-volume-rm.1.md) |
+| `docker wait` | [`podman wait`](./docs/podman-wait.1.md) |
**** Use mount to take advantage of the entire linux tool chain rather then just cp. Read [`here`](./docs/podman-cp.1.md) for more information.
@@ -83,18 +89,45 @@ Those Docker commands currently do not have equivalents in `podman`:
| `docker events` ||
| `docker network` ||
| `docker node` ||
-| `docker plugin` |podman does not support plugins. We recommend you use alternative OCI Runtimes or OCI Runtime Hooks to alter behavior of podman.|
+| `docker plugin` | podman does not support plugins. We recommend you use alternative OCI Runtimes or OCI Runtime Hooks to alter behavior of podman.|
| `docker rename` | podman does not support rename, you need to use `podman rm` and `podman create` to rename a container.|
| `docker secret` ||
| `docker service` ||
| `docker stack` ||
| `docker swarm` | podman does not support swarm. We support Kubernetes for orchestration using [CRI-O](https://github.com/kubernetes-sigs/cri-o).|
| `docker system` ||
-| `docker volume` | podman does not support volumes. Volumes should be built on the host operating system and then volume mounted into the containers.|
+| `docker volume` | podman currently supports file volumes. Future enhancement planned to support Docker Volumes Plugins
## Missing commands in Docker
The following podman commands do not have a Docker equivalent:
+* [`podman generate`](./docs/podman-generate.1.md)
+* [`podman generate kube`](./docs/podman-generate-kube.1.md)
+* [`podman container checkpoint`](/docs/podman-container-checkpoint.1.md)
+* [`podman container cleanup`](/docs/podman-container-cleanup.1.md)
+* [`podman container exists`](/docs/podman-container-exists.1.md)
+* [`podman container refresh`](/docs/podman-container-refresh.1.md)
+* [`podman container runlabel`](/docs/podman-container-runlabel.1.md)
+* [`podman container restore`](/docs/podman-container-restore.1.md)
+* [`podman image exists`](./docs/podman-image-exists.1.md)
+* [`podman image sign`](./docs/podman-image-sign.1.md)
+* [`podman image trust`](./docs/podman-image-trust.1.md)
* [`podman mount`](./docs/podman-mount.1.md)
+* [`podman play`](./docs/podman-play.1.md)
+* [`podman play kube`](./docs/podman-play-kube.1.md)
+* [`podman pod`](./docs/podman-pod.1.md)
+* [`podman pod create`](./docs/podman-pod-create.1.md)
+* [`podman pod exists`](./docs/podman-pod-exists.1.md)
+* [`podman pod inspect`](./docs/podman-pod-inspect.1.md)
+* [`podman pod kill`](./docs/podman-pod-kill.1.md)
+* [`podman pod pause`](./docs/podman-pod-pause.1.md)
+* [`podman pod ps`](./docs/podman-pod-ps.1.md)
+* [`podman pod restart`](./docs/podman-pod-restart.1.md)
+* [`podman pod rm`](./docs/podman-pod-rm.1.md)
+* [`podman pod start`](./docs/podman-pod-start.1.md)
+* [`podman pod stop`](./docs/podman-pod-stop.1.md)
+* [`podman pod top`](./docs/podman-pod-top.1.md)
+* [`podman pod unpause`](./docs/podman-pod-unpause.1.md)
+* [`podman varlink`](./docs/podman-varlink.1.md)
* [`podman umount`](./docs/podman-umount.1.md)
diff --git a/vendor.conf b/vendor.conf
index fe7adf6c9..76c2b8810 100644
--- a/vendor.conf
+++ b/vendor.conf
@@ -16,7 +16,7 @@ github.com/containerd/continuity 004b46473808b3e7a4a3049c20e4376c91eb966d
github.com/containernetworking/cni v0.7.0-alpha1
github.com/containernetworking/plugins v0.7.4
github.com/containers/image v1.3
-github.com/containers/storage v1.7
+github.com/containers/storage v1.8
github.com/containers/psgo v1.1
github.com/coreos/go-systemd v14
github.com/cri-o/ocicni 2d2983e40c242322a56c22a903785e7f83eb378c
diff --git a/vendor/github.com/containers/storage/drivers/overlay/overlay.go b/vendor/github.com/containers/storage/drivers/overlay/overlay.go
index 3e8daf23c..57d6dd63a 100644
--- a/vendor/github.com/containers/storage/drivers/overlay/overlay.go
+++ b/vendor/github.com/containers/storage/drivers/overlay/overlay.go
@@ -158,6 +158,7 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap
return nil, err
}
+ var usingMetacopy bool
var supportsDType bool
if opts.mountProgram != "" {
supportsDType = true
@@ -172,18 +173,17 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap
}
return nil, errors.Wrap(err, "kernel does not support overlay fs")
}
- }
-
- usingMetacopy, err := doesMetacopy(home, opts.mountOptions)
- if err == nil {
- if usingMetacopy {
- logrus.Debugf("overlay test mount indicated that metacopy is being used")
+ usingMetacopy, err = doesMetacopy(home, opts.mountOptions)
+ if err == nil {
+ if usingMetacopy {
+ logrus.Debugf("overlay test mount indicated that metacopy is being used")
+ } else {
+ logrus.Debugf("overlay test mount indicated that metacopy is not being used")
+ }
} else {
- logrus.Debugf("overlay test mount indicated that metacopy is not being used")
+ logrus.Warnf("overlay test mount did not indicate whether or not metacopy is being used: %v", err)
+ return nil, err
}
- } else {
- logrus.Warnf("overlay test mount did not indicate whether or not metacopy is being used: %v", err)
- return nil, err
}
if !opts.skipMountHome {
diff --git a/vendor/github.com/containers/storage/vendor.conf b/vendor/github.com/containers/storage/vendor.conf
index 936321b12..04af9010b 100644
--- a/vendor/github.com/containers/storage/vendor.conf
+++ b/vendor/github.com/containers/storage/vendor.conf
@@ -8,7 +8,7 @@ github.com/mattn/go-shellwords 753a2322a99f87c0eff284980e77f53041555bc6
github.com/mistifyio/go-zfs c0224de804d438efd11ea6e52ada8014537d6062
github.com/opencontainers/go-digest master
github.com/opencontainers/runc 6c22e77604689db8725fa866f0f2ec0b3e8c3a07
-github.com/opencontainers/selinux 36a9bc45a08c85f2c52bd9eb32e20267876773bd
+github.com/opencontainers/selinux v1.1
github.com/ostreedev/ostree-go master
github.com/pborman/uuid 1b00554d822231195d1babd97ff4a781231955c9
github.com/pkg/errors master
diff --git a/version/version.go b/version/version.go
index ea5a92286..24daf707c 100644
--- a/version/version.go
+++ b/version/version.go
@@ -5,3 +5,8 @@ package version
// of the top-level README.md file when this is
// bumped.
const Version = "1.0.1-dev"
+
+// RemoteAPIVersion is the version for the remote
+// client API. It is used to determine compatibility
+// between a remote podman client and its backend
+const RemoteAPIVersion = 1