Commit graph

104 commits

Author SHA1 Message Date
Daniel J Walsh 526f01cdf5
Fix up errors found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 06:14:25 -04:00
Daniel J Walsh a5e37ad280
Switch all references to github.com/containers/libpod -> podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 08:23:45 -04:00
Daniel J Walsh 4352d58549
Add support for containers.conf
vendor in c/common config pkg for containers.conf

Signed-off-by: Qi Wang qiwan@redhat.com
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-27 14:36:03 -04:00
Qi Wang 9ac58fd78e Use creds form PullImage remote
fix #5511
Adds creds argument to PullImage API and Enables podman-remote to pull image with --creds

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-03-19 14:38:12 -04:00
Sascha Grunert 93358ef915
Refactor image tree for API usage
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-02-17 11:12:35 +01:00
Daniel J Walsh 45e9a6b12e
Remove c.String(net)
We have a lot of cludgy code trying to make --net and --network equivalent.
This will allow --net to still exists but will eliminate the help and confusion.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-16 09:23:32 -05:00
Sorin Sbarnea e9cd3319cf Enable pre-commit tool linting
This should help use keep the codebase more consistent, and avoid sevel
whitespace related issues, or bad file permissions.

pre-commit allows us to easily introduce other linters in follow-ups,
like bashate.

Note: pre-commit tool does *not* install any git-hooks. Making commits
will will call the tool unless you deliverately tell it to install the
hooks.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2020-01-14 13:42:59 +00:00
Daniel J Walsh 4093b2c011
Add codespell to validate spelling mistakes in code.
Fix all errors found by codespell

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-11 06:32:19 -05:00
OpenShift Merge Robot f3fc10feb4
Merge pull request #4802 from rhatdan/varlink
Fix podman-remote info to show registry data
2020-01-09 10:40:20 +01:00
Sascha Grunert 40b74e02b7
Add untag sub-command
Podman now supports untagging images via the `untag` sub-command for the
root and `image` commands. Testing and documentation has been added as
well.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-08 10:06:10 +01:00
Daniel J Walsh d52a4dc2d4
Fix podman-remote info to show registry data
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-07 19:38:46 -05:00
baude 4f09cfdacc add struct response for removal of images
when removing an image from storage, we should return a struct that
details what was untagged vs deleted.  this replaces the simple
println's used previously and assists in API development.

Signed-off-by: baude <bbaude@redhat.com>
2019-12-23 10:02:14 -06:00
baude 8be7b466d8 move image filters under libpod/images
to make things more effecient for the api work we are doing, we should
process image filters internally (as opposed to in main).  this allows
for better api responses and more closely affiliated functions.

Signed-off-by: baude <bbaude@redhat.com>
2019-12-10 13:05:18 -06:00
Daniel J Walsh 79bf5010ed
Add podman system reset command
This command will destroy all data created via podman.
It will remove containers, images, volumes, pods.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-29 05:34:52 -05:00
Sascha Grunert 63e46cc85c
Add support for image name history
We leverage the containers/storage image history tracking feature to
show the previously used image names when running:
`podman images --history`

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-11-27 13:42:06 +01:00
Kunal Kushwaha 5082496cc0 filter added to image pruge command.
filter option accepts two filters.
- label
- until
label supports "label=value" or "label=key=value" format
until supports all golang compatible time/duration formats.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2019-11-22 17:36:27 +09:00
Nalin Dahyabhai 07195ff09f API: report multiple digests for images
Be prepared to report multiple image digests for images which contain
multiple manifests but, because they continue to have the same set of
layers and the same configuration, are considered to be the same image.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-10-29 13:35:19 -04:00
Nalin Dahyabhai b9313d355e pull/create: add --override-arch/--override-os flags
Add --override-arch and --override-os as hidden flags, in line with the
global flag names that skopeo uses, so that we can test behavior around
manifest lists without having to conditionalize more of it by arch.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-10-29 13:35:19 -04:00
Matthew Heon 03da8b641d Rewrite backend for remote 'volume inspect'
We need to use the new Inspect() endpoint instead of trying to
JSON the actual volume structs. Currently, the output seems
completely nonsensical; it seems like we're JSONing the struct
for the Varlink connection itself? This should restore sanity and
match the format of remote and local inspect on volumes.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-21 14:37:27 -04:00
Giuseppe Scrivano 5963077e93
cli: support --systemd=always
it enforces the systemd mode also when the command name doesn't match
/usr/sbin/init or systemd.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-09 23:39:18 +02:00
OpenShift Merge Robot c9e936a407
Merge pull request #3549 from marcov/evict-container
Add ability to evict a container
2019-10-04 07:30:27 -07:00
Marco Vedovati dacbc5beb2 rm: add containers eviction with rm --force
Add ability to evict a container when it becomes unusable. This may
happen when the host setup changes after a container creation, making it
impossible for that container to be used or removed.
Evicting a container is done using the `rm --force` command.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-09-25 19:44:38 +02:00
baude e9421479d1 Document the required varlink build args
The API document incorrectly documented the wrong varlink build
arguments.  The output attribute is required.

