Commit graph

1407 commits

Author SHA1 Message Date
Yohan Belléguic 6518391e87 Fix man page for fuse-overlayfs config in rootless mode
Signed-off-by: Yohan Belléguic <yohan.belleguic@arkea.com>
2021-01-20 14:58:42 +01:00
OpenShift Merge Robot 5e7262ddf5
Merge pull request #9021 from Luap99/podman-network-exists
podman network exists
2021-01-19 16:56:17 -05:00
Ed Santiago 37abec240a [CI:DOCS] fix go-md2man HTMLSpan warnings
I'm tired of seeing these every time I run 'make':

   WARNING: go-md2man does not handle node type HTMLSpan

Cause: left-angle-brackets ( < ) in document source

Solution:
  1) backquote-escape those that need to be shown, usually
     ones referring to an argument or email address; or
  2) Actual HTML ( <sup> and <a> ) which are meant to be
     shown in generated HTML docs but can't be shown in
     man pages, we filter out via a sed expression.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-01-19 12:59:03 -07:00
Paul Holzinger a45d22a1dd podman network exists
Add podman network exists command with remote support.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-19 15:18:03 +01:00
OpenShift Merge Robot 341c4b1fd9
Merge pull request #8942 from rhatdan/push
Allow podman push to push manifest lists
2021-01-17 06:52:35 -05:00
Daniel J Walsh cf51c7ed9f
Allow podman push to push manifest lists
When doing a podman images, manifests lists look just like images, so
it is logical that users would assume that they can just podman push them
to a registry.  The problem is we throw out weird errors when this happens
and users need to somehow figure out this is a manifest list rather then
an image, and frankly the user will not understand the difference.

This PR will make podman push just do the right thing, by failing over and
attempting to push the manifest if it fails to push the image.

Fix up handling of manifest push

Protocol should bring back a digest string, which can either be
printed or stored in a file.

We should not reimplement the manifest push setup code in the tunnel
code but take advantage of the api path, to make sure remote and local
work the same way.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-15 13:24:34 -05:00
OpenShift Merge Robot 7d3a628c6b
Merge pull request #8982 from Luap99/container-rename-bindings
Container rename bindings
2021-01-15 10:48:27 -05:00
Paul Holzinger 0688f080b8 Fix missing podman-container-rename man page link
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-15 12:57:33 +01:00
Daniel J Walsh c88022589a
Bump to containers/buildah 1.9.2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-15 06:23:19 -05:00
OpenShift Merge Robot 3fcf346890
Merge pull request #8955 from mheon/rename
Container Rename
2021-01-14 22:03:01 -05:00
Matthew Heon 997de2f8e9 Initial implementation of renaming containers
Basic theory: We remove the container, but *only from the DB*.
We leave it in c/storage, we leave the lock allocated, we leave
it running (if it is). Then we create an identical container with
an altered name, and add that back to the database. Theoretically
we now have a renamed container.

The advantage of this approach is that it doesn't just apply to
rename - we can use this to make *any* configuration change to a
container that does not alter its container ID.

Potential problems are numerous. This process is *THOROUGHLY*
non-atomic at present - if you `kill -9` Podman mid-rename things
will be in a bad place, for example. Also, we can't rename
containers that can't be removed normally - IE, containers with
dependencies (pod infra containers, for example).

The largest potential improvement will be to move the majority of
the work into the DB, with a `RecreateContainer()` method - that
will add atomicity, and let us remove the container without
worrying about depencies and similar issues.

Potential problems: long-running processes that edit the DB and
may have an older version of the configuration around. Most
notable example is `podman run --rm` - the removal command needed
to be manually edited to avoid this one. This begins to get at
the heart of me not wanting to do this in the first place...

This provides CLI and API implementations for frontend, but no
tunnel implementation. It will be added in a future release (just
held back for time now - we need this in 3.0 and are running low
on time).

This is honestly kind of horrifying, but I think it will work.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-01-14 18:29:28 -05:00
Matthew Heon b53cb57680 Initial implementation of volume plugins
This implements support for mounting and unmounting volumes
backed by volume plugins. Support for actually retrieving
plugins requires a pull request to land in containers.conf and
then that to be vendored, and as such is not yet ready. Given
this, this code is only compile tested. However, the code for
everything past retrieving the plugin has been written - there is
support for creating, removing, mounting, and unmounting volumes,
which should allow full functionality once the c/common PR is
merged.

A major change is the signature of the MountPoint function for
volumes, which now, by necessity, returns an error. Named volumes
managed by a plugin do not have a mountpoint we control; instead,
it is managed entirely by the plugin. As such, we need to cache
the path in the DB, and calls to retrieve it now need to access
the DB (and may fail as such).

Notably absent is support for SELinux relabelling and chowning
these volumes. Given that we don't manage the mountpoint for
these volumes, I am extremely reluctant to try and modify it - we
could easily break the plugin trying to chown or relabel it.

Also, we had no less than *5* separate implementations of
inspecting a volume floating around in pkg/infra/abi and
pkg/api/handlers/libpod. And none of them used volume.Inspect(),
the only correct way of inspecting volumes. Remove them all and
consolidate to using the correct way. Compat API is likely still
doing things the wrong way, but that is an issue for another day.

Fixes #4304

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-01-14 15:35:33 -05:00
Daniel J Walsh a7c0c9125f
Add more information and examples on podman and pipes
Improve the documentation to help users to know proper way to
use podman within a pipe.

Helps Prevent: https://github.com/containers/podman/issues/8916

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-13 15:08:46 -05:00
OpenShift Merge Robot 183f443a58
Merge pull request #8957 from srcshelton/feature/issue-8945
Add 'MemUsageBytes' format option
2021-01-13 06:28:00 -05:00
Stuart Shelton a6af56f5b4 Add 'MemUsageBytes' format option
Although storage is more human-readable when expressed in SI units,
IEC/JEDEC (Bytes) units are more pertinent for memory-related values
(and match the format of the --memory* command-line options).

(To prevent possible compatibility issues, the default SI display is
left unchanged)

See https://github.com/containers/podman/issues/8945

