Commit Graph

1880 Commits

Author SHA1 Message Date
openshift-ci[bot] 4f6a8f0d50
Merge pull request #20483 from vrothberg/RUN-1934
container.conf: support attributed string slices
2023-10-27 17:49:13 +00:00
Matthew Heon c6d410cc36 Do not add powercap mask if no paths are masked
This solves `--security-opt unmask=ALL` still masking the path.

[NO NEW TESTS NEEDED] Can't easily test this as we do not have
access to it in CI.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-10-27 09:55:12 -04:00
Valentin Rothberg e966c86d98 container.conf: support attributed string slices
All `[]string`s in containers.conf have now been migrated to attributed
string slices which require some adjustments in Buildah and Podman.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-27 12:44:33 +02:00
Ygal Blum 76cca08f8a Quadlet - explicit support for read-only-tmpfs
Add Quadlet key and disconnect relationship withr read-only
Update and add tests
Update man with new key

Remove the reference to VolatileTmpfs in the man page to reduce its
usage, since the same functionality can be achieved using the Tmpfs key
while keeping its support to maintain backward compatibility

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-25 13:28:15 +03:00
Daniel J Walsh 06b7264977
Use buildah default isolation when working with podman play kube
Users can specify BUILDAH_ISOLATION environment variable to change the
default.

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

Currently podman play kube is defaulting to chroot, which is the least
safe version of build, we should always default to secure whenever
possible. Chroot should only be used when building within a container.

No great way to tests this.
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-24 12:20:11 -04:00
Daniel J Walsh ee60708880
Support size option when creating tmpfs volumes
Fixes: https://github.com/containers/podman/issues/20449

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-23 16:31:54 -04:00
openshift-ci[bot] c1980a6a26
Merge pull request #20409 from Luap99/port-fw
[CI:DOCS] network: document ports and macvlan interaction
2023-10-19 19:48:37 +00:00
Paul Holzinger ca9efb0cda
network: document ports and macvlan interaction
The network backend will ignore ports for macvlan and ipvlan networks so
they do not do anything. No warning or error is shown because containers
may be later connected to a bridge network in which case they would be
useful.

Fixes #17927

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-19 17:04:29 +02:00
Paul Holzinger f2bc638944
quadlet: document cgroupv2 requirement
Units created with quadlet need cgroupv2 in order to work.

Fixes #19365

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-19 16:39:55 +02:00
Ygal Blum 9b8e01efd6 Quadlet - support ImageName for .image files
Allow overriding the image name resolved from the .image file
Add test and doc

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-18 13:43:54 +03:00
openshift-ci[bot] 9394171cbb
Merge pull request #20387 from Luap99/machine-doc
[CI:DOCS] machine set: document --rootful better
2023-10-18 07:45:06 +00:00
Paul Holzinger dc705d3702
machine set: document --rootful better
If you change this option all the containers disappear from the default
connection and socket. Thus it is required to recreate the resources.
Sharing between root and rootless is not possible for various reasons.

Fixes #19936

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-17 18:09:13 +02:00
Ygal Blum 3b6a4ac37a Minor log and doc fixes
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 14:43:02 +03:00
Ygal Blum f875ae3176 Quadlet man page - discuss volume removal explicitly
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 14:43:02 +03:00
Ygal Blum 5d5facbd79 Quadlet - add support for KubeDownForce
Allow users to set --force for Stop command
Add doc and tests

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 14:43:01 +03:00
openshift-ci[bot] 5853e2bee9
Merge pull request #20363 from ygalblum/quadlet-kube-oneshot-test
System Test - Quadlet kube oneshot
2023-10-17 10:53:40 +00:00
Ygal Blum 6ba67ba96c System Test - Quadlet kube oneshot
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 11:15:11 +03:00
Daniel J Walsh c8604081e8
Fix handling of --read-only-tmpfs flag
Fixes: https://github.com/containers/podman/issues/20225

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-16 14:18:55 -04:00
Aditya R 6cf3dd4931
docs: add unsetlabel
Signed-off-by: Aditya R <arajan@redhat.com>
2023-10-16 14:02:21 +05:30
openshift-ci[bot] 6e40a5f9c6
Merge pull request #20348 from rhatdan/codespell
Run codespell
2023-10-12 22:39:26 +00:00
Daniel J Walsh cb53bcf23f
Run codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-12 12:45:44 -04:00
Daniel J Walsh 7b84b55daa
Apply suggestions from code review
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-12 07:45:41 -04:00
Ygal Blum 702f155288 Quadlet - support oneshot .kube files
Allow users to manually set the Service Type
Add test
Update README

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-11 18:56:29 +03:00
openshift-ci[bot] 6e7e87503c
Merge pull request #20253 from ygalblum/quadlet-command-args
Quadlet - add support for global arguments
2023-10-09 09:01:36 +00:00
Ygal Blum d321d427dc Quadlet - add support for global arguments
Add support for adding podman level arguments before subcommand
Add specific key for Containers Conf Modules
Global arguments are added for both start and stop commands
Adjust testing environment
Add tests
Add to man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-08 10:14:06 +03:00
openshift-ci[bot] e9d6ffa8f0
Merge pull request #20252 from vrothberg/privileged
containers.conf: add `privileged` field to containers table
2023-10-07 11:34:45 +00:00
Valentin Rothberg 362eca6691 containers.conf: add `privileged` field to containers table
As requested in containers/podman/issues/20000, add a `privileged` field
to the containers table in containers.conf.  I was hesitant to add such
a field at first (for security reasons) but I understand that such a
field can come in handy when using modules - certain workloads require a
privileged container.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-05 20:14:18 +02:00
Paul Holzinger 5f340487ee
Revert "docs(env-file): improve document description"
This reverts commit c67ef7c1a1.

