Commit graph

1456 commits

Author SHA1 Message Date
Valentin Rothberg 379df7f2c4 docs: generate systemd: XDG_RUNTIME_DIR
A conversation on the customer portal suggests that to add an extra note
about the requirement of XDG_RUNTIME_DIR to be set.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-19 09:15:48 +02:00
OpenShift Merge Robot 9a9118b831
Merge pull request #10366 from ashley-cui/secretoptions
Support uid,gid,mode options for secrets
2021-05-17 16:24:20 -04:00
Ashley Cui cf30f160ad Support uid,gid,mode options for secrets
Support UID, GID, Mode options for mount type secrets. Also, change
default secret permissions to 444 so all users can read secret.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-05-17 14:35:55 -04:00
OpenShift Merge Robot 0a3444613e
Merge pull request #10328 from Luap99/completions
Several shell completion fixes
2021-05-17 14:11:20 -04:00
Paul Holzinger 0d811b2339 Several shell completion fixes
- fix network filters
- add prune filters
- pod create --share support comma separated namespaces

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-17 15:56:11 +02:00
Valentin Rothberg 2a43fcf786 image prune: remove unused images only with --all
Fix a regression in `podman image prune` where unused images were
accidentally removed even when `--all=false`.  Extend and partially
rewrite the e2e tests to make sure we're not regressing again in the
future.

Fixing the aforementioned issue revealed another issue in the default
prune filter.  While prune should remove all "dangling" images (i.e.,
those without tag), it removed only "intermediate" ones; dangling images
without children.  Remove the mistaken comment from the libimage
migration.

Also clarify the help message and man page.

Fixes: #10350
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-17 13:52:03 +02:00
Paul Holzinger 460182dc5d network tutorial: update with rootless cni changes
Starting with podman v3.2 rootless cni will work without the
rootless-cni-infra container. Update the network tutorial to reflect the
latest changes and mention that the infra container can be removed.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-15 22:46:53 +02:00
TomSweeneyRedHat 757ed8fd02 [CI:DOCS] Update first line in intro page
Remove the word `consumption` and give a better description for the
first line of the introduction page.

Fixes: #10325

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-05-14 17:08:35 -04:00
OpenShift Merge Robot fabaa25667
Merge pull request #10254 from jmguzik/prune-filter-cli
Add support for cli network prune --filter flag
2021-05-14 13:12:40 -04:00
Jakub Guzik 5e6405334c Add support for cli network prune --filter flag
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-05-12 09:05:06 +02:00
Jhon Honce 8ad40a85d5 Add host.serviceIsRemote to podman info results
Developers asked for a deterministic field to verify if podman is
running via API or linked directly to libpod library.

$ podman info --format '{{.Host.ServiceIsRemote}}'
false
$ podman-remote info --format '{{.Host.ServiceIsRemote}}'
true
$ podman --remote info --format '{{.Host.ServiceIsRemote}}'
true

* docs/conf.py formatted via black

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-05-10 14:13:15 -07:00
Paul Holzinger 30e731ecc8 Revert escaped double dash man page flag syntax
Commit 800a2e2d35 introduced a way to disable the conversion of `--`into
an en dash on docs.podman.io, so the ugly workaround of escaping the
dashes is no longer necessary.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-07 18:30:00 +02:00
OpenShift Merge Robot 5616887f62
Merge pull request #10249 from rhatdan/man1
[CI:DOCS] Add documentation on short-names
2021-05-07 10:23:26 -04:00
OpenShift Merge Robot b533fcb12e
Merge pull request #10255 from rcowsill/no-dash-conv
[CI:DOCS] Stop conversion of `--` into en dash
2021-05-07 09:41:27 -04:00
Daniel J Walsh bdbce9bcb1
Add documentation on short-names
Once we settle on the wording for short-names in podman-pull, I will
add the same section to all of the podman commands that use pull.

Also ran through all man pages with a spell checker.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-07 09:00:35 -04:00
OpenShift Merge Robot 0c411278ce
Merge pull request #10202 from EduardoVega/9763-kube-auto-update
Add support to preserve auto-update labels in play / generate kube
2021-05-07 05:36:26 -04:00
OpenShift Merge Robot 141ba94f97
Merge pull request #10221 from ashley-cui/envsec
Add support for environment variable secrets
2021-05-07 05:34:26 -04:00
Eduardo Vega 72f4f389f0 Adds support to preserve auto update labels in generate and play kube
In the case of generate kube the auto-update labels will be converted into kube annotations and for play kube they will be converted back to labels since that's what podman understands

Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2021-05-06 21:21:43 -06:00
Rob Cowsill 800a2e2d35
[CI:DOCS] Stop conversion of -- into en dash
In the documentation source `--` is only used in long option names or
console output. Currently any unescaped `--` that's not in a code
block/inline gets converted into a single "en dash". This is confusing
to the reader because long options start with two dashes, not one.

This switches off the dash transformation in Sphinx. Quotation marks,
apostrophes and ellipses are still transformed as before.

It also switches off all smart transforms in the podman-remote windows
documentation build. This matches the Linux man page build, which
doesn't use smart transforms.

