summaryrefslogtreecommitdiff
path: root/cmd/podman
Commit message (Collapse)AuthorAge
* Change json to match docker inspectDaniel J Walsh2018-02-11
| | | | | | | | | | Changing these fields caused the output of podman inspect to more closely match docker inspect. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #306 Approved by: mheon
* Honor ENTRYPOINT in imagebaude2018-02-11
| | | | | | | | | | | | | When an image has an ENTRYPOINT defined, we should be honoring it. The problem is described in issue #321. Also, added buildah binary to test runtimes for testing entrypoint and will also allow us to test podman build as well. Signed-off-by: baude <bbaude@redhat.com> Closes: #322 Approved by: rhatdan
* Rework port codebaude2018-02-09
| | | | | | | | | | | Rework port code for generalized clean up and to address issue #269 where additional portbindings between host and containers we being introduced by error. Signed-off-by: baude <bbaude@redhat.com> Closes: #308 Approved by: mheon
* podman logs: fix tailingbaude2018-02-09
| | | | | | | | | | | Fix issues with tailing of container logs as described in issue #16. Also add in the ability to use a duration or known time stamp formats for the --since flag. Signed-off-by: baude <bbaude@redhat.com> Closes: #317 Approved by: mheon
* Add some global options to buildTomSweeneyRedHat2018-02-08
| | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #312 Approved by: mheon
* cleanup network stack as well as storage when container shuts down.Daniel J Walsh2018-02-08
| | | | | | This patch will cleanup the network stack when the container exits Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #290 from umohnani8/templatesDaniel J Walsh2018-02-07
|\ | | | | Fix when the --format flag prints a new line at the end
| * Fix when the --format flag prints a new line at the endumohnani82018-02-07
| | | | | | | | | | | | | | | | | | | | | | If the output is to a terminal, return a new line at the end of the output so that the output is visually appealing. If the output is being piped, or saved to a file, basically not being outputted to a terminal, do not print a new line at the end of the output. This ensures any further data manipulation with the results happens smoothly without requiring to remember the '/n' at the end of the output. Signed-off-by: umohnani8 <umohnani@redhat.com>
* | Merge pull request #289 from TomSweeneyRedHat/dev/tsweeney/usernameDaniel J Walsh2018-02-07
|\ \ | |/ |/| Change un/pwd handling to match Buildah's
| * Change un/pwd handling to match Buildah'sTomSweeneyRedHat2018-02-06
| | | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
* | Match podman inspect output to docker inspectumohnani82018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | Made a change to make sure that the output paths of podman inspect matches that of docker inspect. For example to get the stop signal you should be able to do podman inspect ctr --format {{.Config.StopSignal}} and the same thing in docker will give the same results. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #292 Approved by: rhatdan
* | Change stop signal default to SIGTERMMatthew Heon2018-02-06
| | | | | | | | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #299 Approved by: rhatdan
* | Add podman search commandumohnani82018-02-06
|/ | | | | | | | | | | | | podman search queries a registry for a matching image and prints the output. I added a new flag called "registry" giving the user the option to search a specific registry if they don't want to search all their default registries. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #241 Approved by: rhatdan
* sysfs should be mounted rw for privilegedbaude2018-02-06
| | | | | | | | | sysfs should be mounted rw for a privileged container. Signed-off-by: baude <bbaude@redhat.com> Closes: #279 Approved by: rhatdan
* Deprecate --format for podman topbaude2018-02-05
| | | | | | | | | | | | | | | | | | | Issue #169 describes a common failure when running podman top where if the commands inside the container container a space in them, podman will panic. This was occuring because we take the output from ps and attempt to format it nicely for output and things like JSON. Given that this cannot be predicted or dealt with programatically, the decision was made to deprecate the format switch and simply output what ps provides us. Migrated top integration tests to ginkgo. Resolves Issue: https://github.com/projectatomic/libpod/issues/169 Signed-off-by: baude <bbaude@redhat.com> Closes: #291 Approved by: rhatdan
* Allow users to specify logpathDaniel J Walsh2018-02-03
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #135 Approved by: mheon
* Migrate Create|Commit to ginkgobaude2018-02-02
| | | | | | | | | | | | Migrate create and commit bats tests to the ginkgo test suite. In doing so, some structures had to be moved to pkg/podmanstructs/podmanstructs.go so we could do better verification of test results. Signed-off-by: baude <bbaude@redhat.com> Closes: #286 Approved by: rhatdan
* Merge pull request #282 from randomvariable/fix/sandboxDaniel J Walsh2018-02-02
|\ | | | | Set default configuration container type annotation to sandbox
| * Set default configuration container type annotation to sandboxNaadir Jeewa2018-02-01
| | | | | | | | | | | | | | | | This allows podman to provide sufficient hints to start containers with Intel Clear Containers: https://github.com/clearcontainers/runtime/blob/master/docs/architecture/architecture.md#oci-annotations Signed-off-by: Naadir Jeewa <naadir@randomvariable.co.uk>
* | Fix --cert-dir path for podman loginumohnani82018-02-02
| | | | | | | | | | | | | | | | | | | | | | podman login would add on the registry name to the cert-dir path making containers/image look in a directory that did not exist for certificates. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #283 Approved by: rhatdan
* | Add authfile, cert-dir and creds params to buildTomSweeneyRedHat2018-02-01
| | | | | | | | | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #280 Approved by: mheon
* | Implment network == nonebaude2018-01-31
|/ | | | | | | | | | When network == none, the container should only have a loopback interface and that's it. Signed-off-by: baude <bbaude@redhat.com> Closes: #176 Approved by: baude
* Ginkgo Tests: ps, pull, push and rmbaude2018-01-31
| | | | | | | | | | | | | Migrate ps, pull, push, and rm from bats to ginkgo. Also, fixed a conditional issue with adding ports when an image defines the port and the user wants to override it. Signed-off-by: baude <bbaude@redhat.com> Closes: #277 Approved by: baude
* Add StopWithTimeout API function for containersMatthew Heon2018-01-30
| | | | | | | | | | Normal Stop should not need a timeout, and should use the default Add a function that does accept a timeout aside it Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #272 Approved by: rhatdan
* Honor storage-driver flagMatthew Heon2018-01-29
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Remove libkpod. Replace runtime generation function.Matthew Heon2018-01-29
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Fix tab issue with --format flagumohnani82018-01-27
| | | | | | | | | | | When the Go template was given with \t in between fields, the \t was not being recognized as a tab. Fixes that issue. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #265 Approved by: rhatdan
* Save --privileged stateDaniel J Walsh2018-01-25
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #255 Approved by: mheon
* Fix podman stats based on QE feedbackumohnani82018-01-25
| | | | | | | | | | | | QE found issues with formatting the go template and the man page was lacking information. Changed the format of the output to match latest docker. Add shortID function that returns the truncated ID Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #258 Approved by: rhatdan
* Fixed Created At and Running For valueumohnani82018-01-25
| | | | | | | | | | | | Changed the Created At value to match the format of docker ps and fixed the value for Running For to reflect the time elapsed since the container has been started. Initially it was showing the time elapsed since the container was created. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #257 Approved by: rhatdan
* Fix issue with order of flagsumohnani82018-01-25
| | | | | | | | | | The order of the flags was casuing issue. Enabled SkipArgReorder to fix the problem. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #259 Approved by: rhatdan
* Merge pull request #252 from baude/portDaniel J Walsh2018-01-24
|\ | | | | podman port
| * podman portbaude2018-01-23
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #251 from baude/psbatchDaniel J Walsh2018-01-23
|\ \ | | | | | | Use batched operations in ps
| * | Use batched operations in psbaude2018-01-22
| | | | | | | | | | | | | | | | | | | | | | | | Because the podman ps command has to collection a lot of information from various places, many of which are controlled by locks, it is a good candidate for doing batch operations under a single lock. Signed-off-by: baude <bbaude@redhat.com>
* | | Streamline image resolutionbaude2018-01-23
| |/ |/| | | | | | | | | | | | | | | When trying to determine if a user-provided string that describes an image (ID, fq name, shortname, tagged), there were some inefficiencies where we looked up images multiple times to derive information about local images. Signed-off-by: baude <bbaude@redhat.com>
* | Fix issues with podman ps from QEumohnani82018-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | QE pointed out a few things missing/wrong with ps This PR addresses those issues. Added functionality for getting mounts and size also Fixed a few issues with the --filter params, for example filter with partial information. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #250 Approved by: rhatdan
* | Expose ports from imagebaude2018-01-22
|/ | | | | | | | | | | | When an image has a port to expose, we need to expose it. User's input overrides the image's port information. Also, enable port information in ps so we can see which random port is assigned. Signed-off-by: baude <bbaude@redhat.com> Closes: #249 Approved by: rhatdan
* Enable port bindingsbaude2018-01-20
| | | | | | | | | | | | | Set up nbetworking ports for the following use cases: * bind the same port between host and container * bind a specific host port to a different container port * bind a random host port to a specific container port Signed-off-by: baude <bbaude@redhat.com> Closes: #214 Approved by: baude
* Cleanup of podman statsDaniel J Walsh2018-01-19
| | | | | | | | | | | | Fix errors when containers are not running. --all, --latest, containers can not be used at same time. Should match the output of docker stats, 0 values replaced by "--" Should return stats right away if container is not running. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #244 Approved by: TomSweeneyRedHat
* Add --dns-search, --dns-opt, --dns-server and --add-host.baude2018-01-19
| | | | | | | | | | | | | | | | | | Each of these options are destructive in nature, meaning if the user adds one of them, all current ones are removed from the produced resolv.conf. * dns-server allows the user to specify dns servers. * dns-opt allows the user to specify special resolv.conf options * dns-search allows the user to specify search domains The add-host option is not destructive and truly just adds the host to /etc/hosts. Signed-off-by: baude <bbaude@redhat.com> Closes: #231 Approved by: mheon
* Fix output for created containersbaude2018-01-18
| | | | | | | | | | | | | | Created containers that haven't hit runc yet should still be considered created (not dead). Also, fixed loop for deleting containers as leftover code still exited there that prevented proper deletion of containers that could be deleted. Signed-off-by: baude <bbaude@redhat.com> Closes: #238 Approved by: rhatdan
* Fix seccomp supportDaniel J Walsh2018-01-18
| | | | | | | | | | | | | If user does not specify seccomp file or seccomp file does not exist, then use the default seccomp settings. Still need to not hard code /etc/crio/seccomp.json, should move this to /usr/share/seccomp/seccomp.json Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #233 Approved by: baude
* Add check for successful imageData callDaniel J Walsh2018-01-17
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #234 Approved by: baude
* Remove --storage-opt from podman run/createDaniel J Walsh2018-01-17
| | | | | | | | | | | podman command has storage options as a global option, these should be set there, rather then in the create and run commands. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #234 Approved by: baude
* Minor change to --net parsingMatthew Heon2018-01-16
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #220 Approved by: rhatdan
* Add API for sharing namespacesMatthew Heon2018-01-16
| | | | | | | | | | Remove existing code for sharing namespaces and replace with use of this API Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #220 Approved by: rhatdan
* Make --net alias to --networkbaude2018-01-15
| | | | | | | | | | | | A compatibility option of --net should alias the --network option. The --net option will only override --network if --network is not explicitly set and --net is. Both default to 'bridge'. Signed-off-by: baude <bbaude@redhat.com> Closes: #228 Approved by: mheon
* Implement and test the following flags for podman run and createumohnani82018-01-15
| | | | | | | | | | | memory, memory-reservation, memory-swap, memory-swappiness, kernel-memory, cpu-period, cou-quota, cpu-shares, cpus, cpuset-cpus, cpuset-mems, blkio-weight, blkio-weight-device, sysctl, and ulimit Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #221 Approved by: mheon
* Test user input to specbaude2018-01-11
| | | | | | | | | | | Create a mocked CLI instance so we can test that user-input functions to run (create) end up in the spec correctly. It will also help protect against regression include type changes. We can decide if we want to test items one at a time or several at a time. Signed-off-by: baude <bbaude@redhat.com>