see https://github.com/containers/podman/issues/19565

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-04 17:06:21 +02:00
Rahil Bhimjiani 049a5fb926
[skip-ci] Improve podmansh(1)
Signed-off-by: Rahil Bhimjiani <rahil3108@gmail.com>
2023-09-30 17:33:17 +05:30
OpenShift Merge Robot fff4e2f0ef
Merge pull request #20191 from umohnani8/load
[CI:DOCS] Update podman load doc
2023-09-28 21:16:55 -04:00
Brent Baude 94818f5941 podman machine: disable zincati update service
As explained in #21022, there are all kinds of downsides to a machine
updating itself (via zincati) automatically, like interuption of
service, lost mounts, etc.

disabling zincati will at least allow stop these downsides.  we are
likely to contemplate if podman will take over the update process
externally where interuption of services will not occur etc.

Fixes #20122

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-09-28 13:01:52 -05:00
Urvashi Mohnani ecd7b38022 [CI:DOCS] Update podman load doc
Update podman load doc to mention support for loading in
compressed files. Add an example command as well.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-09-28 10:51:26 -04:00
André Cirne be823b3880 Add documentation for the vrf option on netavark
Signed-off-by: André Cirne <dumahk21@gmail.com>
2023-09-28 09:44:47 +01:00
OpenShift Merge Robot 4212b4998d
Merge pull request #19823 from Backfighter/fix-17028
Fix all ports exposed on host by kube play
2023-09-28 03:29:43 -04:00
wpross 455d165492 Update docs/source/markdown/options/rdt-class.md
Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: wpross <wolfgang.pross@intel.com>
2023-09-27 16:44:13 +00:00
Wolfgang Pross 77336de8f7 Add documentation for Intel RDT support
Signed-off-by: Wolfgang Pross <wolfgang.pross@intel.com>
2023-09-27 16:44:13 +00:00
Valentin Rothberg 59e295f2a3 podman build: correct default pull policy
The default pull policy is "missing" not "always".

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-25 16:28:53 +02:00
Peter Werner f52b02f406 Fix all ports exposed by kube play
Container ports defined with containerPort were exposed by default
even though kubernetes interprets them as mostly informative.
Closes #17028

Signed-off-by: Peter Werner <wpw.peter@gmail.com>
2023-09-23 19:53:46 +02:00
OpenShift Merge Robot 696f4a6a4d
Merge pull request #20038 from TomSweeneyRedHat/dev/tsweeney/nit_farm
[CI:DOCS] Tweak podman to Podman in a few farm man pages
2023-09-19 21:53:47 +02:00
OpenShift Merge Robot 6a4df3af3f
Merge pull request #20037 from mheon/fix_sigproxy_docs
[CI:DOCS] Docs on sig-proxy are wrong, we support TTY
2023-09-19 21:51:11 +02:00
TomSweeneyRedHat b0f7072ac9 [CI:DOCS] Tweak podman to Podman in a few farm man pages
While doing a review of the farm man pages after they had been
submitted, I found a few references to "podman" that should have
been "Podman".  I have touched those up in this commit.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-09-19 14:16:24 -04:00
Matt Heon 8afffa1aa7 Docs on sig-proxy are wrong, we support TTY
Also, we don't proxy SIGURG (Golang uses it internally for waking
threads, so Go processes get it constantly (see [1] for more
details).

