289 Commits

Author SHA1 Message Date
7fea46752c support multi-image (docker) archives
Support loading and saving tarballs with more than one image.
Add a new `/libpod/images/export` endpoint to the rest API to
allow for exporting/saving multiple images into an archive.

Note that a non-release version of containers/image is vendored.
A release version must be vendored before cutting a new Podman
release.  We force the containers/image version via a replace in
the go.mod file; this way go won't try to match the versions.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-08 08:47:19 +02:00
ebfea2f4f8 APIv2 add generate systemd endpoint
Add support for generating systemd units
via the api and podman-remote.

Change the GenerateSystemdReport type to return the
units as map[string]string with the unit name as key.

Add `--format` flag to `podman generate systemd`
to allow the output to be formatted as json.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-02 22:06:19 +02:00
3c6603a2f8 Add support for variant when pulling images
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-28 09:36:11 -04:00
f49b98c610 Document override-arch and override-os
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-28 09:35:13 -04:00
7dce7a64ca [CI:DOCS] Update podman-remote docs
Add support for multi level subcommands.
e.g. podman system connection.

Update the flags and add note for containers.conf.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-27 20:03:06 +02:00
3a9d5248ac Merge pull request #7364 from TomSweeneyRedHat/dev/tsweeney/exposeport
Note port publishing needs in pods for create/run
2020-08-26 09:16:06 -04:00
52b14a2218 Update vendor of buildah to latest code
Fix podman build man pages to match buildah functionality.

Also document .dockerignore formatted files.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-25 08:13:28 -04:00
d856210ea8 podman: add option --cgroup-conf
it allows to manually tweak the configuration for cgroup v2.

we will expose some of the options in future as single
options (e.g. the new memory knobs), but for now add the more generic
--cgroup-conf mechanism for maximum control on the cgroup
configuration.

OCI specs change: https://github.com/opencontainers/runtime-spec/pull/1040

Requires: https://github.com/containers/crun/pull/459

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-08-21 19:06:05 +02:00
36b1ed0a26 [CI:DOCS] Include Go bindings tutorial
Include the Go bindings blog post as a tutorial

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-08-19 21:22:53 -04:00
eb9e8fc558 Add support for --connection
* override --url and/or --identity fields from containers.conf
* --connection flag has higher precedence than ActiveService from
containers.conf. Which is set via podman system connection default
* Add newline to error message printed on stderr
* Added --connection to bash completion and documentation
* Updated bindings to query server in case of no path or /

Closes #jira-991
Fixes #7276

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Squashed commits to work around CI issue
2020-08-19 08:37:44 -07:00
65b8bf795b Note port publishing needs in pods for create/run
Add notes to the podman-create and podman-run man pages
to note that ports do not need to be published and should not
be, for containers that will be part of a pod.

Addresses: #6769

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-08-19 09:21:31 -04:00
02e0d4ab38 fix podman create/run UTS NS docs
Add better error message when using `--pod` and `--hostname`.
Improve the docs to better explain the uts hostname relation.
Add more valid options for the `--uts` flag.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-18 18:00:49 +02:00
feff414ae1 run, create: add new security-opt proc-opts
it allows to customize the options passed down to the OCI runtime for
setting up the /proc mount.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-08-12 23:46:38 +02:00
95e73c65ae Add support for setting the CIDR when using slirp4netns
This adds support for the --cidr parameter that is supported
by slirp4netns since v0.3.0. This allows the user to change
the ip range that is used for the network inside the container.

Signed-off-by: Adis Hamzić <adis@hamzadis.com>
2020-08-12 17:30:13 +02:00
d31a881587 Merge pull request #7291 from edsantiago/man_page_subcommand_sort
[CI:DOCS] cross-reference .rst files
2020-08-11 14:58:10 -04:00
8e11a825e1 Cross-reference *.rst files too
There are a bunch of *.rst files in docs/source, linking sometimes
to man pages and sometimes to other .rst files. These files each
have entries of the following form:

   :doc:`foo <link-to-foo>` Description of foo

...for all podman sub and sub-subcommands 'foo'.

