414 Commits

Author SHA1 Message Date
e3313fdd50 Merge pull request #8488 from rhatdan/platform
Add support for --platform
2020-12-01 21:48:40 +01:00
b7ff6f0912 Merge pull request #8505 from Luap99/network-labels
podman network label support
2020-12-01 21:43:27 +01:00
1316b2927b Merge pull request #8519 from rhatdan/man
[CI:DOCS] Document volume mounts of source directories do NOT get created
2020-12-01 15:17:37 +01:00
9ae12f84e8 Merge pull request #8475 from rhatdan/subscriptions
Switch from pkg/secrets to pkg/subscriptions
2020-12-01 14:31:35 +01:00
969dc227d4 Document volume mounts of source directories do NOT get created
We differ from Docker, in that we do not create the source directory
in a --volume mount if it does not exists.  We return an error.

We do not believe that a `typo` from the user should cause a directory
to be created and silently ignored by Podman.

Fixes: https://github.com/containers/podman/issues/8513

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-01 08:28:36 -05:00
f6fb297a49 Merge pull request #8517 from rhatdan/man
[CI:DOCS] Fix option names --subuidname and --subgidname
2020-11-30 20:30:32 +01:00
0a87dbe353 Fix extra quotation mark in manpages.
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-11-30 13:54:03 -05:00
e2c406f199 Merge pull request #8465 from rhatdan/pull
Document docker transport is the only supported remote transport
2020-11-30 19:52:04 +01:00
1613921ecc Merge pull request #8514 from Luap99/revert-8410-fix-multiple-networks
Revert "Allow multiple --network flags for podman run/create"
2020-11-30 19:43:19 +01:00
56ad7ac54e Fix option names --subuidname and --subgidname
Options --subuid and --subgid does not exists

Fixes: https://github.com/containers/podman/issues/8510

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-30 13:29:51 -05:00
f3402c73d4 Revert "Allow multiple --network flags for podman run/create"
As described in issue #8507 this commit contains a breaking
change which is not wanted in v2.2.

We can discuss later if we want this in 3.0 or not.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-30 18:10:26 +01:00
9ba52e8ef0 Document docker transport is the only supported remote transport
The goal is to improve errors when users use the wrong transport
in certain cases we stutter, in other cases we don't give enough
information.

Remove stutters when failing to pull remote images, because of
lack of support.

Fix errors returned by reference.Parse to wrap in image that was being
checked.

Fixes: https://github.com/containers/podman/issues/7116

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-29 06:28:39 -05:00
8494bcb866 podman network label support
Add label support for podman network create. Use the `args`
field in the cni config file to store the podman labels.
Use `podman_labels` as key name and store the labels as
map[string]string.

For reference: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md#args-in-network-config
https://github.com/containernetworking/cni/blob/spec-v0.4.0/SPEC.md#network-configuration

Example snippet:

```
...
"args": {
	"podman_labels": {
		"key1":"value1",
		"key2":"value2"
	}
}
...
```

Make podman network list support several filters. Supported filters are name,
plugin, driver and label. Filters with different keys work exclusive. Several label
filters work exclusive and the other filter keys are working inclusive.

Also adjust the compat api to support labels in network create and list.

Breaking changes:

- podman network ls -f shortform is used for --filter instead --format
This matches docker and other podman commands (container ps, volume ps)

- libpod network list endpoint filter parameter is removed. Instead the
filters paramter should be used as json encoded map[string][]string.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-28 18:35:43 +01:00
20160af018 Switch from pkg/secrets to pkg/subscriptions
The buildah/pkg/secrts package was move to
containers/common/pkg/subscriptions.
Switch to using this by default.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-26 07:30:18 -05:00
88f8d96ed8 Add support for --platform
For docker compatibility we need to support --platform
flag.

podman create --platform
podman run --platform
podman pull --platform

Since we have --override-os and --override-arch already
this can be done just by modifying the client to split
the --platform call into os and arch and then pass those
options to the server side.