[1] https://github.com/golang/go/issues/37942

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-09-19 13:25:50 -04:00
OpenShift Merge Robot 8434471a3f
Merge pull request #20007 from rahilarious/main
[CI:DOCS] Improve podman-{tag,build} man pages
2023-09-18 20:18:54 +02:00
Rahil Bhimjiani 47160da7ac
[CI:DOCS] Improve podman-tag man page
Signed-off-by: Rahil Bhimjiani <rahil3108@gmail.com>
2023-09-18 21:55:06 +05:30
Rahil Bhimjiani ef553fb0de
[CI:DOCS] Improve podman-build man page
Signed-off-by: Rahil Bhimjiani <rahil3108@gmail.com>
2023-09-18 21:55:06 +05:30
OpenShift Merge Robot 364f989c45
Merge pull request #20005 from rhatdan/run
[CI:DOCS] Fix specification of unix:///run
2023-09-18 17:56:02 +02:00
OpenShift Merge Robot 1d7efcbe20
Merge pull request #19912 from ygalblum/quadlet-unit-image
Quadlet - add support for .image units
2023-09-18 17:50:17 +02:00
OpenShift Merge Robot 81ddf48869
Merge pull request #20012 from vrothberg/module-parsing
error when --module is specified on the command level
2023-09-18 16:40:49 +02:00
Ed Santiago a80a908df7 [CI:DOCS] consistentize filter options in man pages
Some --filter descriptions listed the filters with asterisks,
i.e. markdown italics. There were 60+ of those, 250+ without
asterisks, so I choose to de-asterisk them all. Update the
xref script to remove the allow-asterisk exception. (Except
for the column title, which is sometimes written with two
asterisks--boldface--and sometimes plain).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-18 07:41:28 -06:00
Ygal Blum 55ca571e55 Quadlet - add support for .image units
main
----
Use order number to order the units processing
Process .image file
Usage of .image file should not log Ambiguous Name warning
Use AmbiguousName for .volume and .image units

Quadlet
-------
Convert .image files
Add driver and Image keys to .volume files
Handle usage of .image as Image

Man Page
--------
Add comments for new keys in .volume file
Add comment about using .image files as images
Add section about .image units

Tests
-----
Add integration tests
Add system test

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
2023-09-18 16:26:18 +03:00
Valentin Rothberg 0b7142f4a4 error when --module is specified on the command level
The --module can only be parsed on the root level.  It cannot work on
the command level, because it must be "manually" parsed on init() to
make sure the specified configuration files/modules are loaded prior to
parsing the flags via Cobra.

Hence move --module from the "persistent" to the "local" flags which
will yield an error instead of doing nothing when being specified on the
command level:

```
$ ./bin/podman run --module=foo.conf --rm alpine
Error: unknown flag: --module
See 'podman run --help'
```

Reported in #20000.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-18 13:52:38 +02:00
Ed Santiago deba3b80a1 man page crossrefs: add --filter autocompletes
For all commands with a --filter option, cross-reference
against man pages, and vice-versa.

I'm sorry. I know this script has gone off the deep end.

[NO NEW TESTS NEEDED] although actually I would like to test some broken completions

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-17 06:20:33 -06:00
OpenShift Merge Robot 5dc4370d91
Merge pull request #19911 from xtexChooser/xtex/impl-container-label-not
Add label! filter to container filters
2023-09-17 13:47:23 +02:00
Daniel J Walsh 03dd5f2568
Fix specification of unix:///run
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-17 07:37:14 -04:00
xtex 98e6dda697
Add label! filter and tests to containers and pods
Thanks to Ed Santiago <santiago@redhat.com> for tests.

Signed-off-by: xtex <xtexchooser@duck.com>
2023-09-16 18:46:33 +08:00
OpenShift Merge Robot 3984b45b42
Merge pull request #19976 from plettich/patch-1
[CI:DOCS] Fix some spelling and formatting  in volume options
2023-09-14 17:49:43 +02:00
OpenShift Merge Robot 33e565520f
Merge pull request #19951 from Luap99/small-remote
podman-remote debloat: remove libimage dependency
2023-09-14 15:27:45 +02:00
Paul Lettich c689fb4a5b
Fix some spelling and formatting
Signed-off-by: Paul Lettich <paul.lettich@netknights.it>
2023-09-14 14:46:50 +02:00
Daniel J Walsh 522e0f43f4
Add support for Ulimit in quadlet
QM needs to be able to specify the maximum number of open files within the QM
environment to ensure FFI.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-14 06:17:43 -04:00
OpenShift Merge Robot 957523e62a
Merge pull request #19969 from eriksjolund/rewrite-restart-md
[CI:DOCS] restart.md: migrate to container unit
2023-09-14 12:08:44 +02:00
OpenShift Merge Robot 88b415e341
Merge pull request #19955 from rhatdan/quadlet
Add support for PidsLimit in quadlet
2023-09-14 11:48:03 +02:00
Paul Holzinger 6b7f718b4b
wire in new buildah build options
Add support for --layerLabel.
Support for --cw is only added for the local client. I am not sure how
I would wire this over remote. The current code parse the options in
the frontend which hard codes the Tmpdir field to an incorrect value if
we would json marshal this vie remote API so it would not work in real
remote cases.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-09-14 11:21:00 +02:00
Erik Sjölund bf86ed72c2 [CI:DOCS] restart.md: migrate to container unit
Fixes: https://github.com/containers/podman/issues/19968

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-09-14 06:51:35 +02:00
Daniel J Walsh 4ed3273f68
Add support for PidsLimit in quadlet
QM needs to be able to specify the maximum number of PIDs within the QM
environment to ensure FFI.
Picking a total of 10,000 Pids might be a rasonable constraint on the
QM.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-13 14:32:35 -04:00
ryanhockstad 883612eff3
Merge branch 'containers:main' into main 2023-09-13 14:23:16 -04:00
Ryan Hockstad 70560f9168 Add DNS fields to Container and Network unit groups
Signed-off-by: Ryan Hockstad <ryanhockstad@gmail.com>
2023-09-13 13:16:53 -04:00
OpenShift Merge Robot e8c4d7966b
Merge pull request #19952 from mheon/init_cannot_modify
[CI:DOCS] The `podman init` command cannot modify containers.
2023-09-12 21:33:53 +02:00
Matt Heon 5920bfa2ef The `podman init` command cannot modify containers.
`podman init` is a debugging command for inspecting a container's
OCI spec before it runs, to look for anything suspicious. It is
not capable of supporting modifications to that spec, as it
starts Conmon and thus the OCI runtime, so the spec has already
been loaded by the time `podman init` is run.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-09-12 13:28:42 -04:00
Lokesh Mandvekar 806c5de12a
Podmansh: use podmansh_timeout
podmansh_timeout is now a configurable option in containers.conf.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-09-12 09:18:24 -04:00
danishprakash cdcf18b862
kube: add DaemonSet support for generate
Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-09-12 10:30:57 +05:30
Erik Sjölund 65a64da271 [CI:DOCS] podman-systemd.unit: fix equivalents
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-09-11 07:41:10 +02:00
Daskan 5eb0a53a0a
Update podman-kube-play.1.md.in
To avoid the error:
`Error: unable to read YAML as Kube Pod: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal object into Go struct field Container.spec.containers.command of type string`

