Commit Graph

7 Commits

Author SHA1 Message Date
Adrian Reber bb98a9cd2f
Fix podman port -l
Running 'podman port -l' on a system without any containers created
gives:

 $ podman port -l
 panic: runtime error: invalid memory address or nil pointer dereference
 [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xf3cef1]

 goroutine 1 [running]:
 github.com/containers/libpod/libpod.(*Container).State(0x0, 0x0, 0x0, 0x0)
 	/share/go/src/github.com/containers/libpod/libpod/container.go:658 +0x41
 main.portCmd(0xc420094580, 0x0, 0x0)
 	/share/go/src/github.com/containers/libpod/cmd/podman/port.go:118 +0x406

This fixes it by making sure the variable 'containers' is nil and not [<nil>].

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-19 08:47:52 +02:00
Qi Wang d73600626d Sort all command flags
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-10-11 13:17:14 -04:00
Valentin Rothberg 3839c00ae2 don't print help message for usage errors
Don't print potentially verbose help messages in case of usage errors,
but print only the usage error followed by a pointer to the command's
help.  This aligns with Docker.

```
$ podman run -h
flag needs an argument: -h
See 'podman run --help'.
```

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1379
Approved by: rhatdan
2018-08-31 10:19:11 +00:00
Daniel J Walsh d20f3a5146 switch projectatomic to containers
Need to get some small changes into libpod to pull back into buildah
to complete buildah transition.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1270
Approved by: mheon
2018-08-16 17:12:36 +00:00
Matthew Heon 1b562b05c5 Add missing newline to podman port
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #741
Approved by: giuseppe
2018-05-10 08:53:28 +00:00
baude 39a7a773a6 varlink images
implement varlink image functions for working with libpod with the exception of a
couple due to incompletions on the libpod side of things (build).

also, created a first pass at a libpodpy package which will stand as a client to
working with libpod's varlink methods using python.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #669
Approved by: baude
2018-04-26 19:14:44 +00:00
baude b74e38b042 podman port
podman port reports the port mappings per container.  it can be used
to report the ports ofa single container or latest container or all
containers.

in the case of a single container, the user can add an option filter for
port and protocol.

Signed-off-by: baude <bbaude@redhat.com>
2018-01-23 08:54:57 -06:00