458 Commits

Author SHA1 Message Date
c81e29525b add --cidfile to container kill
Add the ability to read container ids from one or more files for the
kill command.

Fixes: #8443

Signed-off-by: baude <bbaude@redhat.com>
2020-12-23 12:01:46 -06:00
54b82a175f Merge pull request #8787 from jsoref/spelling
Spelling
2020-12-23 17:38:43 +01:00
3cc0801516 Document uid/gidmap are based on subuid/gid mapping
* Closes #6123

Signed-off-by: Tobias Boesch <tobias.boesch@googlemail.com>
2020-12-23 11:47:59 +01:00
b41fa90a4c Merge pull request #8774 from cevich/events_file_docs
[CI:DOCS] Document location of backend events file
2020-12-23 04:43:16 -05:00
767e1ac17f Merge pull request #8804 from baude/issue8512
add pod filter for ps
2020-12-23 04:42:30 -05:00
4fa1fce930 Spelling
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-12-22 13:34:31 -05:00
c50c75419b add pod filter for ps
adds the ability to filter containers based on the filter "pod".  the
value can be a pod name or its full or partial id.

Fixes: #8512

Signed-off-by: baude <bbaude@redhat.com>
2020-12-22 09:40:39 -06:00
04b43ccf64 Add Security information to podman info
When debugging issues, it would be helpful to know the
security settings of the system running into the problem.
Adding security info to `podman info` is also useful to users.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-22 08:13:14 -05:00
ea6c1c5bd0 Document location of backend events file
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-18 16:18:27 -05:00
adcb3a7a60 remote copy
Implement `podman-remote cp` and break out the logic from the previously
added `pkg/copy` into it's basic building blocks and move them up into
the `ContainerEngine` interface and `cmd/podman`.

The `--pause` and `--extract` flags are now deprecated and turned into
nops.

Note that this commit is vendoring a non-release version of Buildah to
pull in updates to the copier package.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-18 12:08:49 +01:00
e5741b984e Merge pull request #8689 from bblenard/issue-8672-volume-prune
Add volume prune --filter support
2020-12-14 09:22:30 -05:00
a0204ada09 Add volume prune --filter support
This change adds support for the `--filter` / `?filters` arguments on
the `podman volume prune` subcommand.

  * Adds ParseFilterArgumentsIntoFilters helper for consistent
    Filter string slice handling
  * Adds `--filter` support to podman volume prune cli
  * Adds `?filters...` support to podman volume prune api
  * Updates apiv2 / e2e tests

Closes #8672

Signed-off-by: Baron Lenardson <lenardson.baron@gmail.com>
2020-12-12 20:07:04 -06:00
36bec385f3 Merge pull request #7718 from QiWang19/sign-multi-arch
Sign multi-arch images
2020-12-12 03:46:31 -05:00
6730556e2f Sign multi-arch images
podman image sign handles muti-arch images.
--all option to create signature for each manifest from the image manifest list.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-12-11 14:15:56 -05:00
098e0a7885 Handle --rm when starting a container
podman start should follow the same behaviour as podman run when removing a
container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-11 06:07:14 -05:00
6823a5d6cc Merge pull request #8664 from rhatdan/prune
Add --filter to podman system prune
2020-12-10 13:32:41 -05:00
eaa19a1c10 Merge pull request #8641 from umohnani8/play
Do not pull if image domain is localhost
2020-12-10 05:20:48 -05:00
15cdcdca76 Add --filter to podman system prune
Also document the allowable filters in podman system prune, podman image prune
and podman container prune.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 16:01:13 -05:00
059c2ee739 Merge pull request #8669 from giuseppe/unmask-also-cover-ro-paths
security: honor systempaths=unconfined for ro paths
2020-12-09 15:04:41 -05:00
176be90e0a security: honor systempaths=unconfined for ro paths
we must honor systempaths=unconfined also for read-only paths, as
Docker does:

proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-12-09 19:26:23 +01:00
49d11b53e1 Merge pull request #8661 from rhatdan/codespell
Fix spelling mistakes
2020-12-09 09:52:20 -05:00
b875c5c27c Merge pull request #8599 from rhatdan/prune
Repeat system pruning until there is nothing removed
2020-12-09 08:46:44 -05:00
a59e2a1a11 Repeat system pruning until there is nothing removed
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 06:17:28 -05:00
c21bc8f034 auto updates: document systemd unit and timer
Fixes: #8605
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-09 12:03:42 +01:00
bf5d184325 Fix spelling mistakes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 06:00:04 -05:00
3bf02fb00a Merge pull request #8630 from umohnani8/sec-opt
Add systempaths=unconfined option
2020-12-08 12:19:26 -05:00
239bd57662 Add systempaths=unconfined option
Add the systempaths=unconfined option to --security-opt
to match the docker options for unmasking all the paths
that are masked by default.
Add the mask and unmask options to the podman create doc.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2020-12-08 09:42:33 -05:00
9b3a81a002 Merge pull request #8571 from Luap99/podman-network-reload
Implement pod-network-reload
2020-12-08 06:15:40 -05:00
b0707af68b Do not pull if image domain is localhost
With podman play kube, podman would always attempt to
pull if the image has the :latest tag. But this would
fail if the image was built locally and given latest
as the tag. Images build with podman and buildah have
localhost as the domain, so check if the domain is localhost.
If that is the case, then don't attempt a pull.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2020-12-07 17:04:53 -05:00
bfbeece27b Merge pull request #8581 from baude/kubegen
generate kube on multiple containers
2020-12-07 16:16:15 -05:00
b0286d6b43 Implement pod-network-reload
This adds a new command, 'podman network reload', to reload the
networks of existing containers, forcing recreation of firewall
rules after e.g. `firewall-cmd --reload` wipes them out.

Under the hood, this works by calling CNI to tear down the
existing network, then recreate it using identical settings. We
request that CNI preserve the old IP and MAC address in most
cases (where the container only had 1 IP/MAC), but there will be
some downtime inherent to the teardown/bring-up approach. The
architecture of CNI doesn't really make doing this without
downtime easy (or maybe even possible...).

At present, this only works for root Podman, and only locally.
I don't think there is much of a point to adding remote support
(this is very much a local debugging command), but I think adding
rootless support (to kill/recreate slirp4netns) could be
valuable.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-07 19:26:23 +01:00
749ee2a10e generate kube on multiple containers
add the ability to add multiple containers into a single k8s pod
instead of just one.

also fixed some bugs in the resulting yaml where an empty service
description was being added on error causing the k8s validation to fail.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-07 11:34:39 -06:00
cf8f2342a1 image sign using per user registries.d
Support per user ~/.config/containers/registries.d to allow rootless image sign configurations.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-12-07 09:58:38 -05:00
0f496e4b81 Merge pull request #8570 from vrothberg/run-950
rewrite container copy
2020-12-04 13:33:36 -05:00
ccbca0b4ab rewrite podman-cp
* Add a new `pkg/copy` to centralize all container-copy related code.

* The new code is based on Buildah's `copier` package.

* The compat `/archive` endpoints use the new `copy` package.

* Update docs and an several new tests.

* Includes many fixes, most notably, the look-up of volumes and mounts.

Breaking changes:

 * Podman is now expecting that container-destination paths exist.
   Before, Podman created the paths if needed.  Docker does not do
   that and I believe Podman should not either as it's a recipe for
   masking errors.  These errors may be user induced (e.g., a path
   typo), or internal typos (e.g., when the destination may be a
   mistakenly unmounted volume).  Let's keep the magic low for such
   a security sensitive feature.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-04 14:39:55 +01:00
d9154e97eb Add containerenv information to /run/.containerenv
We have been asked to leak some information into the container
to indicate:
* The name and id of the container
* The version of podman used to launch the container
* The image name and ID the container is based on.
* Whether the container engine is running in rootless mode.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-03 13:32:15 -05:00
8437a6df16 Correct which network commands can be run as rootless
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-03 14:43:37 +01:00
5cf7aa65fb Merge pull request #8408 from umohnani8/sec-opt
Add mask and unmask option to --security-opt
2020-12-03 00:49:23 +01:00
0334b61958 Add mask and unmask option to --security-opt
Add the mask and unmask option to the --security-opt flag
to allow users to specify paths to mask and unmask in the
container. If unmask=ALL, this will unmask all the paths we
mask by default.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2020-12-02 16:07:18 -05:00
e74072e742 Merge pull request #8112 from QiWang19/load-optional-name
Drop name argument from Load API
2020-12-02 21:35:31 +01:00
f525d8b843 Do not pass name argument to Load API
Not pass the name argument to Load API. Specify in the document the usage of the optional argument is tagging an additional image.
Close #7337

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-12-02 09:25:01 -05:00
c31a5c0d9c Add support for network ids
The network ID is not stored. It is just the sha256 hash from
the network name. There is a risk of a potential hash collision.
However it's very unlikely and even if we hit this it will
complain that more than network with this ID exists.

The main benefit is that the compat api can have proper
network ID support. Also this adds the support for
`podman network ls --format "{{.ID}}"` and `--filter id=<ID>`.

It also ensures that we can do network rm <ID> and network
inspect <ID>.

Since we use a hash this commit is backwards compatible even for
already existing networks.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-02 10:27:00 +01:00
7f1be76b5c Add podman network create option for bridge vlan
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00
b1b35707aa Add podman network create option for bridge mtu
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:03 +01:00
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