Also makes it easier to understand as you only need the image parameter.

Signed-off-by: Daskan <kevin81991@web.de>
2023-09-09 21:41:41 +02:00
Giuseppe Scrivano 8b4a79a744
linux, rootless: clamp oom_score_adj if it is too low
when running rootless, if the specified oom_score_adj for the
container process is lower than the current value, clamp it to the
current value and print a warning.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-04 14:44:14 +02:00
guoguangwu 13342e5039 fix: default typo
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-08-31 18:14:59 +08:00
Sergio Oller 18d35b6122 Fix gidmap command in example
Since we do not want the mapping to be applied to uids,
we should use the `g` flag in the mapping in the example
as well.

Follow up of #18173

Signed-off-by: Sergio Oller <sergioller@gmail.com>
2023-08-30 13:47:23 +02:00
Sergio Oller 91b8bc7f13 uid/gid mapping flags
Motivation
===========

This feature aims to make --uidmap and --gidmap easier to use, especially in rootless podman setups.

(I will focus here on the --gidmap option, although the same applies for --uidmap.)

In rootless podman, the user namespace mapping happens in two steps, through an intermediate mapping.

See https://docs.podman.io/en/latest/markdown/podman-run.1.html#uidmap-container-uid-from-uid-amount
for further detail, here is a summary:

First the user GID is mapped to 0 (root), and all subordinate GIDs (defined at /etc/subgid, and
usually >100000) are mapped starting at 1.

One way to customize the mapping is through the `--gidmap` option, that maps that intermediate mapping
to the final mapping that will be seen by the container.

As an example, let's say we have as main GID the group 1000, and we also belong to the additional GID 2000,
that we want to make accessible inside the container.

We first ask the sysadmin to subordinate the group to us, by adding "$user:2000:1" to /etc/subgid.

Then we need to use --gidmap to specify that we want to map GID 2000 into some GID inside the container.

And here is the first trouble:

Since the --gidmap option operates on the intermediate mapping, we first need to figure out where has
podman placed our GID 2000 in that intermediate mapping using:

    podman unshare cat /proc/self/gid_map

Then, we may see that GID 2000 was mapped to intermediate GID 5. So our --gidmap option should include:

    --gidmap 20000:5:1

This intermediate mapping may change in the future if further groups are subordinated to us (or we stop
having its subordination), so we are forced to verify the mapping with
`podman unshare cat /proc/self/gid_map` every time, and parse it if we want to script it.

**The first usability improvement** we agreed on #18333 is to be able to use:

    --gidmap 20000:@2000:1

so podman does this lookup in the parent user namespace for us.

But this is only part of the problem. We must specify a **full** gidmap and not only what we want:

    --gidmap 0:0:5 --gidmap 5:6:15000 --gidmap 20000:5:1

This is becoming complicated. We had to break the gidmap at 5, because the intermediate 5 had to
be mapped to another value (20000), and then we had to keep mapping all other subordinate ids... up to
close to the maximum number of subordinate ids that we have (or some reasonable value). This is hard
to explain to someone who does not understand how the mappings work internally.

To simplify this, **the second usability improvement** is to be able to use:

   --gidmap "+20000:@2000:1"

where the plus flag (`+`) states that the given mapping should extend any previous/default mapping,
overriding any previous conflicting assignment.

Podman will set that mapping and fill the rest of mapped gids with all other subordinated gids, leading
to the same (or an equivalent) full gidmap that we were specifying before.