Signed-off-by: Stuart Shelton <stuart@shelton.me>
2021-01-12 23:38:08 +00:00
Daniel J Walsh a6046dceef
Remove the ability to use [name:tag] in podman load command
Docker does not support this, and it is confusing what to do if
the image has more then one tag.  We are dropping support for this
in podman 3.0

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-12 17:38:32 -05:00
OpenShift Merge Robot 5575c7be20
Merge pull request #8819 from chen-zhuohan/add-pre-checkpoint
Add pre-checkpoint and restore with previous
2021-01-12 07:57:05 -05:00
unknown 2aa381f2d0 add pre checkpoint
Signed-off-by: Zhuohan Chen <chen_zhuohan@163.com>
2021-01-10 21:38:28 +08:00
Daniel J Walsh 3d453f9d2e
podman build --force-rm defaults to true in code
The man page and code should match for what is the default settings.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-10 05:52:33 -05:00
Paul Holzinger 38baf3d5e2 Add Networks format placeholder to podman ps and pod ps
`podman ps --format {{.Networks}}` will show all connected networks for
this container. For `pod ps` it will show the infra container networks.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-09 19:15:43 +01:00
Paul Holzinger 1242e7b7a6 Add network filter for podman ps and pod ps
Allow to filter on the network name or full id.
For pod ps it will filter on the infra container networks.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-09 17:03:32 +01:00
OpenShift Merge Robot 49db79e735
Merge pull request #8781 from rst0git/cr-volumes
Add support for checkpoint/restore of containers with volumes
2021-01-08 10:41:05 -05:00
Daniel J Walsh d9ebbbfe5b
Switch references of /var/run -> /run
Systemd is now complaining or mentioning /var/run as a legacy directory.
It has been many years where /var/run is a symlink to /run on all
most distributions, make the change to the default.

Partial fix for https://github.com/containers/podman/issues/8369

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-07 05:37:24 -05:00
Radostin Stoyanov 288ccc4c84 Include named volumes in container migration
When migrating a container with associated volumes, the content of
these volumes should be made available on the destination machine.

This patch enables container checkpoint/restore with named volumes
by including the content of volumes in checkpoint file. On restore,
volumes associated with container are created and their content is
restored.

The --ignore-volumes option is introduced to disable this feature.

Example:

 # podman container checkpoint --export checkpoint.tar.gz <container>

The content of all volumes associated with the container are included
in `checkpoint.tar.gz`

 # podman container checkpoint --export checkpoint.tar.gz --ignore-volumes <container>

The content of volumes is not included in `checkpoint.tar.gz`. This is
useful, for example, when the checkpoint/restore is performed on the
same machine.

 # podman container restore --import checkpoint.tar.gz

The associated volumes will be created and their content will be
restored. Podman will exit with an error if volumes with the same
name already exist on the system or the content of volumes is not
included in checkpoint.tar.gz

 # podman container restore --ignore-volumes --import checkpoint.tar.gz

Volumes associated with container must already exist. Podman will not
create them or restore their content.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2021-01-07 07:51:19 +00:00
baude 0f45ea02ac sort api endpoints in documentation
users would like api endpoints to be sorted in documentation.  this
should assist in this. i do not expect that thisd will be the entire
fix. it looks like ci is not building and pushing docs rn.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-24 09:52:01 -06:00
baude 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
OpenShift Merge Robot 54b82a175f
Merge pull request #8787 from jsoref/spelling
Spelling
2020-12-23 17:38:43 +01:00
Tobias Boesch 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
Daniel J Walsh 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
Daniel J Walsh 767e1ac17f
Merge pull request #8804 from baude/issue8512
add pod filter for ps
2020-12-23 04:42:30 -05:00
Josh Soref 4fa1fce930 Spelling
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-12-22 13:34:31 -05:00
baude 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
Daniel J Walsh 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
Chris Evich ea6c1c5bd0
Document location of backend events file
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-18 16:18:27 -05:00
Valentin Rothberg 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
OpenShift Merge Robot e5741b984e
Merge pull request #8689 from bblenard/issue-8672-volume-prune
Add volume prune --filter support
2020-12-14 09:22:30 -05:00
Baron Lenardson 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
OpenShift Merge Robot 36bec385f3
Merge pull request #7718 from QiWang19/sign-multi-arch
Sign multi-arch images
2020-12-12 03:46:31 -05:00
Qi Wang 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
Daniel J Walsh 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
OpenShift Merge Robot 6823a5d6cc
Merge pull request #8664 from rhatdan/prune
Add --filter to podman system prune
2020-12-10 13:32:41 -05:00
OpenShift Merge Robot eaa19a1c10
Merge pull request #8641 from umohnani8/play
Do not pull if image domain is localhost
2020-12-10 05:20:48 -05:00
Daniel J Walsh 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
OpenShift Merge Robot 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
Giuseppe Scrivano 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
OpenShift Merge Robot 49d11b53e1
Merge pull request #8661 from rhatdan/codespell
Fix spelling mistakes
2020-12-09 09:52:20 -05:00
OpenShift Merge Robot b875c5c27c
Merge pull request #8599 from rhatdan/prune
Repeat system pruning until there is nothing removed
2020-12-09 08:46:44 -05:00
Daniel J Walsh 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
Valentin Rothberg 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
Daniel J Walsh bf5d184325
Fix spelling mistakes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 06:00:04 -05:00
OpenShift Merge Robot 3bf02fb00a
Merge pull request #8630 from umohnani8/sec-opt
Add systempaths=unconfined option
2020-12-08 12:19:26 -05:00
Urvashi Mohnani 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
OpenShift Merge Robot 9b3a81a002
Merge pull request #8571 from Luap99/podman-network-reload
Implement pod-network-reload
2020-12-08 06:15:40 -05:00
Urvashi Mohnani 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
OpenShift Merge Robot bfbeece27b
Merge pull request #8581 from baude/kubegen
generate kube on multiple containers
2020-12-07 16:16:15 -05:00
Matthew Heon 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
baude 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
Qi Wang 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
OpenShift Merge Robot 0f496e4b81
Merge pull request #8570 from vrothberg/run-950
rewrite container copy
2020-12-04 13:33:36 -05:00
Valentin Rothberg 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
Daniel J Walsh 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
Paul Holzinger 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
OpenShift Merge Robot 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
Urvashi Mohnani 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
OpenShift Merge Robot e74072e742
Merge pull request #8112 from QiWang19/load-optional-name
Drop name argument from Load API
2020-12-02 21:35:31 +01:00
Qi Wang 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
Paul Holzinger 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
Anders F Björklund 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
Anders F Björklund 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
OpenShift Merge Robot e3313fdd50
Merge pull request #8488 from rhatdan/platform
Add support for --platform
2020-12-01 21:48:40 +01:00
OpenShift Merge Robot b7ff6f0912
Merge pull request #8505 from Luap99/network-labels
podman network label support
2020-12-01 21:43:27 +01:00
OpenShift Merge Robot e3f0b7db75
Merge pull request #8400 from rhatdan/varlink
Remove varlink support from podman
2020-12-01 15:30:06 +01:00
OpenShift Merge Robot 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
OpenShift Merge Robot 9ae12f84e8
Merge pull request #8475 from rhatdan/subscriptions
Switch from pkg/secrets to pkg/subscriptions
2020-12-01 14:31:35 +01:00
Daniel J Walsh 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
OpenShift Merge Robot f6fb297a49
Merge pull request #8517 from rhatdan/man
[CI:DOCS] Fix option names --subuidname and --subgidname
2020-11-30 20:30:32 +01:00
Matthew Heon 0a87dbe353 Fix extra quotation mark in manpages.
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-11-30 13:54:03 -05:00
OpenShift Merge Robot 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
OpenShift Merge Robot 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
Daniel J Walsh 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
Luap99 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
Daniel J Walsh 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
Paul Holzinger 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
Daniel J Walsh f62a356515
Remove varlink support from Podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-26 16:50:42 -05:00
Daniel J Walsh 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
Daniel J Walsh 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
jortkoopmans 5cfbe0b78e squash
Signed-off-by: jortkoopmans <jort@jabo-solutions.eu>
2020-11-25 18:27:31 +01:00
OpenShift Merge Robot d4083954f2
Merge pull request #8459 from QiWang19/doc-save
[CI:DOCS] fix misleading save/load usage
2020-11-24 20:58:53 +01:00
Qi Wang 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
Lucendio f8f2ce07d6 [tutorials:mac-win-client] Fix command ensuring sshd is enabled
`-s, --signal` requires a value and is probably not intended to be here

