538 Commits

Author SHA1 Message Date
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
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
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
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
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
f98605e0e4 Merge pull request #9125 from ashley-cui/secretswiring
Implement Secrets
2021-02-09 17:51:08 +01:00
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
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
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
8f51d325af Merge pull request #9174 from bitstrings/master
Make slirp MTU configurable (network_cmd_options)
2021-02-03 06:51:23 -05:00
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
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
8f3bcf6247 Merge pull request #9144 from vrothberg/fix-9134
Revert "podman build --pull: use correct policy"
2021-01-29 13:27:19 -05:00
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
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
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
5d444466e1 Merge pull request #9106 from baude/issue9104
[CI:DOCS]update state of restful service
2021-01-26 17:26:01 +01:00
41dd1eb8a2 Merge pull request #9022 from cevich/swagger_upload
Cirrus: Upload swagger YAML in every context
2021-01-26 16:53:57 +01:00
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
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
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
23b879d72f Merge pull request #9085 from rhatdan/docs
Fix typo
2021-01-25 20:48:51 +01:00
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
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