One final usability improvement related to this is the following:

By default, when podman  gets a --gidmap argument but not a --uidmap argument, it copies the mapping.
This is convenient in many scenarios, since usually subordinated uids and gids are assigned in chunks
simultaneously, and the subordinated IDs in /etc/subuid and /etc/subgid for a given user match.

For scenarios with additional subordinated GIDs, this map copying is annoying, since it forces the user
to provide a --uidmap, to prevent the copy from being made. This means, that when the user wants:

    --gidmap 0:0:5 --gidmap 5:6:15000 --gidmap 20000:5:1

The user has to include a uidmap as well:

    --gidmap 0:0:5 --gidmap 5:6:15000 --gidmap 20000:5:1 --uidmap 0:0:65000

making everything even harder to understand without proper context.

For this reason, besides the "+" flag, we introduce the "u" and "g" flags. Those flags applied to a
mapping tell podman that the mapping should only apply to users or groups, and ignored otherwise.

Therefore we can use:

   --gidmap "+g20000:@2000:1"

So the mapping only applies to groups and is ignored for uidmaps. If no "u" nor "g" flag is assigned
podman assumes the mapping applies to both users and groups as before, so we preserve backwards compatibility.

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Sergio Oller <sergioller@gmail.com>
2023-08-28 20:21:04 +02:00
Sergio Oller 18c2a2be87 [DOC] Clarify default behaviour on uidmap
Specify that by default if only one of uidmap or gidmap is given, the other one is copied

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Sergio Oller <sergioller@gmail.com>
2023-08-28 20:21:04 +02:00
OpenShift Merge Robot dd2ec7c613
Merge pull request #19640 from flouthoc/force-compression
push/manifest-push: add support for `--force-compression` to prevent reusing other blobs
2023-08-28 16:49:31 +02:00
Aditya R 0938ee1899
push, manifest-push: --force-compression must be true with --compression-format
Value of `--force-compression` should be already `true` is
`--compression-format` is selected otherwise let users decide.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-28 16:41:13 +05:30
Ashley Cui da81bc13a1 Add rootful status to machine inspect
Podman machine inspect now shows if the machine is rootful

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-08-25 11:27:08 -04:00
Urvashi Mohnani 52ed7fce2a Add infra-name annotations to kube gen/play
Add io.podman.annotations.infra.name annotation to kube play so
users can set the name of the infra container created.
When a pod is created with --infra-name set, the generated
kube yaml will have an infraName annotation set that will
be used when playing the generated yaml with podman.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-24 11:29:56 -04:00
Aditya R 82bd56be74
manifest-push: add support for --force-compression
Adds support for --force-compression which allows end-users to force
push blobs with the selected compresison in --compression option, in
order to make sure that blobs of other compression on registry are not
reused.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-24 13:36:04 +05:30
Aditya R 469ace0910
push: add support for --force-compression
Adds support for --force-compression which allows end-users to force
push blobs with the selected compresison in --compression option, in
order to make sure that blobs of other compression on registry are not
reused.

Is equivalent to: force-compression here: https://docs.docker.com/build/exporters/#compression

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

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-24 13:35:58 +05:30
Valentin Rothberg 75ce47347c [CI:DOCS] update auto-update docs
Rewrite the auto-update man page.  It was quite dusty and out-dated as
it was not mentioning Quadlet at all.  At times it was too verbose about
internal implementation details that users shouldn't need to worry
about.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-22 16:19:06 +02:00
OpenShift Merge Robot f727428b52
Merge pull request #19663 from rhatdan/ramfs
Add support for ramfs as well as tmpfs in volume mounts
2023-08-21 16:51:06 -02:30
Daniel J Walsh 45ce4834af
Add support for ramfs as well as tmpfs in volume mounts
Users want to mount a tmpfs file system with secrets, and make
sure the secret is never saved into swap. They can do this either
by using a ramfs tmpfs mount or by passing `noswap` option to
a tmpfs mount.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-21 07:14:57 -04:00
Doug Rabson 27b41f0877 libpod: use /var/run instead of /run on FreeBSD
This changes /run to /var/run for .containerenv and secrets in FreeBSD
containers for consistency with FreeBSD path conventions. Running Linux
containers on FreeBSD hosts continue to use /run for compatibility.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-08-17 14:04:53 +01:00
OpenShift Merge Robot 3c6d800b29
Merge pull request #19647 from rhatdan/podmansh
[CI:DOCS] podmansh man page UID=3267 is not allowed
2023-08-16 16:59:06 -02:30
OpenShift Merge Robot e163e26880
Merge pull request #19618 from PeterWhittaker/main
[CI:DOCS] Update podman.1.md: Fix formatting of exit code 127, clarify wording …
2023-08-16 16:30:11 -02:30
OpenShift Merge Robot f559fc55bb
Merge pull request #19567 from vrothberg/RUN-1873
add --module flag
2023-08-16 16:23:54 -02:30
Daniel J Walsh 362747cfab
podmansh man page UID=$(id -u lockedu) is not allowed
Switch man page to user USERID instead of UID, since UID environment
variable is set at login, and is not allowed to be changed.

