2106 Commits

Author SHA1 Message Date
1128e5b410 Merge pull request #23072 from marinmo/update-systemd-unit.md
[CI:DOCS] Add information about Type=oneshot units in podman-systemd.unit.5.md (fixes #22233)
2024-06-24 12:27:59 +00:00
945226a844 fix #22233
Add information about Type=oneshot units as suggested in https://github.com/containers/podman/issues/22233

Signed-off-by: marinmo <bugzilla@marinmo.org>
2024-06-23 19:11:51 +02:00
e4f64f91fe fix #20686
Change the document to only use true/false for booleans. Fixes https://github.com/containers/podman/issues/20686.

Signed-off-by: marinmo <bugzilla@marinmo.org>
2024-06-22 22:17:24 +02:00
42a01c0f0c Merge pull request #22967 from rhatdan/build
Remove references to --pull=true and --pull=false
2024-06-21 19:27:36 +00:00
dca94be028 [CI:DOCS] Quadlet - add note about relative path resolution
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-06-17 17:32:34 +03:00
00bcd9aa81 Merge pull request #22733 from nalind/system-check
Add `podman system check`
2024-06-13 10:35:56 +00:00
64091777fe Remove references to --pull=true and --pull=false
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-06-12 18:16:29 +02:00
5a4416be08 [CI:DOCS] Fix typos in podman-build
Fix two typos in podman build as reported by #22946

FIXES: #22946

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-06-12 08:03:48 -05:00
798beb47ec Merge pull request #22694 from jmaibaum/quadlet-build
Quadlet: Add support for .build files
2024-06-11 20:41:28 +00:00
fec58a4571 Add podman system check for checking storage consistency
Add a `podman system check` that performs consistency checks on local
storage, optionally removing damaged items so that they can be
recreated.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-06-04 10:00:37 -04:00
9f823ecb25 Quadlet: Add support for .build files
.build files allow to build an image via Quadlet. The keys from a .build
file are translated to arguments of a `podman build` command by Quadlet.

Minimal keys for .build files are `ImageTag=` and a context directory,
see `SetWorkingDirectory=`, or a `File=` pointing to a Containerfile.

After sorting .build files into the Quadlet dependency order, there
remains a possible dependency cycle issue between .volume and .build
files: A .volume can have `Image=some.build`, and a .build can have
`Volume=some.volume:/some/volume`.

We solve this dependency cycle by prefilling resourceNames with all
image names from .build files before converting all the unit files.

This results in an issue for the test suite though: For .volume's
depending on *.image or *.build, we need to copy these additional
dependencies to the test's quadletDir, otherwise the test will fail.
This is necessary, because `handleImageSource()` actually needs to know
the image name defined in the referenced *.{build,image} file. It cannot
fall back on the default names, as it is done for networks or volumes,
for example.

Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
2024-05-27 16:59:39 +02:00
9c92bc64a7 fix typo in Tutorials.rst
Signed-off-by: Elliot Ford <elliot.ford@hotmail.co.uk>
2024-05-23 16:15:40 +01:00
eee0dc256a Merge pull request #22727 from mheon/chown_all_the_time
Always chown volumes when mounting into a container
2024-05-23 12:34:07 +00:00
046c0e5fc2 Only stop chowning volumes once they're not empty
When an empty volume is mounted into a container, Docker will
chown that volume appropriately for use in the container. Podman
does this as well, but there are differences in the details. In
Podman, a chown is presently a one-and-done deal; in Docker, it
will continue so long as the volume remains empty. Mount into a
dozen containers, but never add content, the chown occurs every
time. The chown is also linked to copy-up; it will always occur
when a copy-up occurred, despite the volume now not being empty.
This PR changes our logic to (mostly) match Docker's.

For some reason, the chowning also stops if the volume is chowned
to root at any point. This feels like a Docker bug, but as they
say, bug for bug compatible.

In retrospect, using bools for NeedsChown and NeedsCopyUp was a
mistake. Docker isn't actually tracking this stuff; they're just
doing a copy-up and permissions change unconditionally as long as
the volume is empty. They also have the two linked as one
operation, seemingly, despite happening at very different times
during container init. Replicating that in our stateful system is
nontrivial, hence the need for the new CopiedUp field. Basically,
we never want to chown a volume with contents in it, except if
that data is a result of a copy-up that resulted from mounting
into the current container. Tracking who did the copy-up is the
easiest way to do this.

Fixes #22571

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2024-05-22 17:47:01 -04:00
ad1d3f8fc7 quadlet: Add a network requirement on .image units
If a container unit starts on boot with a dependency on `default.target`
the image unit may start too soon, before network is ready. This cause
the unit to fail to pull the image.
- Add a dependency on `network-online.target` to make sure image pulls
don't fail.
See https://github.com/containers/podman/issues/21873

- Document the hardcoded dependency on `network-online.target` for images unit
and explain how it can be overriden if necessary.

- tests/e2e/quadlet: Add `assert-last-key-regex`

Required to test the `After=` override in [Unit] section
See https://github.com/containers/podman/pull/22057#issuecomment-2008959993

- quadlet/unitfile: add a prepenUnitLine method

Requirements on networks should be inserted at the top of the
section so the user can override them.

Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2024-05-22 13:46:42 +02:00
d0ed27118a Merge pull request #22594 from radar07/default-rootless-network-docs
[CI:DOCS] Update podman network docs
2024-05-21 13:55:56 +00:00
9a8c3433c1 [CI:DOCS] Update podman network docs
Update the podman network docs to specify that the default rootless
networking tool has been swapped from slirp4netns to pasta.

Signed-off-by: Pranav RK <pranavrk7@gmail.com>
2024-05-17 19:05:31 +05:30
fe7cc67ef4 Add Rosetta support for Apple Silicon mac
Signed-off-by: Shion Tanaka <shtanaka@redhat.com>
2024-05-17 17:53:28 +09:00
6d1098f823 Quadlet/Container: Add GroupAdd option
Co-authored-by: Ygal Blum <ygal.blum@gmail.com>
Signed-off-by: Jonas Berlin <xkr47@outerspace.dyndns.org>
2024-05-08 16:00:28 +03:00
3c1c6a44ef Correct option name ip -> ip6
Also, properly capitalize.

Signed-off-by: Sander Maijers <3374183+sanmai-NL@users.noreply.github.com>
2024-04-25 22:17:06 +02:00
30e2c923d6 Add the ability to automount images as volumes via play
Effectively, this is an ability to take an image already pulled
to the system, and automatically mount it into one or more
containers defined in Kubernetes YAML accepted by `podman play`.

Requirements:
- The image must already exist in storage.
- The image must have at least 1 volume directive.
- The path given by the volume directive will be mounted from the
  image into the container. For example, an image with a volume
  at `/test/test_dir` will have `/test/test_dir` in the image
  mounted to `/test/test_dir` in the container.
- Multiple images can be specified. If multiple images have a
  volume at a specific path, the last image specified trumps.
- The images are always mounted read-only.
- Images to mount are defined in the annotation
  "io.podman.annotations.kube.image.automount/$ctrname" as a
  semicolon-separated list. They are mounted into a single
  container in the pod, not the whole pod.

As we're using a nonstandard annotation, this is Podman only, any
Kubernetes install will just ignore this.

Underneath, this compiles down to an image volume
(`podman run --mount type=image,...`) with subpaths to specify
what bits we want to mount into the container.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-25 14:12:27 -04:00
693ae0ebc6 Add support for image volume subpaths
Image volumes (the `--mount type=image,...` kind, not the
`podman volume create --driver image ...` kind - it's strange
that we have two) are needed for our automount scheme, but the
request is that we mount only specific subpaths from the image
into the container. To do that, we need image volume subpath
support. Not that difficult code-wise, mostly just plumbing.

Also, add support to the CLI; not strictly necessary, but it
doesn't hurt anything and will make testing easier.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-25 14:12:27 -04:00
ac963a7036 Merge pull request #22453 from MHBauer/format-docs-example
[CI:DOCS] format podman-pull example as code
2024-04-22 10:16:48 +00:00
c2cadfb5c5 Merge pull request #22322 from mheon/update_the_config
Make `podman update` changes persistent
2024-04-22 07:50:48 +00:00
27174ff3fb [CI:DOCS] format podman-pull example as code
Signed-off-by: Morgan Bauer <bauer.morgan@gmail.com>
2024-04-21 19:46:39 -07:00
dc68a47d7a fix podman-pod-restart.1.md typo
Small typographical error:
"an restarted" -> "and restarted"

Signed-off-by: Chad Dougherty <crd@acm.org>
2024-04-18 19:53:33 -04:00
422eb0e58a Add more annnotation information to podman kupe play man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-18 09:36:44 -04:00
482ef7bfcf Add support for updating restart policy
This is something Docker does, and we did not do until now. Most
difficult/annoying part was the REST API, where I did not really
want to modify the struct being sent, so I made the new restart
policy parameters query parameters instead.

Testing was also a bit annoying, because testing restart policy
always is.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-17 08:23:51 -04:00
be3f075402 Make podman update changes persistent
The logic here is more complex than I would like, largely due to
the behavior of `podman inspect` for running containers. When a
container is running, `podman inspect` will source as much as
possible from the OCI spec used to run that container, to grab
up-to-date information on things like devices. We don't want to
change this, it's definitely the right behavior, but it does make
updating a running container inconvenient: we have to rewrite the
OCI spec as part of the update to make sure that `podman inspect`
will read the correct resource limits.

Also, make update emit events. Docker does it, we should as well.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-17 08:23:50 -04:00
d4ecae59bd [CI:DOCS] options/network: fix markdown lists
Markdown needs lists to be separate paragraphs, otherwise all the items
end up in a single line.

I also made arguments to be replaced italic to clarify that they
shouldn't be typed exactly as shown.

Signed-off-by: Baltazár Radics <baltazar.radics@gmail.com>
2024-04-16 10:59:30 +02:00
8de92ec912 docs: fix missleading run/create --expose description
The --expose option doesn't actually affect port forwarding or anything
like that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-10 14:24:32 +02:00
0bedf7f1d2 podman ps: show exposed ports under PORTS as well
Docker shows exposed ports as just PORT/PROTO so match that behavior. It
is not clear to me why someone needs that information in ps as "expose"
doesn't effect anything networking related.

Fixes https://issues.redhat.com/browse/RHEL-32154

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-10 14:24:23 +02:00
36e4d512b3 docs: update Quadlet volume Options desc
Signed-off-by: localhost <xpaomian@gmail.com>
2024-04-09 11:37:20 +08:00
71f6f50ee1 [CI:DOCS] Update kube docs
Update kube docs stating the support of moving to and from
k8s in podman and explicitly stating that we are not replicating
the kubectl cli.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-04-04 09:28:21 -04:00
d2143fac59 s3fs docs
Signed-off-by: WesselAtWork <115667066+WesselAtWork@users.noreply.github.com>
2024-04-03 10:18:49 +00:00
d3927f9076 Add note about host networking to Kube PublishPort option
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
2024-04-02 10:44:45 -04:00
f7b9168649 docs/podman-login: Give an example of writing the persistent path
The way `podman login` works by default is fundamentally different
from `docker login` and this causes a lot of confusion, and I
have seen multiple bad suggestions for ways to address this
such as setting `XDG_RUNTIME_DIR`.

Let's document up front how to write to the persistent path.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-03-28 13:04:47 -04:00
17aa152459 chore: remove repetitive words
Signed-off-by: availhang <mayangang@outlook.com>
2024-03-22 15:11:29 +08:00
1141962e2a xref-helpmsgs-manpages: cross-check Commands.rst
Belated followup to #21981. (Looks like I started to add this
functionality back in 2020 but left it unfinished. Tsk tsk.)

