Commit Graph

32 Commits

Author SHA1 Message Date
Qi Wang f61a7f25a8 Add --preservefds to podman run
Add --preservefds to podman run. close https://github.com/containers/libpod/issues/6458

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-06-19 09:40:13 -04:00
Daniel J Walsh 87718c4e67
Fix Id->ID where possible for lint
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-10 05:49:41 -04:00
Matthew Heon 1cc9731dfa Add parallel operation to `podman stop`
This is the other command that benefits greatly from being run in
parallel, due to the potential 15-second timeout for containers
that ignore SIGTERM.

While we're at it, also clean up how stop timeout is set. This
needs to be an optional parameter, so that the value set when the
container is created with `--stop-timeout` will be respected.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-05 16:18:53 -04:00
Matthew Heon 5ec56dc790 Add ability to clean up exec sessions with cleanup
We need to be able to use cleanup processes to remove exec
sessions as part of detached exec. This PR adds that ability. A
new flag is added to `podman container cleanup`, `--exec`, to
specify an exec session to be cleaned up.

As part of this, ensure that `ExecCleanup` can clean up exec
sessions that were running, but have since exited. This ensures
that we can come back to an exec session that was running but has
since stopped, and clean it up.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:11:05 -04:00
Matthew Heon 05a034118f Add CLI frontend for detached exec
Add a new ContainerEngine method for creating a detached exec
session, and wire in the frontend code to do this. As part of
this, move Streams out of ExecOptions to the function signature
in an effort to share the struct between both methods.

Fixes #5884

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:11:05 -04:00
Adrian Reber 7c7f4dbb51
Fix checkpoint --leave-running
There was typo in the variable name and in one place it was not
correctly passed to the next layer.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-05-14 14:29:04 +02:00
Valentin Rothberg 61828cf480 container runlabel
Implement container runlabel for v2.  Local client only.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-07 16:18:39 +02:00
baude b5a235df90 v2 podman stats
Signed-off-by: baude <bbaude@redhat.com>
2020-05-05 08:46:51 -05:00
Giuseppe Scrivano 9d373408b5
podman, start: propagate back the raw input
this is necessary as we expect "podman start $ID_NAME" to print the
same arguments the user passed in instead of the full ID.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-30 12:23:19 +02:00
Brent Baude 29ec539b3f podmanv2 cp
enable podman to copy files between container and host, local mode only. this is a straight port of v1 code to v2.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-21 09:23:27 -05:00
Brent Baude ae5e7e7e78 v2podman port
add port command to podman.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-21 08:33:15 -05:00
Sujil02 ec4060aef6 Ability to prune container in api V2
Adds ability to prune containers for v2.
Adds client side prompt with force flag and filters options to prune.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-04-15 11:17:33 -04:00
Brent Baude d625aef0c5 podmanv2 mount and umount
add the ability to mount and unmount containers for the local client only

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-14 08:32:14 -05:00
Brent Baude d8d1aa49d2 v2podman add container init
add the ability to init a container both local and remote

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-13 19:51:20 -05:00
Brent Baude 7d0e0a7129 v2podman container cleanup
add the ability to clean up after a container has attempted to run.  this is also important for podman run --rm --rmi.

also included are fixes and tweaks to various code bits to correct regressions on output.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-09 16:59:33 -05:00
Valentin Rothberg 7a3bfbf076 podmanV2: implement logs
Implement the `podman {container} logs` for the v2 client. The remote
client does not yet support it.  There's some more work needed for the
rest api; some options are missing (e.g., printing names) while others
are broken (e.g., the until http parameter).

The remote parts will be tackled in a future change.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-09 11:55:10 +02:00
Brent Baude 1bfb96b540 v2podman run
add the ability to run a container

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 15:23:04 -05:00
Brent Baude b22254dc8b podmanv2 ps
add the ability to list containers

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 12:12:59 -05:00
Brent Baude 5e0b449736 podmanv2 start
add the ability to start containers

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 09:26:11 -05:00
Brent Baude 4d895dcb54 v2podman attach and exec
add the ability to attach to a running container.  the tunnel side of this is not enabled yet as we have work on the endpoints and plumbing to do yet.

add the ability to exec a command in a running container.  the tunnel side is also being deferred for same reason.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-05 15:54:51 -05:00
Brent Baude 6514a5c80e v2podman container create
create a container in podmanv2 using specgen approach.  this is the core implementation and still has quite a bit of code commented out specifically around volumes, devices, and namespaces.  need contributions from smes on these parts.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-03 15:43:03 -05:00
Brent Baude 8a16674722 podmanv2 checkpoint and restore
add the ability to checkpoint and restore containers on v2podman

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-03 09:32:06 -05:00
Brent Baude bb39051616 podmanv2 export
add ability to export a container to a tarball

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-01 16:02:53 -05:00
Jhon Honce 46e3b2efb8 V2 podman inspect
* Expose podman container inspect
* Expose podman image inspect

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-01 08:07:43 -07:00
Brent Baude 3ff1583814 podmanv2 commit
add commit of a container to a container-image

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-28 10:11:50 -05:00
Valentin Rothberg 500a2d508b podmanV2: implement top
Implement the `top` command for podmanV2.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-03-27 09:14:01 +01:00
Brent Baude 2fa78938a9 podmanv2 container inspect
add ability to inspect a container

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-26 15:54:26 -05:00
Brent Baude 9536560b4f podmanv2 add core container commands
add core container commands for podmanv2: kill, pause, restart, rm, stop, unpause

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-22 13:24:45 -05:00
Brent Baude c81e065149 podmanv2 enable remote wait
enable remote container wait with condition

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-20 14:33:33 -05:00
Brent Baude baf3a9b3a7 use boolreport for containerexists response
in the case of exists, use a boolreport structure so that responses can be consistent pointer and error

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-20 13:01:24 -05:00
Brent Baude 87293028e6 podmanv2 container exists|wait
enable container exists and wait for podmanv2

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-20 12:54:45 -05:00
Jhon Honce fbe743501e V2 podman command
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-03-18 16:41:12 -07:00