UID=foobar
bash: UID: readonly variable

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-16 14:16:33 -04:00
Peter Whittaker 7103fdb3fe podman.1.md: Fix formatting of exit code 127, clarify wording of `exit code` example.
Signed-off-by: Peter Whittaker <PeterWhittaker@SphyrnaSecurity.com>
2023-08-16 10:59:06 -04:00
Christian Hörtnagl 896cab6120 document available secret drivers
[NO NEW TESTS NEEDED]

Signed-off-by: Christian Hörtnagl <christian.hoertnagl@univie.ac.at>
2023-08-16 16:23:39 +02:00
Valentin Rothberg d5841ed528 add --module flag
Support a new concept in containers.conf called "modules".  A "module"
is a containers.conf file located at a specific directory.  More than
one module can be loaded in the specified order, following existing
override semantics.

There are three directories to load modules from:
 - $CONFIG_HOME/containers/containers.conf.modules
 - /etc/containers/containers.conf.modules
 - /usr/share/containers/containers.conf.modules

With CONFIG_HOME pointing to $HOME/.config or, if set, $XDG_CONFIG_HOME.
Absolute paths will be loaded as is, relative paths will be resolved
relative to the three directories above allowing for admin configs
(/etc/) to override system configs (/usr/share/) and user configs
($CONFIG_HOME) to override admin configs.

Pulls in containers/common/pull/1599.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-16 14:32:35 +02:00
TomSweeneyRedHat abd35d4d37 [CI:DOCS] Fix git build example in build page
The git repo that was used for the example of a git build:

  `podman build https://github.com/scollier/purpletest`

no longer exists.  Someone reached out to @rhatdan about this
and he suggested using the Podman Hello World repo.  However,
that didn't exist until a little bit ago, so I've updated
the man page with a pointer there.  That should be a lot more
stable.

[NO NEW TESTS NEEDED]
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-08-14 17:45:02 -04:00
Peter Whittaker 345b9b0295 Update rootfs.md: Fix formatting and wording of idmap option
The newly introduced `idmap` section of rootfs lacked a header
(comparable to Overlay Rootfs Mounts), had odd formatting, and
wording that differed from other instances of idmap, e.g., the
one in the --volume section. This commits addresses those issues.

Signed-off-by: Peter Whittaker <PeterWhittaker@SphyrnaSecurity.com>
2023-08-14 09:21:24 -04:00
Urvashi Mohnani dce3ef3c42 Add podman farm update command
Podman farm update allows users to update a farm by addig
connections, removing connections, or changing the default farm.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani 44a704dfcf Add podman farm remove command
Podman farm remove allows users to remove one or more
existing farms.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani 59a8140f1f Add podman farm list command
The podman farm list command allows users to list
the existing farms.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani 6fcdf1a190 Add podman farm create command
The podman farm create command allows users to create
farms from the avaiable podman system connections.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani 1d5ef29f01 Add podman farm subcommand
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:33 -04:00
Daniel J Walsh f55c48ad3a
podman stop --cidfile missing --ignore
Podman should ignore failures to find a cidfile when stoping the
container if the user specified --ignore

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-08 17:03:15 -04:00
OpenShift Merge Robot 1899d21212
Merge pull request #19544 from NitrogenUA/build-docs
[CI:DOCS] fixed couple typos in build docs
2023-08-08 11:01:40 -04:00
Oleh Dmytrychenko 8a410784b4
[CI:DOCS] fixed couple typos in build docs
Signed-off-by: Oleh Dmytrychenko <dmytrychenko.oleh@gmail.com>
2023-08-08 12:57:43 +03:00
OpenShift Merge Robot 2f50d8e579
Merge pull request #19425 from rhatdan/service
Add support for passing container stop timeout as -1 (infinite)
2023-08-08 04:52:33 -04:00
Ygal Blum 518daef729 [CI:DOCS] Quadlet - provide more information about network files
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-08-07 16:53:40 +03:00
OpenShift Merge Robot 9e18e9fafd
Merge pull request #19414 from rhatdan/systemd
Deprecate podman generate systemd
2023-08-04 20:06:41 +02:00
Daniel J Walsh 1e54539432
Add support for passing container stop timeout as -1 (infinite)
Compat api for containers/stop should take -1 value