docs/source/Commands.rst is unnecessary duplication. It _should_
be autogenerated, but I can't figure out how to cleanly add
that to our Make process. This PR is an interim cross-check
until we get that resolved:

  - everything in podman --help must have a matching entry
    in Commands.rst (top-level commands only)

  - check for dups and out-of-sequence in Commands.rst
    - also for anything in Commands.rst that is not in --help

Fix existing mismatches in Commands.rst.

Also, #21784 removed a format specifier that I was using in
regression tests. Switch to using something else, to get
test passing again. Given the fact the correct solution
is autogenerating Commands.rst, I choose not to add new
tests for the rst xref.

Also, executive decision, remove volume.rst. It is not referenced
from anywhere, it looks like a lonely orphan remnant from days
of yore.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-03-18 09:09:25 -06:00
068ddfd19f update API doc version to 5.0.0
Also update the website to display the correct swagger doc for the right
version, the 5.0 swagger file will not exist until we branch but I added
it anyway so we do not forget it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-12 12:06:15 +01:00
52ed774c23 docs: generate-systemd: add clarification statement
Based on user feedback, I think it's time to clarify that there are no
plans to remove generate-systemd.  Deprecation here means that the
command will not receive new features but only urgent bug fixes.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2024-03-11 09:03:36 +01:00
3d6758a61d docs: quadlet: improve docs on root/rootless dirs
Make the docs more explicit on which directories are read for root and
rootless users to avoid confusion [1].

