Commit graph

916 commits

Author SHA1 Message Date
Matthew Heon 0e171b7b33 Do not share container log driver for exec
When the container uses journald logging, we don't want to
automatically use the same driver for its exec sessions. If we do
we will pollute the journal (particularly in the case of
healthchecks) with large amounts of undesired logs. Instead,
force exec sessions logs to file for now; we can add a log-driver
flag later (we'll probably want to add a `podman logs` command
that reads exec session logs at the same time).

As part of this, add support for the new 'none' logs driver in
Conmon. It will be the default log driver for exec sessions, and
can be optionally selected for containers.

Great thanks to Joe Gooch (mrwizard@dok.org) for adding support
to Conmon for a null log driver, and wiring it in here.

Fixes #6555

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-17 11:11:46 -04:00
Jhon Honce 2e22e18afb Add deprecated message to varlink command
* Remove varlink references from the man pages
* Fix signature for extractTarFile()

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-06-15 11:41:57 -07:00
Valentin Rothberg fe488b5f11 pod create --replace
Add a `--replace` flag to the `pod create` command.  If another pod with
the same name already exists, it will be replaced and removed.

Adding this flag is motivated by #5485 to make running Podman in systemd
units (or any other scripts/automation) more robust.  In case of a
crash, a pod may not be removed by a sytemd unit anymore.  The
`--replace` flag allows for supporting crashes.

Note that the `--replace` flag does not require the `--name` flag to be
set, so it can be set unconditionally in `podman generate systemd`.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-15 15:55:55 +02:00
Valentin Rothberg fa3b8a75c4 {create,run} --replace
Add a `--replace` flag to the `container {create,run}` commands.
If another container with the same name already exists, it will
be replaced and removed.

Adding this flag is motivated by #5485 to make running Podman in systemd
units (or any other scripts/automation) more robust.  In case of a
crash, a container may not be removed by a sytemd unit anymore.  The
`--replace` flag allows for supporting crashes.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-15 15:53:51 +02:00
OpenShift Merge Robot 1408dbfa4d
Merge pull request #6551 from QiWang19/doc-check-auth
update document login see config.json as valid
2020-06-11 14:39:50 -04:00
Qi Wang b1f8aac056 update document login see config.json as valid
Update the document, pointing out podman credentials from $HOME/.docker/config.json can be used by Podman.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-06-11 13:24:21 -04:00
Valentin Rothberg 139f82933d docs: create/run fix --pod-id-file description
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-11 11:01:13 +02:00
Valentin Rothberg 8d8746adee generate systemd: create pod template
Create a new template for generating a pod unit file. Eventually, this
allows for treating and extending pod and container generation
seprately.

The `--new` flag now also works on pods.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-11 11:01:13 +02:00
Valentin Rothberg 402c68b41d pod create: add --infra-conmon-pidfile
Add an `--infra-conmon-pidfile` flag to `podman-pod-create` to write the
infra container's conmon process ID to a specified path.  Several
container sub-commands already support `--conmon-pidfile` which is
especially helpful to allow for systemd to access and track the conmon
processes.  This allows for easily tracking the conmon process of a
pod's infra container.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-11 11:01:13 +02:00
Valentin Rothberg cf89bb6711 container-{create,run}: add --pod-id-file
Allow containers to join an existing pod via the `--pod-id-file` which
is already supported by a number of `podman-pod` subcommands.  Also add
tests to make sure it's working and to prevent future regressions.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-11 11:01:13 +02:00
Valentin Rothberg 7d71d24440 podman-pod{rm,start,stop}: support --pod-id-file
Support the `--pod-id-file` flag in the rm, start and stop pod commands.
This completes the already support flag in pod-create and is another
prerequisite for generating generic systemd unit files for pods.

Also add completions, docs and tests.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-11 11:01:13 +02:00
Valentin Rothberg 99cbe59917 podman-events: clarify streaming behaviour
Unless `--since` or `--until` is specified, `podman events` will stream
new events.  Clarify this behavior in the `--help` message and man page
to avoid confusion.

Fixes: #6536
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-10 11:09:12 +02:00
Chris Evich 4314336ce3
Improve swagger+CORS metadata docs
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-06-09 09:53:19 -04:00
Brent Baude d023909c0b add socket information to podman info
this is step 1 to self-discovery of remote ssh connections.  we add a remotesocket struct to info to detect what the socket path might be.