Add support for `podman stop --time -1`
Add support for `podman restart --time -1`
Add support for `podman rm --time -1`
Add support for `podman pod stop --time -1`
Add support for `podman pod rm --time -1`
Add support for `podman volume rm --time -1`
Add support for `podman network rm --time -1`

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-04 08:36:45 -04:00
Erik Sjölund f5058f1483 [CI:DOCS] man: remove duplicate entry .LastUp
Fixes: https://github.com/containers/podman/issues/19462

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-08-04 08:47:08 +02:00
OpenShift Merge Robot 84dec22349
Merge pull request #19494 from rhatdan/codespell
Run codespell on code
2023-08-03 19:32:27 +02:00
OpenShift Merge Robot bde942e216
Merge pull request #19468 from flouthoc/manifest-add-compression
manifest, push: implement `--add-compression` to push with compressed variants.
2023-08-03 13:15:34 +02:00
Daniel J Walsh 62a22c5d60
Run codespell on code
Also cleanup --rm=true to be just --rm

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-03 07:00:30 -04:00
Daniel J Walsh 44f159ed31
Deprecate podman generate systemd
Now that Quadlets are fully supported, it is time to Depracate
podman generate systemd command.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-03 06:58:53 -04:00
OpenShift Merge Robot b8c9ad8982
Merge pull request #19482 from rhatdan/rmi
Make podman run --rmi automatically set --rm
2023-08-03 10:55:00 +02:00
Aditya R 346f9cb4ed
manifest/push: add support for --add-compression
Adds support for --add-compression which accepts multiple compression
formats and when used it will add all instances in a manifest list with
requested compression formats.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-03 14:20:38 +05:30
Adam Jones 15f35d3548
Remove unnecessary backslashes
Signed-off-by: Adam Jones <domdomegg+git@gmail.com>
2023-08-02 15:01:16 +01:00
Adam Jones 18e75daa53
[docs] Use code blocks for commands in podman-completion
Currently, due to sphinx smart quote features being enabled, fancy quotes are used in the commands. This means the docs are harder to use as the commands cannot be copy/pasted into a terminal.

Wrapping the code in code blocks fixes this. An alternative would be to disable smart quotes entirely, but this seems over-the-top (especially considering wrapping commands in code blocks harmonises this page with most of the other documentation)

Signed-off-by: Adam Jones <domdomegg+git@gmail.com>
2023-08-02 14:07:57 +01:00
Daniel J Walsh f3ebd798c6
Make podman run --rmi automatically set --rm
Forcing users to set --rm when setting --rmi is just bad UI.
If I want the image to be removed, it implies that I want the
container removed that I am creating.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-02 08:33:06 -04:00
OpenShift Merge Robot cd5ce63724
Merge pull request #19406 from rhatdan/volumes
Fix up man page and add test on globs
2023-08-02 13:44:34 +02:00
OpenShift Merge Robot 2252ed1241
Merge pull request #19436 from rhatdan/remote
Cleanup CIDFile on podman-remote run --rm command
2023-08-02 12:00:27 +02:00
danishprakash bfd2a8cad3
secret: add support for `--ignore` with rm
Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-08-02 11:13:08 +05:30
Daniel J Walsh 851cd9cca9
Cleanup CIDFile on podman-remote run --rm command
Currently the CIDFile is not removed with podman --remote run --rm
if the client and server are on different machines.

[NO NEW TESTS NEEDED] i
There is currently a test for this that does not fail because the client
and server are on the same machine.

If we run these tests on a MAC or Windows platform, they would start
failing.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-01 14:24:55 -04:00
Daniel J Walsh ee9fb3680d
Merge branch 'main' of github.com:containers/podman into volumes 2023-08-01 14:09:29 -04:00
Daniel J Walsh 33b8c451e5
Fix up man page and add test on globs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-01 10:28:00 -04:00
OpenShift Merge Robot 7d5f9de7a9
Merge pull request #19423 from rhatdan/man
[CI:DOCS] Mention no comment lines in Containerfile.in podman-build man page
2023-08-01 12:16:25 +02:00
OpenShift Merge Robot ad9015f478
Merge pull request #19096 from BlackHole1/support-new-line
feat(env): support multiline in env-file
2023-07-31 21:40:13 +02:00
Daniel J Walsh 6930f39a66
Update docs/source/markdown/podman-build.1.md.in
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-31 15:20:58 -04:00
OpenShift Merge Robot a52cefe6b9
Merge pull request #19431 from rhatdan/man1
[CI:DOCS] Improve the description of fields in podman-stats man page
2023-07-31 21:01:24 +02:00
OpenShift Merge Robot 6b404759f2
Merge pull request #19422 from rhatdan/read-only
make /dev & /dev/shm read/only when --read-only --read-only-tmpfs=false
2023-07-31 20:24:16 +02:00
Daniel J Walsh 4f1f88d7c3
Mention TimeoutStartSec in quadlet man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-31 11:43:56 -04:00
Daniel J Walsh acbe7703f9
Update docs/source/markdown/podman-stats.1.md.in
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-31 09:31:33 -04:00
Black-Hole1 c67ef7c1a1
docs(env-file): improve document description
Signed-off-by: Black-Hole1 <bh@bugs.cc>
2023-07-31 20:24:26 +08:00
Daniel J Walsh 630e7ba394
Improve the description of fields in podman-stats man page
Fixes: https://github.com/containers/podman/issues/15146

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-30 06:28:30 -04:00
Daniel J Walsh 22a8b68866
make /dev & /dev/shm read/only when --read-only --read-only-tmpfs=false
The intention of --read-only-tmpfs=fals when in --read-only mode was to
not allow any processes inside of the container to write content
anywhere, unless the caller also specified a volume or a tmpfs. Having
/dev and /dev/shm writable breaks this assumption.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-30 06:09:30 -04:00
Daniel J Walsh 663fe9446b
Mention no comment lines in Containerfile.in podman-build man page
Fixes: https://github.com/containers/podman/issues/13070

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-29 07:09:02 -04:00
Daniel J Walsh 0fefcf8a4f
Add glob support to podman run/create --mount
HPC Community asked for this support specifically for using GPUs
within containers. Nvidia requires the correct shared library to
to be present in the directory that matches the device mounted
into the container. These libraries have random suffixes based
on versions of the installed libraries on the host.

