520 Commits

Author SHA1 Message Date
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
0f1af6b37d Fix slashes in socket URLs
Signed-off-by: Anatoli Babenia <anatoli@rainforce.org>
2021-04-12 07:19:12 +03:00
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
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
d83f49ef6b Merge pull request #9754 from mheon/add_dep
Add --requires flag to podman run/create
2021-04-06 16:16:49 -04:00
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
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
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
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
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
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
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
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
2d824d85e1 Merge pull request #9888 from baude/machineign
podman machine init --ignition-path
2021-03-31 15:24:47 +02:00
a373e2fdf3 Merge pull request #9885 from ashley-cui/machinels
Add podman machine ls
2021-03-30 22:36:25 +02:00
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
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
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
08eab3f8f7 Merge pull request #9307 from Luap99/powershell-completion
Add powershell completions
2021-03-29 15:17:44 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
d2f3098c6f --no-header flag implementation for generate systemd
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-02-22 14:48:33 +01:00