summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAge
* --entrypoint= should delete existing entrypointbaude2018-04-03
| | | | | | | | | Resolves: #572 Signed-off-by: baude <bbaude@redhat.com> Closes: #585 Approved by: mheon
* Remove explicit Init() calls in run and startMatthew Heon2018-04-03
| | | | | | | | | | | | | We no longer require an explicit Init() to start a container, as Start() will now call Init() if the container is not initialized. Remove explicit Init() invocations from run and start to help with dependency ordering - less time for a dependency to go down before we start. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #577 Approved by: rhatdan
* Add secrets patch to podmanumohnani82018-03-29
| | | | | | | | | | Adds support for mounting secrets especially on RHEL where the container can use the host subsription to run yum Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #544 Approved by: rhatdan
* podman: new option --conmon-pidfile=Giuseppe Scrivano2018-03-29
| | | | | | | | | | | | | | | | | | | so that it is possible to use systemd to automatically restart the container: [Service] Type=forking PIDFile=/run/awesome-service.pid ExecStart=/usr/bin/podman run --conmon-pidfile=/run/awesome-service.pid --name awesome -d IMAGE /usr/bin/do-something ExecStopPost=/usr/bin/podman rm awesome Restart=always Closes: https://github.com/projectatomic/libpod/issues/534 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #549 Approved by: rhatdan
* Remove dependency on kubernetesbaude2018-03-27
| | | | | | | | | | podman parse and attach were using a very small portion of the kubernetes code but using it caused a signficant increase in binary size. Signed-off-by: baude <bbaude@redhat.com> Closes: #559 Approved by: rhatdan
* Vendor in lots of kubernetes stuff to shrink image sizeDaniel J Walsh2018-03-27
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #554 Approved by: mheon
* cmd/podman/run.go: Error nicely when no image foundbaude2018-03-27
| | | | | | | | | | | | When no image is found, display a useful error message. Also, in imageToRef protect against a nil image being passed. Resolves: #553 Signed-off-by: baude <bbaude@redhat.com> Closes: #555 Approved by: mheon
* podman exec should handle options --env fooDaniel J Walsh2018-03-26
| | | | | | | | | | | | | If the user does not specify foo=bar, then the exec code should look for the foo environment variable in its environment and pass it in. This is the way podman run works. Also added tests to make sure this all works. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #552 Approved by: mheon
* Make container env variable conditionalMatthew Heon2018-03-23
| | | | | | | | | | | | Add only when it's not already present. Add a more specific version in podman spec generation so we get 'container=podman' not 'container=libpod' Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #540 Approved by: baude
* Stage 4 Image cleanupbaude2018-03-23
| | | | | | | | | | Cull funcs from runtime_img.go which are no longer needed. Also, fix any remaining spots that use the old image technique. Signed-off-by: baude <bbaude@redhat.com> Closes: #532 Approved by: mheon
* If cidfile exists, do not proceedbaude2018-03-23
| | | | | | | | | | | | | Both podman run and create have an option to write the container ID to a file. The option is called cidfile. If the cidfile exists, we should not create or run a container but rather output a sensical error message. Resolves: #530 Signed-off-by: baude <bbaude@redhat.com> Closes: #531 Approved by: rhatdan
* Removing tagged images change in behaviorbaude2018-03-22
| | | | | | | | | | | | | | | An image name is really just a tag. When an image has multiple tags, we should be able to "delete" the one of its tags without harm. In this case, the "delete' is really a form of Untag (removing the tag from the image). If an image has multiple tags and the user tries to delete by ID without force, this should be denied because when you delete by ID there is no distinguishing it like image tags. Signed-off-by: baude <bbaude@redhat.com> Closes: #528 Approved by: mheon
* Migrate podman inspect and tag to image librarybaude2018-03-21
| | | | | | | Signed-off-by: baude <bbaude@redhat.com> Closes: #525 Approved by: baude
* Migrate podman images to image librarybaude2018-03-21
| | | | | | | Signed-off-by: baude <bbaude@redhat.com> Closes: #523 Approved by: mheon
* Image library stage 4 - create and commitbaude2018-03-20
| | | | | | | | | | Migrate the podman create and commit subcommandis to leverage the images library. I also had to migrate the cmd/ portions of run and rmi. Signed-off-by: baude <bbaude@redhat.com> Closes: #498 Approved by: mheon
* Fix build after c/image changesMatthew Heon2018-03-16
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #505 Approved by: rhatdan
* Merge pull request #447 from mheon/sig_proxyDaniel J Walsh2018-03-16
|\ | | | | Add signal proxying to podman run and attach
| * Add signal proxying to podman run, start, and attachMatthew Heon2018-03-15
| | | | | | | | | | | | | | Also removes sig-proxy from 'podman create', where is does not make sense. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* | Address review commentsMatthew Heon2018-03-16
| | | | | | | | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #503 Approved by: rhatdan
* | Add 'podman restart' commandMatthew Heon2018-03-16
| | | | | | | | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #503 Approved by: rhatdan
* | Remove ability to specify mount label when mountingMatthew Heon2018-03-16
|/ | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #506 Approved by: rhatdan
* We should not allow a user to mount a container with a different labelDaniel J Walsh2018-03-15
| | | | | | | | | We need to get the label from the container and mount with it. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #502 Approved by: mheon
* We should not have a default workdirDaniel J Walsh2018-03-15
| | | | | | | | | | Having a default workdir is causing us not to use the container images workdir. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #501 Approved by: mheon
* Add StartAndAttach() API endpoint for containersMatthew Heon2018-03-15
| | | | | | | | | | | | This solves our prior problems with attach races by ensuring the order is correct. Also contains substantial cleanups to the attach code. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #482 Approved by: baude
* Add test. Move attach code in start backMatthew Heon2018-03-15
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #482 Approved by: baude
* Implement container restartingMatthew Heon2018-03-15
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #482 Approved by: baude
* Stage3 Image Librarybaude2018-03-14
| | | | | | | | | | | | | This represents the stage3 implementation for the image library. At this point, we are moving the image-centric functions to pkg/image including migration of args and object-oriented references. This is a not a one-for-one migration of funcs and some funcs will need to continue to reside in runtime_img as they are overly specific to libpod and probably not useful to others. Signed-off-by: baude <bbaude@redhat.com> Closes: #484 Approved by: baude
* Include tmpfs in inspectbaude2018-03-14
| | | | | | | | | | | | Other container runtimes include the tmpfs mount points in their inspect output. Podman should as well. It is under hostconfig. Resolves: #483 Signed-off-by: baude <bbaude@redhat.com> Closes: #488 Approved by: rhatdan
* podman-images: return correct image listValentin Rothberg2018-03-14
| | | | | | | | | | | Return and print the correct list of images by adding all specified RepoTags to one image object, and priting them separately in repository:repotag pairs. Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #477 Approved by: rhatdan
* Fix a potential race around container removal in psMatthew Heon2018-03-09
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #467 Approved by: baude
* podman ps command string too longbaude2018-03-09
| | | | | | | | | | | | The default outout for podman ps should limit itself if the command is long. If the command is more than 20 characters, we truncate the command and add an elipses to it. Resolves: #464 Signed-off-by: baude <bbaude@redhat.com> Closes: #466 Approved by: rhatdan
* podman import, load, and commit are too verbosebaude2018-03-07
| | | | | | | | | | | | | | | The progress should not be show for import, load, and commit. It makes machine parsing of the output much more difficult. Also, each command should output an image ID or name for the user. Added a --verbose flag for users that still want to see progress. Resolves issue #450 Signed-off-by: baude <bbaude@redhat.com> Closes: #456 Approved by: rhatdan
* Add buildah bud options from common.goTomSweeneyRedHat2018-03-06
| | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #453 Approved by: rhatdan
* Adjust podman logs error message for clarityMatthew Heon2018-03-02
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #441 Approved by: rhatdan
* podman logs -f: does not detect container stop or rmbaude2018-03-02
| | | | | | | | | | | | If a container stops, we should stop the logging capability and gracefully exit. However, if the container pauses, we should allow the log to continue. Resolves issue: #435 Signed-off-by: baude <bbaude@redhat.com> Closes: #437 Approved by: baude
* Fix issue with podman logs on fresh containersMatthew Heon2018-03-01
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #434 Approved by: baude
* remove build aliasSeth Jennings2018-02-27
| | | | | | | Signed-off-by: Seth Jennings <sjenning@redhat.com> Closes: #413 Approved by: mheon
* Restrict top output to container's pids onlybaude2018-02-26
| | | | | | | | | | | | | Due to the way ps arguments work, it was possible to display pids that dont below to the container in top output. We now filter pids that dont belong to the container out of the output. This also means the pid column must be present in the output or we throw an error. This resolves issue #391 Signed-off-by: baude <bbaude@redhat.com> Closes: #400 Approved by: rhatdan
* ps displays incorrect exit codebaude2018-02-26
| | | | | | | | | | | | The exit code should be derived in the batch operation and pulled from the batchinfo struct. Resolves issue #407 Signed-off-by: baude <bbaude@redhat.com> Closes: #408 Approved by: rhatdan
* Tagging an image alias by shortnamebaude2018-02-26
| | | | | | | | | | | | | | | | | | When trying to tag an alias (tag) of an image using only the shortname and no tag, we were unable to find the image in storage. This corrects that issue and adds an integration test to protect against regression. I also updated the man page per the filed issue. While writing the integration test, I discovered that inspect could also not find a tagged image without its :tag. Resolves Issue #385 Resolves Issue #384 Signed-off-by: baude <bbaude@redhat.com> Closes: #398 Approved by: mheon
* Address review commentsbaude2018-02-24
| | | | | | | | | Review comments to delete WithNoNew function and its append. Signed-off-by: baude <bbaude@redhat.com> Closes: #369 Approved by: rhatdan
* Add support for --no-new-privsDaniel J Walsh2018-02-24
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #369 Approved by: rhatdan
* podman ps json output use batched opsbaude2018-02-23
| | | | | | | | | | | The podman ps command for non-json targets has the ability to use a "batched" function which limits the use of locks needed. The collection of output for JSON should use this too. Signed-off-by: baude <bbaude@redhat.com> Closes: #380 Approved by: rhatdan
* Add accessors to all container config and state fieldsMatthew Heon2018-02-22
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #381 Approved by: rhatdan
* Implement --image-volumes for create and runumohnani82018-02-22
| | | | | | | | | | | | | | --image-volumes tells podman what to do with the image volumes in the image config There are 3 options: bind, tmpfs, and ignore bind puts the volume contents in /var/lib/containers/storage/container-id/volumes/vol-dir and bind mounts it into the container at /vol-dir tmpfs mounts /vol-dir as a tmps into the container ignore doesn't mount the image volumes onto the container Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #377 Approved by: rhatdan
* Add tests and cleanupJhon Honce2018-02-22
| | | | | | | | | | - Added run_cgroup_parent_test.go - Cleaned up calls to logrus Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #370 Approved by: rhatdan
* Push up createConfig.CgroupParent processing to parentJhon Honce2018-02-22
| | | | | | | Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #370 Approved by: rhatdan
* Implement podman run option --cgroup-parentJhon Honce2018-02-22
| | | | | | | | | | | Example: sudo /usr/local/bin/podman run --cgroup-parent=/zzz fedora cat /proc/self/cgroup Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #370 Approved by: rhatdan
* Correct exit code 126 and 127baude2018-02-21
| | | | | | | | | | | | | | | | The exit codes for 126 and 127 were reversed. For the record, the exit codes used are as follows: * 125 if ‘chroot’ itself fails * 126 if COMMAND is found but cannot be invoked * 127 if COMMAND cannot be found This resolves issue #367 Signed-off-by: baude <bbaude@redhat.com> Closes: #378 Approved by: baude
* Inspect output should be in array formbaude2018-02-21
| | | | | | | | | | | | | | | | | | | | | | | | Inspect should be able to inspect one or more containers depending on the user input. Therefore, inspect output should be in array format so the consumer could potentially iterate it. This PR allows users to specify one more or containers|images|or a mix for inspection. The output, as stated, is therefore in array form. This holds true even for a singular image. In the case that the user enters an invalid container|image "name", we handle that gracefully. Podman will output json for the valid names until it reaches the invalid one. For example: In this case, podman will out the json for alpine and then print an error about 123 being invalid. It will not continute onto busybox. This behavior imatates docker. This addresses issue #360 Signed-off-by: baude <bbaude@redhat.com> Closes: #371 Approved by: baude