Signed-off-by: Lucendio <dev@lucend.io>
2020-11-24 17:07:58 +01:00
OpenShift Merge Robot 10c2c839c0
Merge pull request #8446 from Luap99/podman-container-ps
Add podman container ps command
2020-11-23 19:09:45 +01:00
Paul Holzinger 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
Valentin Rothberg 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
OpenShift Merge Robot 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
OpenShift Merge Robot 864fe21ed0
Merge pull request #8406 from jwhonce/issues/8390
Make podman service log events
2020-11-20 18:10:56 +01:00
Paul Holzinger 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
Jhon Honce 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
Daniel J Walsh 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
OpenShift Merge Robot e239bfa15b
Merge pull request #8391 from baude/networkconnectdisconnect
add network connect|disconnect compat endpoints
2020-11-19 16:54:29 +01:00
baude 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
Paul Holzinger 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
OpenShift Merge Robot 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
OpenShift Merge Robot eefa18f2b6
Merge pull request #8356 from rhatdan/docs
[CI:DOCS] Cleanup tutorials
2020-11-17 20:11:51 +01:00
Alban Bedel 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
TomSweeneyRedHat 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
Daniel J Walsh d200801152
Cleanup tutorials
Inspired by @kannkyo PR.

Eliminate sudo when commands will work fine in rootless mode.

Make all commands in tutorials easily cut and pastable, by eliminating
$ and > symbols.

This should make them all consistant agross different tutorials.

Also make all systemctl enable calls use the --now option.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-17 06:49:53 -05:00
Paul Holzinger 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
OpenShift Merge Robot 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
OpenShift Merge Robot 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
Anders F Björklund 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
TomSweeneyRedHat 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
OpenShift Merge Robot 738d62ea96
Merge pull request #7964 from vrothberg/shortnames
short-name aliasing
2020-11-13 18:28:17 +01:00
OpenShift Merge Robot 2993e97dec
Merge pull request #6442 from Luap99/podman-autocomplete
Shell completion
2020-11-13 16:46:51 +01:00
OpenShift Merge Robot 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
Paul Holzinger 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
Valentin Rothberg 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
OpenShift Merge Robot 0b1a60ec27
Merge pull request #8308 from jwhonce/jira/run-976
Refactor to use DockerClient vs APIClient
2020-11-13 15:00:01 +01:00
OpenShift Merge Robot 42a5b0fd93
Merge pull request #8301 from TomSweeneyRedHat/dev/tsweeney/fixpully
Change podman build --pull=true to PullIfMissing
2020-11-13 10:42:13 +01:00
OpenShift Merge Robot b2d281afcc
Merge pull request #8328 from FreedomBen/add-socket-start
[CI:DOCS] Add missing --now in systemctl start command
2020-11-13 09:50:58 +01:00
Benjamin Porter ba8a71f9ce Add missing --now in systemctl start command
If you don't use --now or also run systemctl --user start podman.socket
then the socket won't start until a reboot.  Much easier to just start
the socket at the same time as enabling it.

Signed-off-by: Benjamin Porter <FreedomBen@users.noreply.github.com>
2020-11-12 19:18:59 -07:00
TomSweeneyRedHat 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
OpenShift Merge Robot 2fc2d4643e
Merge pull request #8316 from rhatdan/codespell
Fix issues found with codespell
2020-11-12 23:29:51 +01:00
Paul Holzinger 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
Jhon Honce 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
Paul Holzinger 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
Daniel J Walsh a7431003b8
Fix issues found with codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-12 13:37:38 -05:00
OpenShift Merge Robot 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
Paul Holzinger 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
Paul Holzinger b5d1d89a37 Add shell completion with cobra
Allow automatic generation for shell completion scripts
with the internal cobra functions (requires v1.0.0+).

This should replace the handwritten completion scripts
and even adds support for fish. With this approach it is
less likley that completions and code are out of sync.

We can now create the scripts with
- podman completion bash
- podman completion zsh
- podman completion fish

To test the completion run:
source <(podman completion bash)

The same works for podman-remote and podman --remote and
it will complete your remote containers/images with
the correct endpoints values from --url/--connection.

The completion logic is written in go and provided by the
cobra library. The completion functions lives in
`cmd/podman/completion/completion.go`.

The unit test at cmd/podman/shell_completion_test.go checks
if each command and flag has an autocompletion function set.
This prevents that commands and flags have no shell completion set.

This commit does not replace the current autocompletion scripts.

Closes #6440

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-12 11:38:31 +01:00
Ed Santiago b0601cb34a [CI:DOCS] Restore man page cross-checker
Somewhere in the CIv2 migration we lost the man page vs --help
cross-checker. Add it back, by adding it into the man-page-check
Makefile target; this is part of 'make validate', which is run
in CI even on CI:DOCS PRs.