Fixes: #3204

Signed-off-by: baude <bbaude@redhat.com>
2019-09-24 08:05:31 -05:00
OpenShift Merge Robot c1761ba1ac
Merge pull request #3817 from xcffl/master
Add explanation mounting named volumes for `podman run`
2019-09-10 19:17:39 +02:00
Matthew Heon 046178e55f Add function for looking up volumes by partial name
This isn't included in Docker, but seems handy enough.

Use the new API for 'volume rm' and 'volume inspect'.

Fixes #3891

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-09 12:06:10 -04:00
xcffl 3d240bd795 Replace "podman" with "Podman"
Signed-off-by: xcffl <xcffl@outlook.com>
2019-09-07 20:16:42 +08:00
Jhon Honce 02cda4066d Update varlink doc and code
* Improved error message
* Added documentation
* Updated messages to include missing data

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-08-26 16:45:49 -07:00
Valentin Rothberg a33e4a89ca generate systemd: drop support for remote clients
Drop the support for remote clients to generate systemd-service files.
The generated files are machine-dependent and hence relate only to the
a local machine.  Furthermore, a proper service management when using
a remote-client is not possible as systemd has no access to a process.

Dropping the support will also reduce the risk of making users believe
that the generated services are usable in a remote scenario.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-21 09:41:07 +02:00
Ashley Cui 8c7014f11d Implement healthcheck for remote client
Previously unimplemented. Works the same way the local one does, except its remote.

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-08-19 12:14:54 -04:00
OpenShift Merge Robot bd0b05f138
Merge pull request #3709 from mheon/volume_inspect
Change backend code for 'volume inspect'
2019-08-19 13:57:15 +02:00
OpenShift Merge Robot 76f327f73f
Merge pull request #3617 from QiWang19/create_pull
add --pull flag for podman create&run
2019-08-17 14:55:14 +02:00
baude 55cc80d3c9 varlink endpoint for containerstats requires root
obtaining containerstats requires the use of cgroups. at present,
rootless users do not have privileges to create cgroups.  add an error
message that catches this for the varlink endpoint and return a proper
error.

Fixes: #3749

Signed-off-by: baude <bbaude@redhat.com>
2019-08-12 13:08:57 -05:00
Qi Wang decfea65be add --pull flag for podman create&run
Requirement from https://github.com/containers/libpod/issues/3575#issuecomment-512238393

