215 Commits

Author SHA1 Message Date
c9a82d72a7 Docker uses "-c" to mean "--cpu-shares" in create and run
Add support for -c as an alias for --cpu-shares to be compatible with
Docker.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-12 14:53:17 -04:00
f6ed7a8c94 [CI:DOCS] man pages: remove non-existent option builtin-volume
Closes #14906

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-12 16:28:31 +02:00
87793b6339 [CI:DOCS] Rewrite the --gidmap option docs
* Reference --uidmap in --gidmap docs for additional information

* Remove --gidmap example "groupname -> 100000 / 30000 -> 0"

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-11 13:19:51 +02:00
6b9abe69db improve pull-policy documentation
Make sure that the docs for pull policies is consistent with Buildah and
reflects the implementation.

Further improve the help messages and auto completions.

[NO NEW TESTS NEEDED]

Fixes: #14846
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-08 17:11:08 +02:00
24fcfb5d9e Fix spelling "read only" -> "read-only"
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-02 08:37:43 +02:00
aada13f244 volume: new options [no]copy
add two new options to the volume create command: copy and nocopy.

When nocopy is specified, the files from the container image are not
copied up to the volume.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-27 20:22:20 +02:00
aa4279ae15 Fix spelling "setup" -> "set up" and similar
* Replace "setup", "lookup", "cleanup", "backup" with
  "set up", "look up", "clean up", "back up"
  when used as verbs. Replace also variations of those.

* Improve language in a few places.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-06-22 18:39:21 +02:00
dda68201a4 [CI:DOCS] Rewrite --env docs
* Add docs about trailing * functionality in podman-exec.1.md

* Rewrite --env description in podman-create.1.md and podman-run.1.md

* Rewrite the --env examples in podman-create.1.md and podman-run.1.md

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-06-19 09:56:46 +02:00
9f1bd0a0a1 Merge pull request #14405 from rhatdan/docs
[CI:DOCS] Mount propagation works with named volumes
2022-06-09 17:13:31 -04:00
f0516a0141 --userns=keep-id,nomap are not allowed in rootful mode
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-08 09:59:13 -04:00
9a34b88c9a changed megabyte to mebibyte
In podman run --help, the message said megabyte, gigabyte, etc. In reality podman takes mebibytes, gibibytes, etc.

[CI:DOCS]

Signed-off-by: Karthik Elango <kelango@redhat.com>
2022-06-02 14:58:39 -04:00
5b9729c479 Document protocol usage for --publish
This also unifies the documentation of `--publish` for `podman create`, `podman run`, and `podman pod create`.

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2022-06-02 14:26:51 +02:00
c0ad9a43e4 Mount propagation works with named volumes
Fixes: https://github.com/containers/podman/issues/13939

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-28 07:06:16 -04:00
633d5f1f8b fix --init with /dev bind mount
The init binary until now has been bind-mounted to /dev/init which
breaks when bind-mounting to /dev.  Instead mount the init to
/run/podman-init.  The reasoning for using /run is that it is already
used for other runtime data such as secrets.

Fixes: #14251
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-23 13:59:05 +02:00
a615cb2fe2 Docs rootfull -> rootful
Some docs say roofull. Change to rootful.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-04-25 11:53:57 -04:00
ad3da638ce Merge pull request #13918 from Luap99/hosts
use etchosts package from c/common
2022-04-22 08:50:32 -04:00
e912f1b689 Improve /etc/hosts documentation
Update the documentation for /etc/hosts options --add-host and
--no-hosts. Also make sure that all references use the same text for
consistency.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 13:06:01 +02:00
80c0fceb24 Add support for --userns=nomap
From a security point of view, it would be nice to be able to map a
rootless usernamespace that does not use your own UID within the
container.

This would add protection against a hostile process escapping the
container and reading content in your homedir.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-21 15:29:04 -04:00
80d1752791 slirp4netns: actually make ipv6 default
We already have ipv6 enabled as default via the containers.conf setting.
However the documentation did not reflect this. Also if no options were
set in contianers.conf it would have ipv6 disabled.

We can now remove the extra option from containers.conf.