Fixes: https://github.com/containers/podman/issues/6244

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-26 06:08:11 -05:00
5cfbe0b78e squash
Signed-off-by: jortkoopmans <jort@jabo-solutions.eu>
2020-11-25 18:27:31 +01:00
05f7c95568 [CI:DOCS] fix misleading save/load usage
Fix the container archive description in podman save/load docs that may lead to misusing the save/load instead of import/export for containers.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-11-24 13:48:30 -05:00
10c2c839c0 Merge pull request #8446 from Luap99/podman-container-ps
Add podman container ps command
2020-11-23 19:09:45 +01:00
c901a766fb Add podman container ps command
This command exists in docker and is also in our documentation.

Also remove mentions of `podman ls` or `podman list`. These
commands do not exists in podman or docker.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-23 10:49:26 +01:00
5d9647a120 clarify ps(1) fallback of podman top
Podman top falls back to executing ps(1) inside the container in the
presence of ps-specific flags.  Clarify that a bit more to help users
resolve issues when, for instance, ps(1) isn't installed in the
container.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-23 10:35:52 +01:00
b30ca110ec Merge pull request #8410 from Luap99/fix-multiple-networks
Allow multiple --network flags for podman run/create
2020-11-21 02:11:22 +01:00
864fe21ed0 Merge pull request #8406 from jwhonce/issues/8390
Make podman service log events
2020-11-20 18:10:56 +01:00
f441190d10 Allow multiple --network flags for podman run/create
We allow a container to be connected to several cni networks
but only if they are listed comma sperated. This is not intuitive
for users especially since the flag parsing allows multiple string
flags but only would take the last value. see: spf13/pflag#72

Also get rid of the extra parsing logic for pods. The invalid options
are already handled by `pkg/specgen`.

A test is added to prevent a future regression.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-20 17:02:48 +01:00
d8795a36b2 Make podman service log events
* Log endpoint calls at level Info
* Ensure API server started at level Info

Fixes #8390

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-19 14:42:56 -07:00
9770947818 Document containers.conf settings for remote connections
Currently we don't document which end of the podman-remote client server
operations uses the containers.conf.  This PR begins documenting this
and then testing to make sure the defaults follow the rules.

Fixes: https://github.com/containers/podman/issues/7657

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-19 14:48:10 -05:00
e239bfa15b Merge pull request #8391 from baude/networkconnectdisconnect
add network connect|disconnect compat endpoints
2020-11-19 16:54:29 +01:00
a3e0b7d117 add network connect|disconnect compat endpoints
this enables the ability to connect and disconnect a container from a
given network. it is only for the compatibility layer. some code had to
be refactored to avoid circular imports.

additionally, tests are being deferred temporarily due to some
incompatibility/bug in either docker-py or our stack.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-19 08:16:19 -06:00
e7fd9234cd Align the podman pod ps --filter behavior with podman ps
Filters with the same key work inclusive with the only exception being
`label` which is exclusive. Filters with different keys always work exclusive.

Also update the documentation with the new behavior.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-18 19:31:25 +01:00
770b03a50c Merge pull request #8363 from AlbanBedel/play-kube-create-only
Add an option to control if play kube should start the pod
2020-11-17 22:40:28 +01:00
7ab936eafa Add an option to control if play kube should start the pod
Having play kube start the pod is not always appropriate, one might
for example like to have the pod running as a set of systemd services.
Add a `start` option to the command line and API to control if the pod
should be started or not; it defaults to true for backward
compatibility.