Co-authored-by: Jhon Honce <jhonce@redhat.com>
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-06-03 15:20:37 -05:00
Jhon Honce cbca625328 V2 Add support for ssh authentication methods
* podman --remote ssh://<user>:<password>@<host>:<port><path>
* podman --remote ssh://<user>:<password>@<host>:<port><path> \
  --identity <path> --passphrase <phrase>
* ssh-add <key>
  podman --remote ssh://<user>@<host><path>
* Fix `podman help` to run even if podman missing components
* Prompt for passphrase on stdin IFF key is protected and passphrase
  not given via any other configuration

* cobra flags do not support optional value flags therefore refactored
  --remote to be a boolean and --url will now contain the URI to Podman
  service

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-06-03 09:54:39 -07:00
OpenShift Merge Robot 2c6016f330
Merge pull request #6438 from rhatdan/man
[CI:DOCS] Update man pages for --ip with CNI networks
2020-06-01 15:37:19 +02:00
Matthew Heon eb9788db23
Update man pages for --ip with CNI networks
Originally, we did not allow this, and the manpage reflects that.
We added support with 1.7.0, but did not update the manpage. Fix
the manpages so they are once again accurate.

Signed-off-by: Matthew Heon <mheon@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-31 06:02:34 -04:00
TomSweeneyRedHat bc1f5ef36e [CI:DOCS] update httpd location in tutorial
Update the reference to the httpd in the Podman tutorial.
This just bumps it to F29 for now to get things working,
I'd prefer to get something set up in quay.io to make it
more resistant to Fedora version changes.

Fixes: #6439

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-30 13:51:44 -04:00
OpenShift Merge Robot 78c38460eb
Merge pull request #6380 from mheon/fix_mount_readonly
Add support for `readonly` option to --mount
2020-05-29 08:26:05 -04:00
OpenShift Merge Robot 89b4683cc4
Merge pull request #6372 from boaz0/gh_6283
Add --format to pod inspect
2020-05-27 09:59:25 -04:00
Boaz Shuster 1f8a78747a Add --format to pod inspect
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2020-05-27 09:48:38 +03:00
Matthew Heon e26f9eda64 Add support for readonly option to --mount
This is just an alias to the `ro` option, but it's already in the
manpages (and Docker) so we might as well add support for it.

Fixes #6379

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-26 16:05:11 -04:00
Damiano Donati 26c8a826a6
docs: fix typo
- Similar is misspelled
- a `to` is missing after Similar

Signed-off-by: Damiano Donati <damiano.donati@gmail.com>
2020-05-26 20:59:40 +01:00
TomSweeneyRedHat c79c69f275 [CI:DOCS] Tweak casing in rootless doc
I just noticed a few 'podman' references that should be
'Podman' in the rootless doc.  This fixes it.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-26 10:55:34 -04:00
OpenShift Merge Robot 1077d2d0b7
Merge pull request #6321 from Luap99/podman-generate-systemd-unit-prefix
Allow to change the generated systemd unit name prefix
2020-05-25 06:46:17 -04:00
OpenShift Merge Robot b4cd54a2fa
Merge pull request #6309 from cortopy/nonroot_vol_docs
add section on rootless volumes in the docs
2020-05-24 06:37:30 -04:00
Juan Jimenez-Anca bf32a5c67d add section on rootless volumes
Signed-off-by: Juan Jimenez-Anca <cortopy@users.noreply.github.com>
2020-05-23 15:58:05 +01:00
TomSweeneyRedHat 91511272d0 [CI:DOCS] Fix readthedocs link
Touch up the link to the docs on readthedocs.  Using the fully
specified link like this will cause a CORS issue in many browsers.

Plus we're working on a Spanish variant of the site, so we probably
should point to the English variant.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-22 18:18:37 -04:00
Daniel J Walsh 35567e706b
Attempt to turn on additional build tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-22 12:55:23 -04:00
Luap99 e704f1362a Added new flags to 'podman generate systemd' to change the unit name prefix
--container-prefix <string> - default 'container'
Systemd unit name prefix for containers

--pod-prefix <string> - default 'pod'
Systemd unit name prefix for pods