[1] https://github.com/containers/podman/discussions/20218#discussioncomment-8721351

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2024-03-11 09:00:43 +01:00
6f4ee16d94 [CI:DOCS] Add farm command to commands list
Add the farm command to the commands list so
that it is rendered correctly in readthedocs.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-03-07 10:18:52 -05:00
9ee96a9569 properly implement pull-error event status
Commit 03f6589f3 added basic support for pull-error event from libimage
but it contains several problems:
1. storing the error as error type prevents it from being unmarshalled,
   thus change it to a string
2. the error was never propagated from the libimage event to the podman
   event struct
3. the error message was not wired into the cli and API

This commit fixes these problems.

Fixes #21458

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-05 10:50:42 +01:00
87729cc666 Merge pull request #21862 from ashley-cui/ocidisk
Use machine image as specified in containers.conf
2024-02-29 20:51:23 +00:00
527b3793b8 Use machine image as specified in containers.conf
For podman machine init, deprecate the --image-path option for --image.
--image now accepts the correct image from containers.conf

Also, add the ability to specify an OCI image from the --image flag using the docker:// transport.

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-02-29 13:38:43 -05:00
2bbed8f200 Add man page content for artifacts
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 11:47:44 -05:00
66d60384f4 add --retry --retry-delay to podman run/create
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
c3c0c4ab96 Add support for podman push --retry --retry-delay
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
690b671ecd Merge pull request #20774 from giuseppe/passthrough-tty
logging: new mode -l passthrough-tty
2024-02-29 12:43:36 +00:00