As happens when CI doesn't run, things broke. Man pages got out
of sync with --help. This PR:

 1) Fixes hack/xref-helpmsgs-manpages to deal with the new
    "Options" (instead of "Flags") form of podman help. #8034
    did part of that, but one of my review comments was
    accidentally left out.

 2) Fixes hack/xref-helpmsgs-manpages to deal with the new
    option syntax in man pages, post- #8292, in which each
    option is preceded by four hashes so as to make them
    HTML <h4> elements with named anchors.

 3) Fixes man pages that #8292 accidentally missed.

 4) Adds man page entries for two flags that got added
    to podman but not documented (pod create --network-alias,
    play kube --log-driver)

Fixes: #8296

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-11-11 08:31:30 -07:00
TomSweeneyRedHat 4c422cbc34 Add podman(1) to the list of man pages on docs.podman.io
As the title says.

Addresses: #7219

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-11-10 19:36:18 -05:00
OpenShift Merge Robot ca672373b5
Merge pull request #8292 from Luap99/doc-anchors
[CI:DOCS] Add anchors for flag names on docs.podman.io
2020-11-10 19:12:58 +01:00
OpenShift Merge Robot ce2ac7d2d2
Merge pull request #8251 from baude/networkaliases
network aliases for container creation
2020-11-10 19:10:59 +01:00
Paul Holzinger 52a8694705 Add anchors for flag names on docs.podman.io
Change the docs markdown so that flag names will be h4 headers.
Sphinx will automatically add anchors to headers. Add css to
make sure the flag names are not to big compared to the text.

The man pages also still renders fine but it looks a bit different.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-10 15:27:08 +01:00
OpenShift Merge Robot da01191aa3
Merge pull request #8278 from rhatdan/man1
[CI:DOCS] Add example of fuse-overlay to podman system reset
2020-11-10 14:25:44 +00:00
Daniel J Walsh 0ba2261528
Add example of fuse-overlay to podman system reset
A fairly common mistake users are hitting is running rootless podman without
installing fuse-overlay.  Then they want to reset storage.  Sometimes they
modify storage.conf first and `podman system reset` fails.

This PR attempts to explain how to convert properly.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-10 07:24:13 -05:00
Antonio Ojea e7a72d72fd enable ipv6 network configuration options
enable the ipv6 flag in podman network to be able to create
dual-stack networks for containers.

This is required to be compatible with docker, where --ipv6
really means dual stack.

podman, unlike docker, support IPv6 only containers since
07e3f1bba9.

Signed-off-by: Antonio Ojea <aojea@redhat.com>
2020-11-10 08:34:52 +01:00
baude b7b5b6f8e3 network aliases for container creation
podman can now support adding network aliases when running containers
(--network-alias).  It requires an updated dnsname plugin as well as an
updated ocicni to work properly.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-09 15:08:58 -06:00
Daniel J Walsh c12065401f
Update podman build man page to match buildah bud man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-09 15:10:20 -05:00
Kier Davis 71fe822434 podman-pull.1.md: add example for pulling an image by hash
Signed-off-by: Kier Davis <me@kierdavis.com>
2020-11-09 13:18:38 -06:00
Kier Davis c20a70f8c3 podman-import.1.md: fix paragraph formatting
Signed-off-by: Kier Davis <me@kierdavis.com>
2020-11-09 13:18:38 -06:00
Kier Davis f29cda6d92 podman-import.1.md: fix shell syntax
Signed-off-by: Kier Davis <me@kierdavis.com>
2020-11-09 13:18:38 -06:00
OpenShift Merge Robot 4d013caffc
Merge pull request #8249 from marcnuri-forks/fix/doc-typo
[CI:DOCS] fix: podman-system-service doc time is seconds
2020-11-05 16:03:52 +01:00
Marc Nuri 59a3078853 fix: podman-system-service doc time is seconds
Signed-off-by: Marc Nuri <marc@marcnuri.com>
2020-11-05 14:44:25 +01:00
Daniel J Walsh 6ca705bf1a
Add support for mounting external containers
Continue progress on use of external containers.

This PR adds the ability to mount, umount and list the
storage containers whether they are in libpod or not.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-04 13:52:08 -05:00
OpenShift Merge Robot 5b17f58e7e
Merge pull request #8219 from rhafer/rootless-mounts
docs: Mention mounts.conf location for non-root users
2020-11-03 14:34:08 -05:00
JJ Asghar 1147bc7e7b Update README.md
Typo

Signed-off-by: JJ Asghar <jjasghar@gmail.com>
2020-11-02 16:22:52 -06:00
OpenShift Merge Robot 8dfbdb561b
Merge pull request #8166 from rhatdan/unbindable
Allow users to mount with unbindable flag
2020-11-02 18:19:39 +01:00
Ralf Haferkamp 448aafc2fd docs: Mention mounts.conf location for non-root users
Signed-off-by: Ralf Haferkamp <rhafer@suse.com>
2020-11-02 16:55:10 +01:00
Daniel J Walsh 3ee44d942e
Add better support for unbindable volume mounts
Allow users to specify unbindable on volume command line

Switch internal mounts to rprivate to help prevent leaks.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-02 07:19:12 -05:00
TomSweeneyRedHat 7841aea292 Match build pull functionality with Docker's
This is a continuation of #8189 and #8085.

When doing a `docker build` command, if the `--pull` command is not specified
or set to `false` the pullOption used is `PullifMissing`.  This causes the
build to pull the image only if it is not present in local storage.  It also will
raise an error if the image is not found in the registry (or the registry is down),
even if the image is present in local storage.

If the `--pull` command IS specified or specified with an argument of `true`, the
build will always pull the image from the registries.  This uses the pullOption
`PullAlways`.  It also will raise an error if the image is not found in the registry,
even if the image is present in local storage.

These changes now brings the pull functionality for `podman build` into line
with `docker build`.

However, I consider this to be a breaking change.  Previously if you did
`podman build --pull`, `podman build` or `podman build --pull = true`, then
the image would be pulled from the registry if there was not an image in
local storage or if the image in the registry was newer than the one in
local storage.  An error would *NOT* be raised if there was not an image in
the registry or the registry was down as long as there was a copy in the local
storage.  An error would be raised if the image could not be retrieved from
both the registry and local storage.  This is the PullOption `PullIfNewer`.

I believe this also differs from what Buildah does at this time but I'm too
beat to chase that down at the moment.

Personally I'd like to use the `PullIfNewer` for at least `--pull` and
`--pull=true` so that you don't get an error if the registry has a network
hiccup and the image is already stored locally.  But this differs from Docker.