Signed-off-by: Rob Cowsill <42620235+rcowsill@users.noreply.github.com>
2021-05-06 23:14:49 +01:00
OpenShift Merge Robot 034470e5be
Merge pull request #9689 from boaz0/boaz-1
add restart-policy to container filters & --filter to podman start
2021-05-06 14:50:26 -04:00
Ashley Cui 2634cb234f Add support for environment variable secrets
Env var secrets are env vars that are set inside the container but not
commited to and image. Also support reading from env var when creating a
secret.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-05-06 14:00:57 -04:00
Daniel J Walsh caa8c622b3
Add containers.conf information for changing defaults
We probably should put a whole bunch of other documentation in man
pages about containers.conf, but let's settle on this description
before we go add other docs.

Helps with: https://github.com/containers/podman/issues/2669

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-06 10:43:36 -04:00
Sebastian Boerakker c7178958ca Fix wrong macvlan PNG in networking doc.
Signed-off-by: Sebastian Boerakker <sebboer@protonmail.com>
2021-05-06 13:54:20 +02:00
Boaz Shuster efdc7d8465 Add restart-policy to container filters & --filter to podman start
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-05-06 14:35:15 +03:00
Daniel J Walsh 0d1ebc180e
codespell cleanup
[NO TESTS NEEDED] This is just running codespell on podman

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-05 15:50:59 -04:00
OpenShift Merge Robot 404bc2684e
Merge pull request #10185 from rhatdan/volume
Add filepath glob support to --security-opt unmask
2021-05-05 15:38:11 -04:00
OpenShift Merge Robot 120e1b78ef
Merge pull request #10208 from Luap99/play-kube-mac
add --mac-address to podman play kube
2021-05-05 10:10:16 -04:00
Valentin Rothberg 0f7d54b026 migrate Podman to containers/common/libimage
Migrate the Podman code base over to `common/libimage` which replaces
`libpod/image` and a lot of glue code entirely.

Note that I tried to leave bread crumbs for changed tests.

Miscellaneous changes:

 * Some errors yield different messages which required to alter some
   tests.

 * I fixed some pre-existing issues in the code.  Others were marked as
   `//TODO`s to prevent the PR from exploding.

 * The `NamesHistory` of an image is returned as is from the storage.
   Previously, we did some filtering which I think is undesirable.
   Instead we should return the data as stored in the storage.

 * Touched handlers use the ABI interfaces where possible.

 * Local image resolution: previously Podman would match "foo" on
   "myfoo".  This behaviour has been changed and Podman will now
   only match on repository boundaries such that "foo" would match
   "my/foo" but not "myfoo".  I consider the old behaviour to be a
   bug, at the very least an exotic corner case.

 * Futhermore, "foo:none" does *not* resolve to a local image "foo"
   without tag anymore.  It's a hill I am (almost) willing to die on.

 * `image prune` prints the IDs of pruned images.  Previously, in some
   cases, the names were printed instead.  The API clearly states ID,
   so we should stick to it.

 * Compat endpoint image removal with _force_ deletes the entire not
   only the specified tag.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-05 11:30:12 +02:00