podman run --mount type=glob:src=/usr/lib64/nvidia\*:ro=true. This helps
quadlets be more portable for this use case.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-27 06:32:54 -04:00
OpenShift Merge Robot 9706147089
Merge pull request #19353 from vrothberg/fix-6160
add "healthy" sdnotify policy
2023-07-26 09:18:57 +02:00
Daniel J Walsh 1f455cf619
Merge pull request #19320 from eriksjolund/remove_unnecessary_please
Remove unnecessary use of the word "please"
2023-07-25 15:20:38 -04:00
Valentin Rothberg 0cfd12786f add "healthy" sdnotify policy
Add a new "healthy" sdnotify policy that instructs Podman to send the
READY message once the container has turned healthy.

Fixes: #6160
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-25 11:17:44 +02:00
OpenShift Merge Robot 22cb23b41e
Merge pull request #19297 from vrothberg/RUN-1865
add a podman-compose command
2023-07-25 03:30:38 +02:00
Daniel J Walsh 2a559dc1a1
Merge pull request #19230 from rhatdan/quadlet
Add support for ShmSize to quadlet
2023-07-24 14:11:36 -04:00
Valentin Rothberg e596b17fbe add a podman-compose command
**podman compose** is a thin wrapper around an external compose provider
such as docker-compose or podman-compose.  This means that `podman
compose` is executing another tool that implements the compose
functionality but sets up the environment in a way to let the compose
provider communicate transparently with the local Podman socket.  The
specified options as well the command and argument are passed directly
to the compose provider.

The default compose providers are `docker-compose` and `podman-compose`.
If installed, `docker-compose` takes precedence since it is the original
implementation of the Compose specification and is widely used on the
supported platforms (i.e., Linux, Mac OS, Windows).

If you want to change the default behavior or have a custom installation
path for your provider of choice, please change the `compose_provider`
field in `containers.conf(5)`.  You may also set the
`PODMAN_COMPOSE_PROVIDER` environment variable.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-24 19:23:04 +02:00
Daniel J Walsh 03ea93c21b
Merge pull request #19323 from eriksjolund/fix_language_typos_markdown_layout
Fix language, typos and markdown layout
2023-07-24 10:56:11 -04:00
Erik Sjölund b5ce0ab2de Fix language, typos and markdown layout
[NO NEW TESTS NEEDED]

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-07-24 11:18:25 +02:00
Ygal Blum cb5450af70 [CI:DOCS] Add note about QUADLET_UNIT_DIRS to simplify quadlet debug
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-07-24 10:23:02 +03:00
OpenShift Merge Robot 5dd8906e71
Merge pull request #19288 from IceWreck/quadlet-debugging-docs
[CI:DOCS] Add note on debugging quadlet unit files
2023-07-24 09:02:32 +02:00
Anchit Bajaj 0bb73bf554 Add note on debugging quadlet unit files
Signed-off-by: Anchit Bajaj <ab@abifog.com>
2023-07-24 05:06:09 +00:00
Erik Sjölund d4cfc498d7 Remove unnecessary use of the word "please".
Only use the word "please" in these situations:

- reader is asked to do something inconvenient
- reader is asked for permission
- reader is asked for forgiveness

Remove other uses of the word "please" to
make the language more efficient.

[NO NEW TESTS NEEDED]

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-07-23 17:31:29 +02:00
OpenShift Merge Robot 67f0340687
Merge pull request #18830 from harikannan512/new-18032-2
recursive call in user directories for unit files
2023-07-22 15:11:24 +02:00
Daniel J Walsh 3e534eff9d
Add support for ShmSize to quadlet
I am working on running android auto in a quadlet.

[Container]
AddDevice=/dev/dri/renderD128
AddDevice=/dev/kvm
DropCapability=all
Environment=PULSE_SERVER=$XDG_RUNTIME_DIR/pulse/native
Environment=WAYLAND_DISPLAY=wayland-0
Environment=XDG_RUNTIME_DIR
Image=quay.io/slopezpa/qemu-aaos
ContainerName=Android
PodmanArgs=--shm-size=5g
SecurityLabelDisable=true
Volume=$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR

And I need to be able to set the --shm-size option.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-22 06:41:39 -04:00