I'd like to post scrum about this at our next stand up to make sure we're
all on the same page about the ramifications of this change.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-10-31 20:11:00 -04:00
OpenShift Merge Robot e5227b9d75
Merge pull request #8201 from QiWang19/search-limit
Remove search limit since pagination support
2020-10-30 20:34:28 +01:00
Qi Wang cab33cfbf6 Remove search limit since pagination support
Remove the search limit check since the c/image v5.6.0 supports pagination and can give result over 100 entries.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-30 11:00:40 -04:00
Chris Evich 611c0cb0e0
[CI:DOCS] Fix broken CI readme links
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-30 10:32:17 -04:00
Valentin Rothberg 65a618886e new "image" mount type
Add a new "image" mount type to `--mount`.  The source of the mount is
the name or ID of an image.  The destination is the path inside the
container.  Image mounts further support an optional `rw,readwrite`
parameter which if set to "true" will yield the mount writable inside
the container.  Note that no changes are propagated to the image mount
on the host (which in any case is read only).

Mounts are overlay mounts.  To support read-only overlay mounts, vendor
a non-release version of Buildah.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-10-29 15:06:22 +01:00
OpenShift Merge Robot 7149a7cb39
Merge pull request #8102 from ashley-cui/inspect
Add pod, volume, network to inspect package
2020-10-27 17:04:44 -04:00
Ashley Cui 61deec451f Add pod, volume, network to inspect package
podman inspect only had the capabilities to inspect containers and images. if a user wanted to inspect a pod, volume, or network, they would have to use `podman network inspect`, `podman pod inspect` etc. Docker's cli allowed users to inspect both volumes and networks using regular inspect, so this commit gives the user the functionality

If the inspect type is not specified using --type, the order of inspection is:

containers
images
volumes
networks
pods

meaning if container that has the same name as an image, podman inspect would return the container inspect.

To avoid duplicate code, podman network inspect and podman volume inspect now use the inspect package as well. Podman pod inspect does not because podman pod inspect returns a single json object while podman inspect can return multiple)

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-10-27 14:42:54 -04:00
OpenShift Merge Robot 95f3ec7b08
Merge pull request #8133 from xordspar0/cpu-limit-details
[CI:DOCS] Add more details about how CPU limits work
2020-10-27 13:26:53 -04:00
Jordan Christiansen f393d32e96 Document how to enable CPU limit delegation
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-27 10:05:43 -05:00
Jordan Christiansen fa73b929e0 Add more details about how CPU limits work
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-27 09:32:41 -05:00
baude c593e49701 filter events by labels
adding the ability to filter evens by the container labels.  this requires that container labels be added to the events data being recorded and subsequently read.

Signed-off-by: baude <bbaude@redhat.com>
2020-10-23 12:07:34 -05:00
Daniel J Walsh 15345ce4c3
podman create doesn't support creating detached containers
Detached containers and detach keys are only created with the podman run, i
exec, and start commands.  We do not store the detach key sequence or the
detach flags in the database, nor does Docker. The current code was ignoreing
these fields but documenting that they can be used.

Fix podman create man page and --help output to no longer indicate that
--detach and --detach-keys works.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-21 21:00:50 -04:00
OpenShift Merge Robot a1b942ff40
Merge pull request #8034 from rhatdan/options
Switch help messages from using [flags] to [options]
2020-10-21 12:59:42 -04:00
Daniel J Walsh 980b1e87d4
Switch use of Flags to Options
Want to have man pages match commands, since we have lots of printed
man pages with using Options, we will change the command line to use
Options in --help.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-21 08:37:57 -04:00
Daniel J Walsh 3f265e91f4
Fix handling and documentation of podman wait --interval
In older versions of podman, we supported decimal numbers defaulting
to microseconds.  This PR fixes to allow users to continue to specify
only digits.

Also cleaned up documentation to fully describe what input for --interval flag.

Finally improved testing on podman wait to actually make sure the command succeeded.
Fixed tests to work on podman-remote.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-21 06:25:36 -04:00
Daniel J Walsh 3d2ad0f97a
--tls-verify and --authfile should work for all remote commands
These options are now fully supported in the remote API and should no
longer be hidden and/or documented as non supported.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-19 05:55:11 -04:00
OpenShift Merge Robot 7ffcab0854
Merge pull request #7908 from rhatdan/diff
fix podman container exists and diff for storage containers
2020-10-19 02:49:27 -04:00
Jordan Christiansen 88bc133dac Make man page headings more consistent
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-16 15:06:33 -05:00
Jordan Christiansen 579a10157d Fix podman-run man page heading
Sharing IPC is meant to be an example under the Examples heading, not a
new section.

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-15 09:51:25 -05:00
Daniel J Walsh db23e12611
Add support for external container
External containers are containers created outside of Podman.
For example Buildah and CRI-O Containers.

$ buildah from alpine
alpine-working-container
$ buildah run alpine-working-container touch /test
$ podman container exists --external alpine-working-container

$ podman container diff alpine-working-container
C /etc
A /test

Added --external flag to refer to external containers, rather then --storage.

Added --external for podman container exists and modified podman ps to use
--external rather then --storage.  It was felt that --storage would confuse
the user into thinking about changing the storage driver or options.

--storage is still supported through the use of aliases.

Finally podman contianer diff, does not require the --external flag, since it
there is little change of users making the mistake, and would just be a pain
for the user to remember the flag.

podman container exists --external is required because it could fool scripts
that rely on the existance of a Podman container, and there is a potential
for a partial deletion of a container, which could mess up existing users.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-15 09:51:31 -04:00
Daniel J Walsh 22c8270135
fix podman container exists and diff for storage containers
Current these commands only check if a container exists in libpod. With
this fix, the commands will also check if they are in containers/storage.

This allows users to look at differences within a buildah or CRI-O container.

Currently buildah diff does not exists, so this helps out in that situation
as well as in CRI-O since the cri does not implement a diff command.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-15 09:51:15 -04:00
Ashley Cui 8f603a76f6 Restore --format: stats & pod ps
Restore formatting for stats
Fix formatting for pod ps

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-10-13 09:08:13 -04:00
OpenShift Merge Robot 212011f166
Merge pull request #7836 from QiWang19/search-tags
Search repository tags using --list-tags
2020-10-12 07:01:10 -04:00
OpenShift Merge Robot 6f5867bc44
Merge pull request #7977 from stefanrua/fix-doc-link-and-typo
[CI:DOCS] Fix documentation link and typo
2020-10-10 06:53:53 -04:00
Qi Wang 66798e993a Search repository tags using --list-tags
For fix of BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1684263
Add --list-tags to podman search to return a table the repository tags.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-09 11:49:46 -04:00
OpenShift Merge Robot fa01b838a6
Merge pull request #7891 from rhatdan/rm
This PR allows users to remove external containers directly
2020-10-09 10:55:15 -04:00
Daniel J Walsh fea78d5530
This PR allows users to remove external containers directly
Currenly if a user specifies the name or ID of an external storage
container, we report an error to them.