Added --pull for podman create and pull to match the newly added flag in docker CLI.
`missing`: default value, podman will pull the image if it does not exist in the local.
`always`: podman will always pull the image.
`never`: podman will never pull the image.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-09 15:21:34 -04:00
baude 63eef5a234 add eventlogger to info
to help with future debugging, we now display the type of event logger
being used inside podman info -> host.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-02 20:05:27 -05:00
Matthew Heon 610003ab0f Update Varlink API documentation for volumes changes
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-02 15:17:25 -04:00
Peter Hunt 5bf99a82ff add detach keys support for remote
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-23 13:29:33 -04:00
Peter Hunt a1a79c08b7 Implement conmon exec
This includes:
	Implement exec -i and fix some typos in description of -i docs
	pass failed runtime status to caller
	Add resize handling for a terminal connection
	Customize exec systemd-cgroup slice
	fix healthcheck
	fix top
	add --detach-keys
	Implement podman-remote exec (jhonce)
	* Cleanup some orphaned code (jhonce)
	adapt remote exec for conmon exec (pehunt)
	Fix healthcheck and exec to match docs
		Introduce two new OCIRuntime errors to more comprehensively describe situations in which the runtime can error
		Use these different errors in branching for exit code in healthcheck and exec
	Set conmon to use new api version

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-22 15:57:23 -04:00
Daniel J Walsh 8ae97b2f57
Add support for listing read/only and read/write images
When removing --all images prune images only attempt to remove read/write images,
ignore read/only images

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-19 06:59:49 -04:00
Qi Wang c244c347b1 podman-remote make --size optional in ps
Close #3578 Add `size` field to PsOpts in podman remote to receive size as an option.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-07-18 09:34:19 -04:00
Petr Vaněk 3db5cd67d4 API.md: fix few typos
Appropriate changes were applied to the file
cmd/podman/varlink/io.podman.varlink, in order to make changes in API.md
persistent.

Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
2019-06-15 23:07:46 +02:00
baude 2df462024b podman remote-client commit
add the ability to commit a container to an image using the remote
client.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-30 10:14:23 -05:00
baude e2777a526d document nullable types
the varlink doc generator was ignoring all nullable types when
generating its documentation

Signed-off-by: baude <bbaude@redhat.com>
2019-05-22 10:08:03 -05:00
Daniel J Walsh baed81029b
Fixup Flags
Mark hidden all references to signature-policy
Default all uses of --authfile
Add --authfile support to podman run and podman create.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-05-20 13:53:32 -04:00
baude bc7b1ca03d enable integration tests for remote-client
first pass at enabling a swath of integration tests for the
remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-07 14:06:02 -05:00
Chris Evich 5e6796c397
Fix API.md
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-03 15:05:17 -04:00
baude 495f2ce515 Fixes for podman-remote run and attach
Fixes the ability to run (create,start) a container and attach to its
console correctly.  We can now also exit from the console without
hanging the remote client.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-11 13:51:50 -05:00
baude fbcda7772d Add the ability to attach remotely to a container
Also, you can now podman-remote run -it.  There are some bugs that need
to be ironed out but I would prefer to merge this so we can make both
progress on start and exec as well as the bugs.

* when doing podman-remote run -it foo /bin/bash, you have to press
enter to get the prompt to display. with the localized podman, we had to
teach it connect to the console first and then start the container so we
did not miss anything.

* when executing "exit" in the console, we get a hard lockup likely
because nobody knows what to do.

* custom detach keys are not supported

* podman-remote run -it alpine ls does not currently work.  only
dropping to a shell works.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-10 08:59:28 -05:00
baude ba65301c95 podman-remote create|run
add the ability to create and run containers via the podman-remote
client.

we now create an intermediate layer from the the create/run cli flags.
the intermediate layer can be converted into a createconfig or into a
varlink struct.  Once transported, the varlink struct can be converted
back to an intermediate layer and then to a createconfig.

remote terminals are not supported yet.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-08 09:05:31 -05:00
baude dc94dbd3c1 podman-remote image tree
add the ability for the podman-remote client to be able to print an
image tree.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-04 14:41:50 -05:00
baude 576a80b0d7 add remote-client diff
the remote client now can run the diff command to report changes,
modifications, and deletions in an image or container.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-03 09:52:38 -05:00