Read all .rst files and make sure that:

  - all entries in a given file are in alphabetical order
  - all link-to-foo targets point to existing doc files
  - every subcommand known by 'podman help' has a corresponding
    doc entry in a .rst file

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-08-11 08:03:37 -06:00
1ae8d2f096 Enable systemd mode for /usr/local/sbin/init
Podman 1.6.2 changed systemd mode auto-detection from commands ending in
``init`` to hard-coded paths ``/sbin/init`` and ``/usr/sbin/init``. This
broke FreeIPA container. ``podman run`` and ``podman create`` now
activate systemd mode when the command is ``/usr/local/sbin/init``.

Fixes: https://github.com/containers/podman/issues/7287
Signed-off-by: Christian Heimes <cheimes@redhat.com>
2020-08-11 11:41:14 +02:00
8f346c30c3 Add missing pages for docs.podman.io
Lots of references to man pages missing from docs.podman.io

Also fix sort order in man pages and other documents.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-10 19:35:23 -04:00
95e2e15a3f Merge pull request #7216 from 5eraph/master
support outbound-addr
2020-08-09 07:45:20 -04:00
5aaf6788f9 [CI:DOCS] BZ1860126 - Fix userns defaults in run man page
Addresses the multiple "default" userns values found
in the podman-run(1) man page:  http://docs.podman.io/en/latest/markdown/podman-run.1.html.

This in response to: https://bugzilla.redhat.com/show_bug.cgi?id=1860126
which this PR wil fix.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-08-07 15:42:13 -04:00
e6a5a56aa6 changes to support outbound-addr
Fixes #6064

Signed-off-by: Bohumil Cervenka <5eraph@protonmail.com>
2020-08-07 19:34:45 +02:00
919e5d4d6e Merge pull request #7209 from giuseppe/support-mount-devpts
podman: support --mount type=devpts
2020-08-04 12:14:47 +02:00
976e364a97 podman: support --mount type=devpts
Allow to create a devpts mount.

This is useful for containers that bind mount /dev/ from the host but
at the same time want to create a terminal.

It can be used as:

podman run -v /dev:/dev --mount type=devpts,target=/dev/pts ...

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-08-03 23:05:10 +02:00
7bedff9635 Do not set host IP on ports when 0.0.0.0 requested
Docker and CNI have very different ideas of what 0.0.0.0 means.
Docker takes it to be 0.0.0.0/0 - that is, bind to every IPv4
address on the host. CNI (and, thus, root Podman) take it to mean
the literal IP 0.0.0.0. Instead, CNI interprets the empty string
("") as "bind to all IPs".

We could ask CNI to change, but given this is established
behavior, that's unlikely. Instead, let's just catch 0.0.0.0 and
turn it into "" when we parse ports.

Fixes #7014

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-03 14:32:16 -04:00
c90ad68fa1 Change recommended systemd unit path for root.
`/usr/lib/systemd/system` should only be used by the package manager
administrators should use: `/etc/systemd/system` or
`/usr/local/lib/systemd/system`

see: man systemd.unit

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-01 14:55:48 +02:00
7f0c0941e8 Merge pull request #6851 from rhatdan/mount
Add podman image mount
2020-07-29 04:30:01 -04:00
409d07a181 System tests: add environment, volume tests
Tests for #7094, in which symlinks in a volume would
cause chown errors and nonrunnable containers.

Tests for environment variable precedence, now
include --env-host and proxy settings

Fix a bug caught by covscan in helpers.t ('source'
path would fail if path included spaces).

Fix podman-run man page: it was incorrect in stating
precedence between in-image environment and --env-host.

Fixes: #7099

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-07-28 09:22:22 -06:00
6979d140f1 Add podman image mount
There are many use cases where you want to just mount an image
without creating a container on it. For example you might want
to just examine the content in an image after you pull it for
security analysys.  Or you might want to just use the executables
on the image without running it in a container.