buildah from scratch
working-container-2
podman rm working-container-2
Error: no container with name or ID working-container-2 found: no such container

Since the user specified the correct name and the container is in storage we
force them to specify --storage to remove it. This is a bad experience for the
user.

This change will just remove the container from storage.  If the container
is known by libpod, it will remove the container from libpod as well.

The podman rm --storage option has been deprecated, and removed from docs.

Also cleaned documented options that are not available to podman-remote.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-09 06:06:08 -04:00
OpenShift Merge Robot 953e16f31a
Merge pull request #7910 from EduardoVega/7567-podman-configmaps
Enable k8s configmaps as flags for play kube
2020-10-09 06:01:50 -04:00
stefanrua b115e3efbe Fix documentation link and typo
Signed-off-by: Stefan Rua <stefan.rua@iki.fi>
2020-10-09 12:58:16 +03:00
Eduardo Vega 39dde9bcb7 Enable k8s configmaps as flags for play kube
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2020-10-07 08:54:24 -06:00
Daniel J Walsh ccc5bc167f
Attempt to turn on some more remote tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-07 10:19:08 -04:00
Daniel J Walsh 348f2df0c0
Support max_size logoptions
Docker supports log-opt max_size and so does conmon (ALthough poorly).
Adding support for this allows users to at least make sure their containers
logs do not become a DOS vector.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-05 17:51:45 -04:00
OpenShift Merge Robot 01c7ae6407
Merge pull request #7856 from rhatdan/root
podman-remote does not support most of the global flags
2020-10-02 16:37:43 -04:00
Daniel J Walsh b3f17936aa
podman-remote does not support most of the global flags
podman-remote --help is showing a bunch of global flags that it
does not support

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-02 06:32:17 -04:00
Giuseppe Scrivano 4f7da3274b
spec: open fuse with --device .*/fuse
If the container uses the /dev/fuse device, attempt to load the fuse
kernel module first so that nested containers can use it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1872240

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-10-02 10:12:58 +02:00
Daniel J Walsh 996fe49aa7
Update rootless_tutorial.md
add clarifications in persistently setting unprivileged ping permissions
Signed-off-by: fuzxi <opuspam@posteo.de>

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-01 09:13:39 -04:00
Daniel J Walsh 22474095ab
Fix handling of remove of bogus volumes, networks and Pods
In podman containers rm and podman images rm, the commands
exit with error code 1 if the object does not exists.

This PR implements similar functionality to volumes, networks, and Pods.

Similarly if volumes or Networks are in use by other containers, and return
exit code 2.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 15:52:43 -04:00
OpenShift Merge Robot 63f0bb93f8
Merge pull request #7783 from ashley-cui/slirp
Add support for slirp network for pods
2020-09-29 15:34:37 +00:00
Ashley Cui b6176d8987 Add support for slirp network for pods
flag --network=slirp4netns[options] for root and rootless pods

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-09-25 21:34:23 -04:00
Valentin Rothberg 1f66a827e8 remote load: check if input is directory
The remote client does not support loading directories yet.  To prevent
confusing error messages and to make the behaviour more explicit, check
if the input points to a directory and throw an error if needed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-24 14:40:54 +02:00
Paul Holzinger 44d7270a34 Fix incorrect parsing of create/run --volumes-from
Add a bunch of tests to ensure that --volumes-from
works as expected.

Also align the podman create and run man page.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-20 22:49:09 +02:00
Qi Wang 9258dfca79 fix a typo of login.1.md
fix a typo of login.1.md and link containers-registries.conf(5).

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-09-17 16:45:13 -04:00
OpenShift Merge Robot 46280d6aba
Merge pull request #7620 from rhatdan/DOCKER_HOST
Document the connection path for podman --remote
2020-09-15 19:54:47 +02:00
Paul Holzinger 685ef847dd podman wait accept args > 1
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-15 00:02:45 +02:00
Daniel J Walsh 48927f186d
Document the connection path for podman --remote
Issue: GH-7010
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-14 17:06:24 -04:00
Daniel J Walsh 08cc87636e
Vendor in containers/buildah 1.16.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 13:37:37 -04:00
OpenShift Merge Robot d7db1da789
Merge pull request #7600 from rhatdan/codespell
Fix up errors found by codespell
2020-09-11 11:30:05 -04:00
OpenShift Merge Robot 881f2dfe92
Merge pull request #7403 from QiWang19/runtime-flag
Add global options --runtime-flags
2020-09-11 11:00:11 -04:00
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
Qi Wang 8467cd3d2e Add auth.json(5) link to login/logout docs
Add auth.json(5) link to login/logout docs. Provide more details about the usage of auth.json by podman-login.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-09-10 14:50:19 -04:00
OpenShift Merge Robot fc70360a3b
Merge pull request #7576 from openSUSE/manifest-add-extend-flags
Extend the flags of the `manifest add` command
2020-09-10 12:51:21 -04:00
OpenShift Merge Robot aadf96a742
Merge pull request #7566 from ashley-cui/remotdocs
[CI:DOCS] Update remote tutorials
2020-09-10 11:37:33 -04:00
OpenShift Merge Robot 49cb0edd65
Merge pull request #7290 from rhatdan/external
Show c/storage (Buildah/CRI-O) containers in ps
2020-09-09 12:15:46 -04:00
Flavio Castelli 4caa8b31d7
Update man page of manifest add
Ensure all the flags are covered by the man page.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2020-09-09 12:44:15 +02:00
Daniel J Walsh 581afbb86f
Show c/storage (Buildah/CRI-O) containers in ps
The `podman ps --all` command will now show containers that
are under the control of other c/storage container systems and
the new `ps --storage` option will show only containers that are
in c/storage but are not controlled by libpod.

In the below examples, the '*working-container' entries were created
by Buildah.