Also fix another outdated option description for host.containers.internal
and add that the options can also be set in contianers.conf.

[NO NEW TESTS NEEDED]

Fixes #13914

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-20 13:59:01 +02:00
8d3075e332 Merge pull request #13583 from rhatdan/ipc
Add support for ipc namespace modes "none, private, sharable"
2022-04-16 12:30:01 -04:00
3f2939c2ef run, create: add --passwd-entry
It allows to customize the entry that is written to the `/etc/passwd`
file when --passwd is used.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-04-14 11:22:13 +02:00
3987c529f4 Add support for ipc namespace modes "none, private, sharable"
Fixes: #13265

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-12 13:35:51 -04:00
c01d1f8e37 [CI:DOCS] docs: drop note about upcoming RHEL 7.7
it was released more than two years ago.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-03-25 11:08:52 +01:00
e657c7a170 Merge pull request #13622 from rhatdan/systemd1
When running systemd in a container set container_uuid
2022-03-24 19:05:44 +01:00
9b0c8d23bd man pages: sort flags, and keep them that way
Command flags (OPTIONS) in man pages have to date been in
haphazard order. Sometimes that order is sensible, e.g.,
most-important options first, but more often they're
just in arbitrary places. This makes life hard for users.

Here, I update the man-page-check Makefile script so it
checks and enforces alphabetical order in OPTIONS sections.
Then -- the hard part -- update all existing man pages to
conform to this requirement.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-03-23 13:49:42 -06:00
5e28cbc5fc When running systemd in a container set container_uuid
systemd expects the container_uuid environment variable be set
when it is running in a container.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-03-23 15:05:30 -04:00
e8968c867f Add support for --chrootdirs
Signed-off-by: LStandman <65296484+LStandman@users.noreply.github.com>
2022-03-14 10:31:58 +02:00
60528b9c99 Merge pull request #13066 from rhatdan/man
Clarify remote client means Mac and Windows
2022-02-01 15:41:36 -05:00
009d9eb679 Add notes to "--oom-kill-disable" not supported on cgroups V2
Clarify "--oom-kill-disable" is not supported on cgroups V2 in
documentation.

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2022-01-31 17:14:46 +09:00
6365437871 Clarify remote client means Mac and Windows
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-28 08:14:05 -05:00
42e1c29816 [CI:DOCS] Fix typos and improve language
* Add more documentation fixes similar to
  8099a61b648a1cfc862461487f1db9ecd47d065e

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-24 23:32:09 +01:00
8099a61b64 [CI:DOCS] Fix typos and improve language
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-24 19:34:36 +01:00
e68d188f64 [CI:DOCS] fix typo subpordinate
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-22 22:47:28 +01:00
d6e55577cf [CI:DOCS] fix default branch links
* Replace https://github.com/containers/podman/blob/master
  with https://github.com/containers/podman/blob/main
  to match the new default branch "main". Previously
  the default branch was "master". The substitutions were
  made in the documentation but not the code.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-15 20:56:19 +01:00
6996830104 Prohibit --uid/gid map and --pod for container create/run
add a check in namespaceOptions() that ensures the user is not setting a new uid/gid map
if entering or creating a pod that has an infra container

resolves #12669

Signed-off-by: cdoern <cdoern@redhat.com>
2022-01-13 14:03:51 -05:00
c496001d03 add --ip6 flag to podman create/run
Add the --ipv6 flag to podman create/run and pod create. We support the
--network name:ip6=<ip> syntax now but for docker compat we should also
support the --ip6 flag.
Note that there is no validation if the ip is actually a v6 or v4 address
because the backend does not care either.

Fixes #7511

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-03 14:26:34 +01:00
73a54ea54d Merge pull request #12627 from rhatdan/passwd
Allow users to add host user accounts to /etc/passwd
2021-12-23 19:28:08 +01:00
5570b5b975 Merge pull request #12679 from vrothberg/fix-12671
clarify `io.podman.annotations.seccomp`
2021-12-23 15:14:10 +01:00
e8c06fac97 Allow users to add host user accounts to /etc/passwd
Some containers require certain user account(s) to exist within the
container when they are run. This option will allow callers to add a
bunch of passwd entries from the host to the container even if the
entries are not in the local /etc/passwd file on the host.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1935831

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-23 07:51:27 -05:00
cbcab43425 [CI:DOCS] clarify io.podman.annotations.seccomp
Clarify the semantics of the `io.podman.annotations.seccomp` annotation
which is set when a container has been created with a custom seccomp
profile.