--separator <string> - default '-'
Systemd unit name seperator between name/id and prefix

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-05-22 18:38:39 +02:00
OpenShift Merge Robot 8fe0e294b5
Merge pull request #6306 from fatherlinux/master
[CI:DOCS] Docs revamp.
2020-05-22 15:41:37 +02:00
Scott McCarty 176f38c25b [CI:DOCS] Docs revamp.
* Rewrote the Home and Introduction pages.
* Created a dedicated Search page
* Rewrote the Tutorials page to have native links in RTD/Shpinx
* Added iframe to Reference page to display API reference docs inline

Signed-off-by: Scott McCarty <scott.mccarty@gmail.com>
2020-05-21 17:16:10 -04:00
Daniel J Walsh 7b188f7b5b
podman version --format ... was not working
This patch fixes the podman --version --format command.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-21 16:31:34 -04:00
Daniel J Walsh 17171aecf4
Display human build date in podman info
Currently we are displaying the Seconds since EPOCH
this will change to displaying date, similar to `podman version`

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-21 16:31:34 -04:00
OpenShift Merge Robot c3b6e623bb
Merge pull request #6320 from rhatdan/skip
Start testing with cross compilation
2020-05-21 19:35:39 +02:00
Daniel J Walsh 2e7d2c2f47
Start testing with cross compilation
Add missing man page links for podman-image-search and
podman-image-diff

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-21 11:58:15 -04:00
OpenShift Merge Robot 8b49d10550
Merge pull request #6310 from mheon/update_api_tutorial
Update Derivative API tutorial to reflect the HTTP API
2020-05-21 16:11:20 +02:00
OpenShift Merge Robot a852afab2f
Merge pull request #6270 from mheon/detached_exec
Implement detached exec
2020-05-21 16:02:52 +02:00
Matthew Heon 9ceff66a7d Update Derivative API tutorial to reflect the HTTP API
Once the HTTP API becomes stable, I think we want to drive people
towards using it, as opposed to directly calling our CLI (when
possible).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 17:35:24 -04:00
OpenShift Merge Robot 588df90397
Merge pull request #6161 from kunalkushwaha/network-inspect
`--format` and `--filter` options for `network ls` and `network inspect` command
2020-05-20 23:32:52 +02:00
Matthew Heon 6330e7bd32 Update manpage for podman exec to include detach flag
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:16:58 -04:00
Matthew Heon 5ec56dc790 Add ability to clean up exec sessions with cleanup
We need to be able to use cleanup processes to remove exec
sessions as part of detached exec. This PR adds that ability. A
new flag is added to `podman container cleanup`, `--exec`, to
specify an exec session to be cleaned up.

As part of this, ensure that `ExecCleanup` can clean up exec
sessions that were running, but have since exited. This ensures
that we can come back to an exec session that was running but has
since stopped, and clean it up.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-20 16:11:05 -04:00
Kunal Kushwaha ade20f3323 format option added to network inspect command.
This helps user to print the inspect output in go template format.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2020-05-20 02:53:47 +00:00
Kunal Kushwaha 1dde2730e8 filter option added to network ls command.
filter option helps to filter output based on name or supported plugins
by CNI networks.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2020-05-20 02:53:47 +00:00
Ondřej Kraus 9177c89edd
Give auto-update ability to use per-container authfile specified by label.
Signed-off-by: Ondřej Kraus <neverberlerfellerer@gmail.com>
2020-05-17 11:37:12 +02:00
Qi Wang 28ffe74e44 fix bug --format {{json.}} of events
Allow the `podman events --format` accept {{json.}} and complete small fix podman-events.1.md

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-14 14:28:51 -04:00
Valentin Rothberg 1c3bd95b81 auto-update: support authfiles
Support using custom authfiles for auto updates by adding a new
`--authfile` flag and passing it down into the backend.

Also do some minor fixes in the help text and the man page.

Fixes: #6159
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-12 10:20:48 +02:00
OpenShift Merge Robot 428246d4e4
Merge pull request #6106 from mheon/fix_manpages
[CI:DOCS] Update manpages for image volumes and MAC address
2020-05-08 19:42:09 +02:00
OpenShift Merge Robot fa7589b6a6
Merge pull request #6133 from e-minguez/only_bridge_man_podman_network_create
[CI:DOCS] Fixed typo on podman network create man
2020-05-08 17:39:05 +02:00
Eduardo Minguez Perez 161fc5e264 Fixed typo on podman network create man
Signed-off-by: Eduardo Minguez Perez <e.minguez@gmail.com>
2020-05-08 13:18:23 +02:00