```
podman ps -a
CONTAINER ID  IMAGE                             COMMAND  CREATED       STATUS                   PORTS  NAMES
9257ef8c786c  docker.io/library/busybox:latest  ls /etc  8 hours ago   Exited (0) 8 hours ago          gifted_jang
d302c81856da  docker.io/library/busybox:latest  buildah  30 hours ago  storage                         busybox-working-container
7a5a7b099d33  localhost/tom:latest              ls -alF  30 hours ago  Exited (0) 30 hours ago         hopeful_hellman
01d601fca090  localhost/tom:latest              ls -alf  30 hours ago  Exited (1) 30 hours ago         determined_panini
ee58f429ff26  localhost/tom:latest              buildah  33 hours ago  storage                         alpine-working-container

podman ps --external
CONTAINER ID  IMAGE                             COMMAND  CREATED       STATUS    PORTS  NAMES
d302c81856da  docker.io/library/busybox:latest  buildah  30 hours ago  external         busybox-working-container
ee58f429ff26  localhost/tom:latest              buildah  33 hours ago  external         alpine-working-container

```
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-09 06:10:02 -04:00
Ashley Cui 98ae84cc9e [CI:DOCS] Update remote tutorials
update remote tutorial
update mac/windows tutorial
move varlink tutorial

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-09-08 17:30:54 -04:00
Valentin Rothberg 7fea46752c support multi-image (docker) archives
Support loading and saving tarballs with more than one image.
Add a new `/libpod/images/export` endpoint to the rest API to
allow for exporting/saving multiple images into an archive.

Note that a non-release version of containers/image is vendored.
A release version must be vendored before cutting a new Podman
release.  We force the containers/image version via a replace in
the go.mod file; this way go won't try to match the versions.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-08 08:47:19 +02:00
Qi Wang 6b0864434a Add global options --runtime-flags
Add global options --runtime-flags for setting options to container runtime.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-09-04 15:04:36 -04:00
Paul Holzinger ebfea2f4f8 APIv2 add generate systemd endpoint
Add support for generating systemd units
via the api and podman-remote.

Change the GenerateSystemdReport type to return the
units as map[string]string with the unit name as key.

Add `--format` flag to `podman generate systemd`
to allow the output to be formatted as json.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-02 22:06:19 +02:00
Daniel J Walsh 3c6603a2f8
Add support for variant when pulling images
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-28 09:36:11 -04:00
Daniel J Walsh f49b98c610
Document override-arch and override-os
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-28 09:35:13 -04:00
Paul Holzinger 7dce7a64ca [CI:DOCS] Update podman-remote docs
Add support for multi level subcommands.
e.g. podman system connection.

Update the flags and add note for containers.conf.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-27 20:03:06 +02:00
Daniel J Walsh 7d3cadcc54
Merge pull request #7457 from ashley-cui/macdocs
[CI:DOCS] Making docs build on mac
2020-08-27 08:11:33 -04:00
Ashley Cui 7e004755bf [CI:DOCS] Making docs build on mac
sed syntax on mac is different

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-08-26 09:58:23 -04:00
OpenShift Merge Robot 3a9d5248ac
Merge pull request #7364 from TomSweeneyRedHat/dev/tsweeney/exposeport
Note port publishing needs in pods for create/run
2020-08-26 09:16:06 -04:00
Daniel J Walsh 52b14a2218
Update vendor of buildah to latest code
Fix podman build man pages to match buildah functionality.

Also document .dockerignore formatted files.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-25 08:13:28 -04:00
Giuseppe Scrivano d856210ea8
podman: add option --cgroup-conf
it allows to manually tweak the configuration for cgroup v2.

we will expose some of the options in future as single
options (e.g. the new memory knobs), but for now add the more generic
--cgroup-conf mechanism for maximum control on the cgroup
configuration.

OCI specs change: https://github.com/opencontainers/runtime-spec/pull/1040

Requires: https://github.com/containers/crun/pull/459

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-08-21 19:06:05 +02:00
Lokesh Mandvekar 36b1ed0a26 [CI:DOCS] Include Go bindings tutorial
Include the Go bindings blog post as a tutorial

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-08-19 21:22:53 -04:00
Daniel J Walsh eb9e8fc558 Add support for --connection
* override --url and/or --identity fields from containers.conf
* --connection flag has higher precedence than ActiveService from
containers.conf. Which is set via podman system connection default
* Add newline to error message printed on stderr
* Added --connection to bash completion and documentation
* Updated bindings to query server in case of no path or /

Closes #jira-991
Fixes #7276

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Squashed commits to work around CI issue
2020-08-19 08:37:44 -07:00
TomSweeneyRedHat 65b8bf795b Note port publishing needs in pods for create/run
Add notes to the podman-create and podman-run man pages
to note that ports do not need to be published and should not
be, for containers that will be part of a pod.

Addresses: #6769

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-08-19 09:21:31 -04:00
Paul Holzinger 02e0d4ab38 fix podman create/run UTS NS docs
Add better error message when using `--pod` and `--hostname`.
Improve the docs to better explain the uts hostname relation.
Add more valid options for the `--uts` flag.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-18 18:00:49 +02:00
Sascha Grunert ba9f18e2b8
Use bash binary from env instead of /bin/bash for scripts
It's not possible to run any of the scripts on distributions which do
have `bash` not in `/bin`. This is being fixed by using `/usr/bin/env
bash` instead.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-17 10:42:23 +02:00
Giuseppe Scrivano feff414ae1
run, create: add new security-opt proc-opts
it allows to customize the options passed down to the OCI runtime for
setting up the /proc mount.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-08-12 23:46:38 +02:00
Adis Hamzić 95e73c65ae Add support for setting the CIDR when using slirp4netns
This adds support for the --cidr parameter that is supported
by slirp4netns since v0.3.0. This allows the user to change
the ip range that is used for the network inside the container.

Signed-off-by: Adis Hamzić <adis@hamzadis.com>
2020-08-12 17:30:13 +02:00
OpenShift Merge Robot d31a881587
Merge pull request #7291 from edsantiago/man_page_subcommand_sort
[CI:DOCS] cross-reference .rst files
2020-08-11 14:58:10 -04:00
Ed Santiago 8e11a825e1 Cross-reference *.rst files too
There are a bunch of *.rst files in docs/source, linking sometimes
to man pages and sometimes to other .rst files. These files each
have entries of the following form:

   :doc:`foo <link-to-foo>` Description of foo

...for all podman sub and sub-subcommands 'foo'.

Read all .rst files and make sure that:

  - all entries in a given file are in alphabetical order
  - all link-to-foo targets point to existing doc files
  - every subcommand known by 'podman help' has a corresponding
    doc entry in a .rst file

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-08-11 08:03:37 -06:00
Christian Heimes 1ae8d2f096 Enable systemd mode for /usr/local/sbin/init
Podman 1.6.2 changed systemd mode auto-detection from commands ending in
``init`` to hard-coded paths ``/sbin/init`` and ``/usr/sbin/init``. This
broke FreeIPA container. ``podman run`` and ``podman create`` now
activate systemd mode when the command is ``/usr/local/sbin/init``.