Signed-off-by: Alban Bedel <albeu@free.fr>
2020-11-17 20:00:58 +01:00
586a7d97c2 [CI:DOCS] fix an apostrophe nit in man page
A quick follow up to #8367 to add a missing apostrophe in three
man pages.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-11-17 11:43:03 -05:00
31ceaf7bd4 Explain the relation between --pod and --network
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-17 11:57:28 +01:00
e59394973a Merge pull request #8335 from Luap99/fix-html-tables
[CI:DOCS] Fix markdown tables on docs.podman.io
2020-11-16 21:40:10 +01:00
392075631a Merge pull request #8345 from afbjorklund/volume-filter
Add support for volume ls --filter label=key=value
2020-11-15 15:13:51 +01:00
0dad2499a3 Add support for volume ls --filter label=key=value
Supposed to be able to search for labels with a given value.

Previously it meant searching for label key and label value:

--filter label=key --filter label=value

Add some documentation and integration tests for it as well.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-11-14 20:18:52 +01:00
928e3a65a9 [CI:DOCS] Touch up Podman description in man page menu
The title for the Podman man page on the commands menu was a little
light, adding a few more words to it.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-11-13 20:28:52 -05:00
738d62ea96 Merge pull request #7964 from vrothberg/shortnames
short-name aliasing
2020-11-13 18:28:17 +01:00
2993e97dec Merge pull request #6442 from Luap99/podman-autocomplete
Shell completion
2020-11-13 16:46:51 +01:00
6d9d9fee30 Merge pull request #8326 from Luap99/fix-build-namespace
Fix namespace flag parsing for podman build
2020-11-13 16:44:45 +01:00
80b613d237 Fix markdown tables on docs.podman.io
Sphinx with recommonmark cannot render markdown tables at all.
There is a python package called `sphinx-markdown-tables` which
adds the markdown table support to recommonmark.
https://pypi.org/project/sphinx-markdown-tables/

By utilising this package we don't have to change our doc format.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-13 16:42:13 +01:00
8e4a42aa42 short-name aliasing
Add support for short-name aliasing.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-13 15:40:06 +01:00
0b1a60ec27 Merge pull request #8308 from jwhonce/jira/run-976
Refactor to use DockerClient vs APIClient
2020-11-13 15:00:01 +01:00
6ea13fd872 Change podman build --pull=true to PullIfMissing
One last tweak to the man page for 'build --pull' and after
further testing against Docker, one slight change to the
pull policy.  First I changed `--pull=false` from PullNever
to PullIfMissing.  This matches Docker and will pull the
image if it's not present rather than erroring.  We've
the `--pull-never` option if someone wants the pull to
not do an actual pull and to error if the image isn't
local.

Then for the man page, I'd a much bigger change, in the
initial PR, I've backed most of that out and just
added a tweak.

Hopefully this puts this portion of the pull work behind
us for a while.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-11-12 18:50:31 -05:00
2fc2d4643e Merge pull request #8316 from rhatdan/codespell
Fix issues found with codespell
2020-11-12 23:29:51 +01:00
79f5aed316 Add podman build --net alias for --network
Fixes #8332

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-12 23:17:42 +01:00
a1187ee6f3 Refactor to use DockerClient vs APIClient
* Update tests and framework
* remove tests for APIClient methods

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-12 15:13:09 -07:00
f5a2e578eb Maintain consistent order of short and long flag names in docs
Make the order of short and long flag names in the documentation
consistent. Also adjust the man page validaten script to only allow
the `**--long**, **-s**` syntax.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-12 21:46:17 +01:00
a7431003b8 Fix issues found with codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-12 13:37:38 -05:00
53c60a68db Merge pull request #8300 from TomSweeneyRedHat/dev/tsweeney/addmain
Add podman(1) to the list of man pages on docs.podman.io
2020-11-12 11:54:16 +01:00
ae3816614d Install the new shell completion logic
Add a new make target (completion) to generate the shell
completion scripts. This will generate the scripts for bash,
zsh and fish for both podman and podman-remote with `podman completion`.
The scripts are put into the completions directory and can be
installed system wide with `sudo make install.completions`.

This commit replaces the current handwritten scripts for bash and zsh.

The `validate.completion` target has been adjusted to make sure nobody
edits these scripts directly.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-12 11:40:29 +01:00