The image is mounted readonly since we do not want people changing
images.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 10:27:44 -04:00
288ebec6e7 Merge pull request #6909 from rhatdan/podman
Switch all references to github.com/containers/libpod -> podman
2020-07-28 10:12:55 -04:00
14f8085016 Merge pull request #7079 from rhatdan/tuturial
update configuration for rootless podman
2020-07-28 14:58:52 +02:00
a5e37ad280 Switch all references to github.com/containers/libpod -> podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 08:23:45 -04:00
8f7ed50cb2 Cleanup handling of podman mount/unmount
We should default to the user name unmount rather then the internal
name of umount.

Also User namespace was not being handled correctly. We want to inform
the user that if they do a mount when in rootless mode that they have
to be first in the podman unshare state.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-27 16:53:02 -04:00
7d0a5fc0da update configuration for rootless podman
I updated the configuration part of the tutorial on rootless podman. I added the
 order in which configuration files are read in and a hint, how users can create
 default configuration in the home directories.

Closes #6777

Signed-off-by: Niklas Netter <niknett@gmail.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-25 05:41:31 -04:00
22b1483902 Merge pull request #6938 from jwhonce/wip/n-connection
Refactor podman system connection
2020-07-24 17:01:40 +02:00
d9244761e4 Merge pull request #7041 from jkonowitch/reset-docs
Improve Docs for `podman system reset`
2020-07-24 11:00:50 +02:00
c10d5a5ebe Fix exit code example in podman-run.1.md
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2020-07-23 20:51:37 +02:00
65bcc2ba5f Update system.rst
Signed-off-by: Jeffrey Konowitch <jeff.konowitch@onepeloton.com>

Update podman-system-reset.1.md

Signed-off-by: Jeffrey Konowitch <jeff.konowitch@onepeloton.com>

PR feedback

Signed-off-by: Jeffrey Konowitch <jeff.konowitch@onepeloton.com>

remove errant punctuation

Signed-off-by: Jeffrey Konowitch <jeff.konowitch@onepeloton.com>
2020-07-23 12:38:24 -04:00
9db4c031ef Fix typos on documentation 'What is Podman' page
- Added a space between 'containers' and 'this' in the opening paragraph
- comming -> coming
- 'looking our' -> 'looking at our'

Signed-off-by: Luke Mitchell <luke@lpmitchell.com>
2020-07-23 15:13:05 +01:00
964d3300c6 [WIP] Refactor podman system connection
* Add support to manage multiple connections
  * Add connection
  * Remove connection
  * Rename connection
  * Set connection as default
  * Add markdown/man pages
* Fix recursion in hack/xref-helpmsgs-manpages

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-07-22 15:25:44 -07:00
59bad8bf71 Merge pull request #7006 from ashley-cui/umask
Add --umask flag for create, run
2020-07-22 05:40:32 -04:00
d4d3fbc155 Add --umask flag for create, run
--umask sets the umask inside the container
Defaults to 0022

Co-authored-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Ashley Cui <acui@redhat.com>
2020-07-21 14:22:30 -04:00
e5b3563a89 Merge pull request #7036 from rhatdan/docker
Add noop function disable-content-trust
2020-07-21 13:43:58 -04:00
5abf33de32 Merge pull request #7028 from xordspar0/patch-1
docs: Fix formatting mistake
2020-07-21 13:16:05 -04:00
111a1fe082 Document proxy env var precedence
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-07-21 10:11:05 -05:00
fc52aa6704 Add noop function disable-content-trust
People who use docker scripts with Podman see failures
if they use disable-content-trust flag.  This flag already
existed for podman build, adding it to pull/push/create/run.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-21 10:18:27 -04:00
25105b91db docs: Clarify how env var overriding works
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-07-21 08:50:55 -05:00
16e603147f docs: Fix formatting mistake
Part of this section was a code block, and part of it was absorbed into
the preceding normal paragraph.

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-07-20 20:27:58 -05:00
841eac0af6 Switch references from libpod.conf to containers.conf
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-20 15:09:54 -04:00
020d81f113 Add support for overlay volume mounts in podman.
Add support -v for overlay volume mounts in podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-07-20 09:48:55 -04:00
d86bae2a01 Merge pull request #6965 from giuseppe/followup-pr6324
allow switching of port-forward approaches in rootless/using slirp4netns
2020-07-17 04:44:49 -04:00