Daniel J Walsh 4fd1965ab4
Add filepath glob support to --security-opt unmask
Want to allow users to specify --security-opt unmask=/proc/*.
This allows us to run podman within podman more securely, then
specifing umask=all, also gives the user more flexibilty.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-04 14:40:43 -04:00
Paul Holzinger fb7d16c7a8 add --mac-address to podman play kube
Add a new --mac-address flag to podman play kube. This is used to specify
a static MAC address which should be used for the pod. This option can be
specified several times because play kube can create more than one pod.

Fixes #9731

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-04 20:14:13 +02:00
Boaz Shuster a726a3d79c Add --all to podman start
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
Co-authored-by: Ed Santiago <santiago@redhat.com>
2021-05-03 22:17:06 +03:00
Rob Cowsill b4bbc5210b
[CI:DOCS] Add titles to remote docs (windows)
Previously the podman-remote windows docs had no HTML titles

This gives them the same titles as the equivalent Sphinx HTML pages

Signed-off-by: Rob Cowsill <42620235+rcowsill@users.noreply.github.com>
2021-04-29 22:18:13 +01:00
OpenShift Merge Robot 4d2ba323f2
Merge pull request #10063 from ParkerVR/autoupdate-local
Autoupdate Local
2021-04-29 13:37:50 -04:00
OpenShift Merge Robot c01b1cbfcd
Merge pull request #10170 from ashley-cui/machineone
[NO TESTS NEEDED] Check if another VM is running on machine start
2021-04-29 09:52:14 -04:00
Parker Van Roy caf19efdab TODO complete
changed struct to policyMapper
change "image" to "registry" in multiple locations

Updated documentation with registry alias & autoupdate local

Added relevant test

Signed-off-by: Parker Van Roy <pvanroy@redhat.com>
2021-04-29 02:40:11 -04:00
Ashley Cui 53057d5c20 Check if another VM is running on machine start
Only one VM can be up at a time. If another VM is running, or the current VM is running, error out on a podman machine start

[NO TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-04-28 15:09:10 -04:00
Rob Cowsill e18ef90566
[CI:DOCS] Improve titles of command HTML pages
When building Sphinx HTML docs, preprocess markdown files and convert
pandoc-style title lines into recommonmark eval_rst blocks

This gives command HTML pages the same title as the equivalent manpage

Fixes: containers/podman.io#385

Signed-off-by: Rob Cowsill <42620235+rcowsill@users.noreply.github.com>
2021-04-28 16:21:24 +01:00
OpenShift Merge Robot 5dc9faf624
Merge pull request #10134 from rhatdan/conmon
[CI:DOCS] Add more documentation on conmon
2021-04-27 16:57:31 -04:00
OpenShift Merge Robot f613a2a8d5
Merge pull request #10119 from rhatdan/timeout
Add podman run --timeout option
2021-04-27 16:47:32 -04:00
Daniel J Walsh 63fd3a3fca
Add more documentation on conmon
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-27 11:57:19 -04:00
Erik Sjölund a010bb912d
[CI:DOCS] Fix Markdown layout bugs
* Add missing backticks to mark the end
  of the code block.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-25 14:39:54 +02:00
Daniel J Walsh 3538815c5b
Add podman run --timeout option
This option allows users to specify the maximum amount of time to run
before conmon sends the kill signal to the container.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-23 11:18:05 -04:00
OpenShift Merge Robot 21c77846e4
Merge pull request #9495 from rhatdan/groups
Add '--group-add keep-groups': supplementary groups into container
2021-04-22 09:29:28 -04:00
OpenShift Merge Robot 382c0ac133
Merge pull request #10103 from pipern/patch-1
[CI:DOCS] Typo fix to usage text of --compress option
2021-04-21 15:42:47 -04:00
Daniel J Walsh e356160f41
Add --group-add keep-groups: suplimentary groups into container
Currently we have rootless users who want to leak their groups access
into containers, but this group access is only able to be pushed in by
a hard to find OCI Runtime annotation.  This PR makes this option a lot
more visable and hides the complexity within the podman client.

This option is only really needed for local rootless users. It makes
no sense for remote clients, and probably makes little sense for
rootfull containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-21 13:28:36 -04:00
Daniel J Walsh 9c8277247d
Fixes from make codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-21 13:16:33 -04:00
Nick Piper 85937044cd
Typo fix to usage text of --compress option
Correction of `--format-docker-dir` in to `--format=docker-dir`

Signed-off-by: Nick Piper <nick.piper@cgi.com>
2021-04-21 17:26:50 +01:00
Daniel J Walsh 8ebeadc3c6
Add --noheading flag to all list commands
Currently we have only podman images list --noheading.
This PR Adds this option to volumes, containers, pods, networks,
machines, and secrets.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-21 05:22:29 -04:00
Erik Sjölund c1f117e526
[CI:DOCS] Fix Markdown table layout bugs
* Fix the Markdown table layout bugs that manifest themselves in
  corrupted tables in the generated HTML pages
  http://docs.podman.io/en/latest/markdown/podman-create.1.html
  http://docs.podman.io/en/latest/markdown/podman-run.1.html

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-20 22:18:44 +02:00
Erik Sjölund 6e5bb9d1d3
[CI:DOCS] Rewrite --uidmap doc in podman-create.1.md and podman-run.1.md
Introduce the concept of "intermediate UID" to explain
how --uidmap works when running rootless.

Add Markdown tables to show examples of how UIDs are mapped.

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-20 20:28:11 +02:00
TomSweeneyRedHat 7f6bcc2008 [CI:DOCS] Add missing dash to verbose option
The `--verbose` option in the import man page was
missing a dash, this corrects it.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-04-19 16:24:52 -04:00
OpenShift Merge Robot a94360a3f7
Merge pull request #10041 from chenk008/add_pidfile_flag
Add flag "--pidfile" for podman create/run
2021-04-19 16:22:05 -04:00
TomSweeneyRedHat 53a1edc3db [CI:DOCS] Fix introduction page typo
Fixes a small typo on the introduction pages.

Fixes: #10042

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-04-17 15:13:16 -04:00
chenkang 022bf589c8
improve document
Signed-off-by: chenkang <kongchen28@gmail.com>
2021-04-17 21:25:11 +08:00
chenkang 80c1dd0651
Modify according to comments
Signed-off-by: chenkang <kongchen28@gmail.com>
2021-04-17 16:08:08 +08:00
Paul Holzinger d7292dbf27 add --ip to podman play kube
Add a new --ip flag to podman play kube. This is used to specify a
static IP address which should be used for the pod. This option can be
specified several times because play kube can create more than one pod.

Fixes #8442

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-16 09:55:03 +02:00
wuhua.ck 8fbe06b8cb add flag "--pidfile" for podman create/run
Signed-off-by: chenkang <kongchen28@gmail.com>
2021-04-16 13:43:14 +08:00
Pablo Correa Gómez 693352c841
Update documentation of podman-run to reflect volume "U" option
The "U" option is accepted by `--volume` in `podman-build`,
but documentation is missing

Signed-off-by: Pablo Correa Gómez <ablocorrea@hotmail.com>
2021-04-14 23:55:07 +02:00
OpenShift Merge Robot 4ee203dde7
Merge pull request #9945 from rhatdan/runlabel
Fix handling of $NAME and $IMAGE in runlabel
2021-04-14 10:47:50 -04:00
Chris Evich b6b0b6e8bd
Overhaul Makefile binary and release worflows
* Incorporate changes from abandoned #9918: Use dedicated `bin`
  sub-directories for `windows` and `darwin` when building
  `podman-remote`.  The linux flavor remains under `bin` as before.

* Fix MacOS Documentation-generation for release-packaging.
  The `install-podman-remote-%-docs` target requires local execution
  of `podman-remote`, but it was assuming GOOS=linux.  Fix this
  by dynamically discovering the local OS/architecture type while
  still permitting cross-building of MacOS binaries under Linux.

* Unify temporary directory/file behavior to use a common template.
  In case of left-over temporary items left in the repository,
  update the `clean` target accordingly to remove them.

* Fix broken podman-remote-static and MacOS release archive targets
  mismatching the `podman-remote-%` target.  Disambiguate this target
  for all platforms by spelling each out in full, instead of using
  a wild-card recipe.

* Fix Windows-installer target to properly recognize existing
  output files and not constantly rebuild every time.

* Include the podman version number in the Windows-installer target
  in case a user downloads multiple releases.

* Include a subdirectory containing the podman version number for
  both `tar.gz` and `zip` targets.  This prevents users clobbering
  existing directories when un-archiving from releases.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-12 10:21:28 -04:00
Daniel J Walsh 8f16742187
Fix handling of $NAME and $IMAGE in runlabel
Fixes: https://github.com/containers/podman/issues/9405

Add system runlabel tests.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-12 08:41:08 -04:00
OpenShift Merge Robot 9d3e310710
Merge pull request #9935 from EduardoVega/5788-kube-volume
Add support for play/generate kube PersistentVolumeClaims and Podman volumes
2021-04-12 12:36:20 +02:00
OpenShift Merge Robot 3b03ff7d1e
Merge pull request #9950 from Luap99/unshare-rootless-cni
podman unshare: add --rootless-cni to join the ns
2021-04-12 12:33:20 +02:00
Anatoli Babenia 0f1af6b37d Fix slashes in socket URLs
Signed-off-by: Anatoli Babenia <anatoli@rainforce.org>
2021-04-12 07:19:12 +03:00
Eduardo Vega 61cb6d61dd Add support for play/generate kube volumes
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2021-04-09 14:01:13 -06:00
Jonathan Wakely 736be87b25 [CI:DOCS] Fix formatting of podman-build man page
An apostrophe as the first character of the line is a formatting request
in troff, so the words "'Containerfile' or 'Dockerfile'" are not
visible when viewing 'man podman-build'.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
2021-04-08 22:50:56 +01:00
Paul Holzinger 0a39ad196c podman unshare: add --rootless-cni to join the ns
Add a new --rootless-cni option to podman unshare to also join the
rootless-cni network namespace. This is useful if you want to connect
to a rootless container via IP address. This is only possible from the
rootless-cni namespace and not from the host namespace. This option also
helps to debug problems in the rootless-cni namespace.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-07 15:54:12 +02:00
OpenShift Merge Robot d83f49ef6b
Merge pull request #9754 from mheon/add_dep
Add --requires flag to podman run/create
2021-04-06 16:16:49 -04:00
Matthew Heon 6acd265306 Add --requires flag to podman run/create
Podman has, for a long time, had an internal concept of
dependency management, used mainly to ensure that pod infra
containers are started before any other container in the pod. We
also have the ability to recursively start these dependencies,
which we use to ensure that `podman start` on a container in a
pod will not fail because the infra container is stopped. We have
not, however, exposed these via the command line until now.

Add a `--requires` flag to `podman run` and `podman create` to
allow users to manually specify dependency containers. These
containers must be running before the container will start. Also,
make recursive starting with `podman start` default so we can
start these containers and their dependencies easily.

Fixes #9250

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-04-06 14:01:31 -04:00
OpenShift Merge Robot 254a5d4c26
Merge pull request #9909 from w4tsn/docs/add-containers-storage-transport
[CI:DOCS] Add transport and destination info to manifest doc
2021-04-05 21:12:15 +02:00
Daniel J Walsh 69ace20535
Allow users to override default storage opts with --storage-opt
We define in the man page that this overrides the default storage
options, but the code was appending to the existing options.

This PR also makes a change to allow users to specify --storage-opt="".
This will turn off all storage options.

https://github.com/containers/podman/issues/9852

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-05 12:48:09 -04:00
Erik Sjölund ace3a3efd0
podman-run.1.md, podman-create.1.md : Adjust Markdown layout for --userns
* Adjust Markdown layout for --userns.
* Make the --userns sections identical for podman-run.1.md and podman-create.1.md

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-03 15:43:04 +02:00
Erik Sjölund cecb7099f5
Fix typos --uidmapping and --gidmapping
* Fix typos --uidmapping and --gidmapping in podman-run.1.md
* Add the corresponding sentence in podman-create.1.md

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-03 14:41:12 +02:00
Alexander Wellbrock ab7a3b2069
Add transport and destination info to manifest doc
Initially I was missing transport information on podman manifest add.
Especially the `containers-storage` transport which references the
local image store. Had a use case where this came in quite handy and it
is not stated anywhere else in the docs. Suppose it does not make sense
for podman pull & push.

I've only added containers-storage and docker transports for
manifest add since I know those work. Maybe others work too.

I then also added the destination section to manifest push as it is done
in podman push & pull. I've added all transports here, but I don't know
if all are supported. Please review.

Signed-off-by: Alexander Wellbrock <a.wellbrock@mailbox.org>
2021-04-03 13:12:34 +02:00
Ashley Cui f8bc391e34 Add ssh connection to root user
When initing a VM, create two add connections - one to user, one to
root.
podman machine remove removes both connections as well.

[NO TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-04-01 13:51:02 -04:00
baude f6438d36f3 Remove --execute from podman machine ssh
The --execute flag ended up serving no purpose.  It was removed and
documentation was updated.

Fixed a panic when no VM name was provided.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-31 12:51:33 -05:00
OpenShift Merge Robot e5f0869561
Merge pull request #9901 from w4tsn/docs/fix-podman-image-unmount-link
[CI:DOCS] Fix unmount doc reference in image.rst
2021-03-31 18:16:59 +02:00
Alexander Wellbrock 6fa1c7e465
Fix unmount doc reference in image.rst
This pointed to the container-unmount doc page. It now points to the
expected podman-image-unmount doc page.

Signed-off-by: Alexander Wellbrock <a.wellbrock@mailbox.org>
2021-03-31 16:00:22 +02:00
OpenShift Merge Robot 2d824d85e1
Merge pull request #9888 from baude/machineign
podman machine init --ignition-path
2021-03-31 15:24:47 +02:00
TomSweeneyRedHat 09f2c01ded [CI:DOCS] Add local html build info to docs/README.md
Rename Readme.md to README.md in the docs directory.   Add
the local build process per @Luap99 in #9856 for the man pages
to preview any changes that are made.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-03-30 18:45:40 -04:00
OpenShift Merge Robot a373e2fdf3
Merge pull request #9885 from ashley-cui/machinels
Add podman machine ls
2021-03-30 22:36:25 +02:00
Ashley Cui ef4e91a59e Add podman machine list
podman machine list lists all virtual machines & indicates the default VM
connection, if it exists. it also can take a --format flag arg as a go
template.

[NO TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-30 14:56:21 -04:00
baude b898b19e45 podman machine init --ignition-path
allow for the user to provide an alternate ignition-file rather than the
auto-generated one.

updated docs to describe ramifications of providing an alterate ignition
file.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-30 09:44:04 -05:00
Daniel J Walsh 5b50fa565f
Document --volume from podman-remote run/create client
[NO TESTS NEEDED] This PR is mainly documentation and some code cleanup.

Also cleanup and consolidate handling of other hanlding of podman-remote
hidden options.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-30 10:05:54 -04:00
OpenShift Merge Robot 08eab3f8f7
Merge pull request #9307 from Luap99/powershell-completion
Add powershell completions
2021-03-29 15:17:44 +00:00
OpenShift Merge Robot 00792f8c95
Merge pull request #9856 from Luap99/fix-longflag
[CI:DOCS] Fix long option format on docs.podman.io
2021-03-29 14:40:44 +00:00
Paul Holzinger 6a78fcaa0a Add powershell completions
Add support for generating powershell completion files. This is especially
useful for people using the podman remote client on windows.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-29 15:00:09 +02:00
Paul Holzinger bc48211924 Fix long option format on docs.podman.io
Escape the two dashes, otherwise they are combined into one long dash.
I tested that this change is safe and still renders correctly on github
and with the man pages.

This commit also contains a small change to make it build locally.
Assuming you have the dependencies installed you can do:
```
cd docs
make html
```
Preview the html files in docs/build/html with
`python -m http.server 8000 --directory build/html`.

Fixes containers/podman.io#373

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-29 14:38:25 +02:00
Valentin Rothberg fe270c7524 man pages: correct seccomp-policy label
The implementation uses `io.containers.seccomp.profile` while the docs
mentioned `io.podman`.  Correct the two references in the docs to
reflect the implementation.

Fixes: #9853
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-29 11:45:59 +02:00
baude 7a79f708a4 Podman machine enhancements
Podman machine remove is now called `rm`.

Podman machine create now supports resizing the image to the value of
--disk-size as provided.  The default is to 10G.

Added systemd unit file on guest via ignition that sends a Ready message
to the host over a virtio-socket so that we know when the VM is booted
and ready for use.

Podman machine commands no longer require a VM name as an argument.  A
default VM name is defined and if no VM name is provided as a arg, the
default will be used.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-27 10:08:11 -05:00
OpenShift Merge Robot 47006d32ed
Merge pull request #9726 from tunacado/add_runroot_mount_require_to_systemd_gen
Add RequiresMountsFor= to systemd generate
2021-03-26 15:59:12 +00:00
Robb Manes 748826fc88 Add RequiresMountsFor= to systemd generate
It is rare but possible that storage locations for the graphroot and the
runroot are not mounted at boot time, and therefore might race when
doing container operations.  An example we've seen in the wild is that a
slow tmpfs mount for the runroot would suddenly mount over /run, causing
the container to lose all currently-running data, requiring a system
refresh to get it back.

This patch adds RequiresMountsFor= to the systemd.unit header to ensure
the paths for both the graphroot and runroot are mounted prior to
starting any generated unit files.

Signed-off-by: Robb Manes <rmanes@redhat.com>
2021-03-26 08:53:26 -04:00
Ashley Cui f663857103 Rename podman machine create to init and clean up
Rename podman machine create to init because we're initing a VM, not
really creating it
Wire up CPUs flag
Suppress QEMU GUI from popping up when not in debug mode

[NO TESTS NEEDED]
Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-25 17:45:27 -04:00
baude 4ab8a6f67e Improvements for machine
clean up ci failures and add appropriate arch,os exclusion tags

Signed-off-by: baude <bbaude@redhat.com>
2021-03-25 11:02:33 -05:00
Ashley Cui e766113737 Add --execute flag to podman machine ssh
--execute, -e allows to execute a command through ssh

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-25 08:46:43 -05:00
baude b5f54a9b23 introduce podman machine
podman machine allows podman to create, manage, and interact with a vm
running some form of linux (default is fcos).  podman is then configured
to be able to interact with the vm automatically.

while this is usable on linux, the real push is to get this working on
both current apple architectures in macos.

Ashley Cui contributed to this PR and was a great help.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-25 08:43:51 -05:00
Ashley Cui a861f6fd3e Podman machine CLI and interface stub
Podman machine will be a mac-only command that manages the VM where
containers are run. Currently, only the CLI is written and the interface
function for the VM management is stub for future developement

The podman machine cli is only built on mac builds.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-25 08:41:11 -05:00
OpenShift Merge Robot 860de13d4f
Merge pull request #9749 from jwillikers/generate-kube-persistent-volume-claim
Generate Kubernetes PersistentVolumeClaims from named volumes
2021-03-23 13:20:22 -07:00
TomSweeneyRedHat fb628e32f4 [CI:DOCS] Add note to mappings for user/group userns in build
Add a note to the `--userns-uid-map` and `--userns-gid-map` options in
the `podman build` man page.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1930509

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-03-22 11:56:38 -04:00
Jordan Williams 1e255b6df9
Generate Kubernetes PersistentVolumeClaims from named volumes
Fixes #5788

This commit adds support for named volumes in podman-generate-kube.
Named volumes are output in the YAML as PersistentVolumeClaims.
To avoid naming conflicts, the volume name is suffixed with "-pvc".
This commit adds a corresponding suffix for host path mounts.
Host path volumes are suffixed with "-host".

Signed-off-by: Jordan Williams <jordan@jwillikers.com>
2021-03-19 13:52:35 -05:00
Ashley Cui 3d01d42f26 Docs: removing secrets is safe for in-use secrets
Add docs explaining that it is safe to remove a secret that is in use by
a container: secrets are copied and mounted into the container at
creation

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-16 16:18:58 -04:00
Daniel J Walsh c9ef260710
Document CONTAINERS_CONF/CONTAINERS_STORAGE_CONF Env variables
Also Switch to using CONTAINERS_REGISTRIES_CONF for registries.conf
overrides.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-10 06:34:47 -05:00
xcffl dc0c72a48b
Docs: Add docs to access APIs inside container
Signed-off-by: xcffl <2216902+xcffl@users.noreply.github.com>
2021-03-10 07:47:52 +08:00
Valentin Rothberg 2abfef3809 podman cp: ignore EPERMs in rootless mode
Ignore permission errors when copying from a rootless container.
TTY devices inside rootless containers are owned by the host's
root user which is "nobody" inside the container's user namespace
rendering us unable to even read them.

Enable the integration test which was temporarily disabled for rootless
users.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-09 09:02:14 +01:00
Daniel J Walsh 9eac4a7f7b
podman-remote build does not support volumes
Remove --volume option from podman-remote since it is
not supported, also add information to podman-build man page
indicating options not supported over remote connections.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-08 13:46:42 -05:00
Daniel J Walsh 326f3eda31
Handle podman build --dns-search
Fixes: https://github.com/containers/podman/issues/9574

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-07 08:08:32 -05:00
Jakub Guzik 3ae580b0ef [ci skip] Bad formatting fix in build documentation
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-06 01:49:41 +01:00
OpenShift Merge Robot 7b76340864
Merge pull request #9568 from wjt/podman-system-service-timeout-docs
[ci:docs] podman-system-service.1.md: fix timeout example
2021-03-04 10:32:25 -05:00
OpenShift Merge Robot 87e20560ac
Merge pull request #9536 from jmguzik/enable-cgroupsv2-sec-opts
Enable cgroupsv2 rw mount via security-opt unmask
2021-03-03 12:28:54 -05:00
Jakub Guzik 81a3f8a432 Add /sys/fs/cgroup as readonly path in docs
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-03 15:27:45 +01:00
Will Thompson 63a3b8a093 podman-system-service.1.md: fix timeout example
The rest of this document claims that the argument is called '--time',
not '--timeout', and that the value is expressed in seconds. As
currently written, the example (which ostensibly runs the API service
for 5 seconds) uses the '--timeout' spelling (which actually does work,
as an undocumented alias) and passes a value of '5000', which is more
than an hour. Fix both.

[NO TESTS NEEDED] as this is a simple documentation change.

Signed-off-by: Will Thompson <wjt@endlessos.org>
2021-03-02 14:31:43 +00:00
Steve Phillips cc679d952a
podman-image-sign.1.md: typo fix
identify -> identity

Signed-off-by: Steve Phillips <steve@tryingtobeawesome.com>
2021-02-27 09:05:25 -08:00
Kier Davis 431f755197 podman-system-connection.1.md: fix copy/paste error
Signed-off-by: Kier Davis <me@kierdavis.com>
2021-02-24 11:09:19 -06:00
Eduardo Vega 874f2327e6 Add U volume flag to chown source volumes
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2021-02-22 22:55:19 -06:00
OpenShift Merge Robot a6e7d19c46
Merge pull request #9445 from jmguzik/no-header-info-for-systemd-generation
No header info for systemd generation
2021-02-22 13:44:43 -05:00
OpenShift Merge Robot 6fbf73ed8b
Merge pull request #9420 from rhatdan/kube
[NO TESTS NEEDED] Allow podman play kube to read yaml file from stdin
2021-02-22 09:08:33 -05:00
OpenShift Merge Robot 5da7c69968
Merge pull request #9335 from rlukin/patch-1
[ci:docs] Update rootless_tutorial.md
2021-02-22 08:57:33 -05:00
Jakub Guzik d2f3098c6f --no-header flag implementation for generate systemd
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-02-22 14:48:33 +01:00
Valentin Rothberg 5dded6fae7 bump go module to v3
We missed bumping the go module, so let's do it now :)

* Automated go code with github.com/sirkon/go-imports-rename
* Manually via `vgrep podman/v2` the rest

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-22 09:03:51 +01:00
Roman d333ef82b1 Fix 'storage.options' indent
Signed-off-by: Roman Lukin <me@rlukin.ru>
2021-02-21 13:50:24 +03:00
Daniel J Walsh f06dd45e0c
Allow podman play kube to read yaml file from stdin
Fixes: https://github.com/containers/podman/issues/8996

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-19 12:53:25 -05:00
baude cf2a551896 [CI:DOCS]basic networking guide
created a basic networking guide for podman that outlines the common
network setups for podman.

Fixes: #8874

Signed-off-by: baude <bbaude@redhat.com>
2021-02-18 13:21:33 -06:00
paranlee a532994f8b Fix typo podman run doc in flag -pid=mode "efault"
Signed-off-by: paranlee <paran.lee@mail.uk>
2021-02-16 20:46:21 +09:00
OpenShift Merge Robot f98605e0e4
Merge pull request #9125 from ashley-cui/secretswiring
Implement Secrets
2021-02-09 17:51:08 +01:00
Ashley Cui 832a69b0be Implement Secrets
Implement podman secret create, inspect, ls, rm
Implement podman run/create --secret
Secrets are blobs of data that are sensitive.
Currently, the only secret driver supported is filedriver, which means creating a secret stores it in base64 unencrypted in a file.
After creating a secret, a user can use the --secret flag to expose the secret inside the container at /run/secrets/[secretname]
This secret will not be commited to an image on a podman commit

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-02-09 09:13:21 -05:00
baude 91ea3fabd6 add network prune
add the ability to prune unused cni networks.  filters are not implemented
but included both compat and podman api endpoints.

Fixes :#8673

Signed-off-by: baude <bbaude@redhat.com>
2021-02-06 07:37:29 -06:00
Ed Santiago dfa9a340ad Makefile: make bin/* real targets!
Backstory: every time you run 'make podman' or even
just 'make', you get a full recompile. This is sub-ideal.

Cause: I don't really know. It looks complicated. #5017
introduced a .PHONY for bin/podman, for reasons not
explained in the PR. Then, much later, #5880 well-
intentionedly but improperly tweaked the 'find'
command used in defining SOURCES, adding a -prune
but without the corresponding and required -print.
Let's just say, it was an unfortunate cascade of events.

This PR fixes the SOURCES definition and removes the
highly-undesired .PHONY from podman & podman-remote,
making it so you can type 'make' and, oh joy, not
build anything if it's current. The way 'make' is
supposed to work.

Why fix this now? Because my PR (#9209) was failing in CI,
in the Validate step:

    Can't exec "./bin/podman": No such file or directory at hack/xref-helpmsgs-manpages line 223.

It failed even on Re-run, and only passed once I force-pushed
the PR (with no changes, just a new commit SHA). I have no idea
why bin/podman wasn't built, and I have zero interest in pursuing
that right now, but the proper solution is to add bin/podman as
a Makefile dependency for that particular test. So done.

While I'm at it, fix what is pretty clearly a typo in a .PHONY

And, finally, fix a go-md2man warning introduced in #9189

[NO TESTS NEEDED]

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-03 05:49:17 -07:00
OpenShift Merge Robot a086f601e3
Merge pull request #9103 from mattcen/patch-1
[CI:DOCS] typo
2021-02-03 06:57:23 -05:00
OpenShift Merge Robot 8f51d325af
Merge pull request #9174 from bitstrings/master
Make slirp MTU configurable (network_cmd_options)
2021-02-03 06:51:23 -05:00
Matthew Cengia 3d105015f6 typo
Signed-off-by: Matthew Cengia <mattcen@mattcen.com>
2021-02-03 21:22:30 +11:00
bitstrings 0959196807 Make slirp MTU configurable (network_cmd_options)
The mtu default value is currently forced to 65520.
This let the user control it using the config key network_cmd_options,
i.e.: network_cmd_options=["mtu=9000"]

Signed-off-by: bitstrings <pino.silvaggio@gmail.com>
2021-02-02 13:50:26 -05:00
baude e11d8f15e8 add macvlan as a supported network driver
instead of using the --macvlan to indicate that you want to make a
macvlan network, podman network create now honors the driver name of
*macvlan*.  Any options to macvlan, like the parent device, should be
specified as a -o option.  For example, -o parent=eth0.

the --macvlan option was marked as deprecated in the man page but is
still supported for the duration of 3.0.

Signed-off-by: baude <bbaude@redhat.com>
2021-02-01 14:42:38 -06:00
OpenShift Merge Robot 8f3bcf6247
Merge pull request #9144 from vrothberg/fix-9134
Revert "podman build --pull: use correct policy"
2021-01-29 13:27:19 -05:00
Daniel J Walsh d7c356552e
Podman-remote push can support --format
Fix man page to document podman push --format fully.

Also found that push was not handling the tlsverify so fixed this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-29 08:48:35 -05:00
Valentin Rothberg c0bf0ba9e5 podman build --pull: refine help message and docs
Refine and correct the wording of the `--pull` flag in the help message
and the docs.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-28 18:00:22 +01:00
Daniel J Walsh 84f7bdc4db
Switch podman image push handlers to use abi
Change API Handlers to use the same functions that the
local podman uses.

At the same time:

Cleanup and pass proper bindings.  Remove cli options from
podman-remote push.  Cleanup manifest push.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-27 09:27:25 -05:00
OpenShift Merge Robot 5d444466e1
Merge pull request #9106 from baude/issue9104
[CI:DOCS]update state of restful service
2021-01-26 17:26:01 +01:00
OpenShift Merge Robot 41dd1eb8a2
Merge pull request #9022 from cevich/swagger_upload
Cirrus: Upload swagger YAML in every context
2021-01-26 16:53:57 +01:00
baude 35c89ccc5b [CI:DOCS]update state of restful service
we have not updated the state of the restful service. it is no longer
considered under development.  additionally, clarified our support of
remote clients.

Fixes: #9104

Signed-off-by: baude <bbaude@redhat.com>
2021-01-26 09:12:07 -06:00
OpenShift Merge Robot f13385e80e
Merge pull request #8761 from ybelleguic/fix-man-page-on-overlayfs-in-rootless-mode
[CI:DOCS] Fix man page for fuse-overlayfs config in rootless mode
2021-01-26 15:59:58 +01:00
Daniel J Walsh 5623cb9d3d
Fix --arch and --os flags to work correctly
Currently podman implements --override-arch and --overide-os
But Podman has made these aliases for --arch and --os.  No
reason to have to specify --override, since it is clear what
the user intends.

Currently if the user specifies an --override-arch field but the
image was previously pulled for a different Arch, podman run uses
the different arch.  This PR also fixes this issue.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-25 14:58:24 -05:00
OpenShift Merge Robot 23b879d72f
Merge pull request #9085 from rhatdan/docs
Fix typo
2021-01-25 20:48:51 +01:00
TeeVenDick 75698b4b78
Fix typo
Copied from @TeeVenDick patch https://github.com/containers/podman/pull/9072

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-25 10:34:23 -05:00
baude 393a8f0261 disable dnsname when --internal
when doing a network creation, the dnsname plugin should be disabled
when the --internal bool is set.  a warning is displayed if this
happens and docs are updated.

Signed-off-by: baude <bbaude@redhat.com>
2021-01-25 08:51:15 -06:00
OpenShift Merge Robot 1305f7c47a
Merge pull request #9067 from Luap99/podman-manifest-exists
podman manifest exists
2021-01-23 11:05:09 +01:00
Paul Holzinger 6e6a38b416 podman manifest exists
Add podman manifest exists command with remote support.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-22 20:19:13 +01:00
xcffl 94f96c78a6 Add a notice to remove pod before starting service
Signed-off-by: xcffl <2216902+xcffl@users.noreply.github.com>
2021-01-22 18:28:19 +08:00
Paul Holzinger 9d31fed5f7 podman volume exists
Add podman volume exists command with remote support.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-21 19:18:51 +01:00
Chris Evich 4e4d318b71
Cirrus: Upload swagger YAML in every context
The podman documentation site uses javascript to display
API documentation at:

http://docs.podman.io/en/latest/Reference.html

As input, the javascript sources from a CORS-enabled Google Cloud
Storage object.  This commit ensures the storage object is present and
updated for every Cirrus-CI execution context: Tags, Branches, and PRs.

As of this commit, the documentation site only utilizes the object
uploaded by the Cirrus-CI run on the `master` branch:
`swagger-master.yaml`.  The file produced and uploaded due to a PR is
intended for testing purposes: Confirm it's generation and uploading are
both functional.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-21 10:26:57 -05:00
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