Fixes: https://github.com/containers/podman/issues/7287
Signed-off-by: Christian Heimes <cheimes@redhat.com>
2020-08-11 11:41:14 +02:00
Daniel J Walsh 8f346c30c3
Add missing pages for docs.podman.io
Lots of references to man pages missing from docs.podman.io

Also fix sort order in man pages and other documents.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-10 19:35:23 -04:00
OpenShift Merge Robot 95e2e15a3f
Merge pull request #7216 from 5eraph/master
support outbound-addr
2020-08-09 07:45:20 -04:00
TomSweeneyRedHat 5aaf6788f9 [CI:DOCS] BZ1860126 - Fix userns defaults in run man page
Addresses the multiple "default" userns values found
in the podman-run(1) man page:  http://docs.podman.io/en/latest/markdown/podman-run.1.html.

This in response to: https://bugzilla.redhat.com/show_bug.cgi?id=1860126
which this PR wil fix.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-08-07 15:42:13 -04:00
5eraph e6a5a56aa6 changes to support outbound-addr
Fixes #6064

Signed-off-by: Bohumil Cervenka <5eraph@protonmail.com>
2020-08-07 19:34:45 +02:00
OpenShift Merge Robot 919e5d4d6e
Merge pull request #7209 from giuseppe/support-mount-devpts
podman: support --mount type=devpts
2020-08-04 12:14:47 +02:00
Giuseppe Scrivano 976e364a97
podman: support --mount type=devpts
Allow to create a devpts mount.

This is useful for containers that bind mount /dev/ from the host but
at the same time want to create a terminal.

It can be used as:

podman run -v /dev:/dev --mount type=devpts,target=/dev/pts ...

Closes: https://github.com/containers/podman/issues/6804

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-08-03 23:05:10 +02:00
Matthew Heon 7bedff9635 Do not set host IP on ports when 0.0.0.0 requested
Docker and CNI have very different ideas of what 0.0.0.0 means.
Docker takes it to be 0.0.0.0/0 - that is, bind to every IPv4
address on the host. CNI (and, thus, root Podman) take it to mean
the literal IP 0.0.0.0. Instead, CNI interprets the empty string
("") as "bind to all IPs".

We could ask CNI to change, but given this is established
behavior, that's unlikely. Instead, let's just catch 0.0.0.0 and
turn it into "" when we parse ports.

Fixes #7014

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-03 14:32:16 -04:00
Paul Holzinger c90ad68fa1 Change recommended systemd unit path for root.
`/usr/lib/systemd/system` should only be used by the package manager
administrators should use: `/etc/systemd/system` or
`/usr/local/lib/systemd/system`

see: man systemd.unit

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-01 14:55:48 +02:00
OpenShift Merge Robot 7f0c0941e8
Merge pull request #6851 from rhatdan/mount
Add podman image mount
2020-07-29 04:30:01 -04:00
Ed Santiago 409d07a181 System tests: add environment, volume tests
Tests for #7094, in which symlinks in a volume would
cause chown errors and nonrunnable containers.

Tests for environment variable precedence, now
include --env-host and proxy settings

Fix a bug caught by covscan in helpers.t ('source'
path would fail if path included spaces).

Fix podman-run man page: it was incorrect in stating
precedence between in-image environment and --env-host.

Fixes: #7099

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-07-28 09:22:22 -06:00
Daniel J Walsh 6979d140f1
Add podman image mount
There are many use cases where you want to just mount an image
without creating a container on it. For example you might want
to just examine the content in an image after you pull it for
security analysys.  Or you might want to just use the executables
on the image without running it in a container.

The image is mounted readonly since we do not want people changing
images.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 10:27:44 -04:00
OpenShift Merge Robot 288ebec6e7
Merge pull request #6909 from rhatdan/podman
Switch all references to github.com/containers/libpod -> podman
2020-07-28 10:12:55 -04:00
OpenShift Merge Robot 14f8085016
Merge pull request #7079 from rhatdan/tuturial
update configuration for rootless podman
2020-07-28 14:58:52 +02: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
OpenShift Merge Robot 91c92d10fc
Merge pull request #7085 from rhatdan/cmount
Cleanup handling of podman mount/unmount
2020-07-28 14:03:22 +02:00
Daniel J Walsh 8f7ed50cb2
Cleanup handling of podman mount/unmount
We should default to the user name unmount rather then the internal
name of umount.

Also User namespace was not being handled correctly. We want to inform
the user that if they do a mount when in rootless mode that they have
to be first in the podman unshare state.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-27 16:53:02 -04:00
Melykuti 909f989c41 Corrects typo in the name of the Linux package shadow-utils.
Signed-off-by: Bence Mélykúti <bence.melykuti@gmail.com>
2020-07-27 21:17:30 +02:00
Daniel J Walsh 7d0a5fc0da
update configuration for rootless podman
I updated the configuration part of the tutorial on rootless podman. I added the
 order in which configuration files are read in and a hint, how users can create
 default configuration in the home directories.

Closes #6777

Signed-off-by: Niklas Netter <niknett@gmail.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-25 05:41:31 -04:00
OpenShift Merge Robot 22b1483902
Merge pull request #6938 from jwhonce/wip/n-connection
Refactor podman system connection
2020-07-24 17:01:40 +02:00
OpenShift Merge Robot d9244761e4
Merge pull request #7041 from jkonowitch/reset-docs
Improve Docs for `podman system reset`
2020-07-24 11:00:50 +02:00
Erik Sjölund c10d5a5ebe
Fix exit code example in podman-run.1.md
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2020-07-23 20:51:37 +02:00
Jeffrey Konowitch 65bcc2ba5f Update system.rst
Signed-off-by: Jeffrey Konowitch <jeff.konowitch@onepeloton.com>

Update podman-system-reset.1.md

Signed-off-by: Jeffrey Konowitch <jeff.konowitch@onepeloton.com>

PR feedback

Signed-off-by: Jeffrey Konowitch <jeff.konowitch@onepeloton.com>

remove errant punctuation

Signed-off-by: Jeffrey Konowitch <jeff.konowitch@onepeloton.com>
2020-07-23 12:38:24 -04:00
Luke Mitchell 9db4c031ef
Fix typos on documentation 'What is Podman' page
- Added a space between 'containers' and 'this' in the opening paragraph
- comming -> coming
- 'looking our' -> 'looking at our'

Signed-off-by: Luke Mitchell <luke@lpmitchell.com>
2020-07-23 15:13:05 +01:00