Fixes: #12671
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-23 13:40:46 +01:00
cb4f498e4f [CI:DOCS] docs: document rootless userns mappings
document how the host IDs are mapped inside the rootless user
namespace.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-23 09:32:49 +01:00
535818414c support advanced network configuration via cli
Rework the --network parse logic to support multiple networks with
specific network configuration settings.
--network can now be set multiple times. For bridge network mode the
following options have been added:
  - **alias=name**: Add network-scoped alias for the container.
  - **ip=IPv4**: Specify a static ipv4 address for this container.
  - **ip=IPv6**: Specify a static ipv6 address for this container.
  - **mac=MAC**: Specify a static mac address address for this container.
  - **interface_name**: Specify a name for the created network interface inside the container.

So now you can set --network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99
for the default bridge network as well as for network names.
This is better than using --ip because we can set the ip per network
without any confusion which network the ip address should be assigned
to.
The --ip, --mac-address and --network-alias options are still supported
but --ip or --mac-address can only be set when only one network is set.
This limitation already existed previously.

The ability to specify a custom network interface name is new
Fixes #11534

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 15:23:39 +01:00
e83d366651 volumes: add new option idmap
pass down the "idmap" mount option to the OCI runtime.

Needs: https://github.com/containers/crun/pull/780

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

[NO NEW TESTS NEEDED] there is no crun version yet that support the
new feature.

Test case (must run as root):

podman run --rm -v foo:/foo alpine touch /foo/bar

podman run --uidmap 0:1:1000 --rm -v foo:/foo:idmap alpine ls -l /foo
total 0
-rw-r--r--    1 root     root             0 Nov 15 14:01 bar

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-11-18 17:01:06 +01:00
44d1618dd7 Add --unsetenv & --unsetenv-all to remove def environment variables
Podman adds a few environment variables by default, and
currently there is no way to get rid of them from your container.
This option will allow  you to specify which defaults you don't
want.

--unsetenv-all will remove all default environment variables.

Default environment variables can come from podman builtin,
containers.conf or from the container image.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-15 15:10:12 -05:00
6236be4ff9 [CI:DOCS] Add CI check for SEE ALSO in man pages
Add new CI check to confirm that links and references
in SEE ALSO sections are properly formatted and that
links are valid (at least in theory: we do no actual
URL fetching to test for 404).

The check is piggybacked into existing xref-helpmsgs-manpages
script. It could conceivably be more elegant to write a
separate tool for this purpose, but I don't wish to duplicate
the logic for finding and reading markdown files.

Script identified various problems, which I fix in this PR:

  . missing '**' (asterisks) around some references, or '**'
    in the wrong place.

  . links pointing to github.com/.../tree/ instead of /blob/
    (github redirects those automatically, but I like
    consistency)

  . a few copy-paste errors, e.g. subgid linking to subuid.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-10 09:03:40 -07:00
2720156fa5 Add links to all SEE ALSO sections
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-10 09:29:21 -05:00
7225ddb5b1 Add links to podman build,run, create see also
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-08 21:03:18 -05:00
4e8bf8be4b Add some information about disabling SELinux when using system volumes
A comment was made on internal mailing list about confusion on SELinux
labeling of volumes. This PR makes it a little more clear about when
you should or should not relabel.

We need a similar comment in podman pod create, but it does not support
--security-opt processing yet.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-06 05:47:52 -04:00
4e9e6f21ff volumes: allow more options for devpts
allow to pass down more options that are supported by the kernel.

Discussion here: https://github.com/containers/toolbox/issues/568

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-10-28 15:30:06 +02:00
acd8b49000 Add support to play kube for --log-opt
Fixes: https://github.com/containers/podman/issues/11727

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-25 11:40:42 -04:00