212 Commits

Author SHA1 Message Date
7b00e49f65 Merge pull request #6560 from mheon/fix_exec_logdriver
Do not share container log driver for exec
2020-06-17 17:17:27 -04:00
6f1440a3ec Add support for the unless-stopped restart policy
We initially believed that implementing this required support for
restarting containers after reboot, but this is not the case.
The unless-stopped restart policy acts identically to the always
restart policy except in cases related to reboot (which we do not
support yet), but it does not require that support for us to
implement it.

Changes themselves are quite simple, we need a new restart policy
constant, we need to remove existing checks that block creation
of containers when unless-stopped was used, and we need to update
the manpages.

Fixes #6508

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-17 11:16:12 -04:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
89b4683cc4 Merge pull request #6372 from boaz0/gh_6283
Add --format to pod inspect
2020-05-27 09:59:25 -04:00
1f8a78747a Add --format to pod inspect
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2020-05-27 09:48:38 +03:00
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
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
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
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
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
8fe0e294b5 Merge pull request #6306 from fatherlinux/master
[CI:DOCS] Docs revamp.
2020-05-22 15:41:37 +02:00
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
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
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
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
a852afab2f Merge pull request #6270 from mheon/detached_exec
Implement detached exec
2020-05-21 16:02:52 +02:00
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
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
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
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
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
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
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
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
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
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
99bdafba99 podman: split env variables in env and overrides
There are three different priorities for applying env variables:

1) environment/config file environment variables
2) image's config
3) user overrides (--env)

The third kind are known to the client, while the default config and image's
config is handled by the backend.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-07 14:16:50 -04:00
1d3cdf9a46 Merge pull request #5961 from QiWang19/manifest-remove-push
Manifest remove, push
2020-05-07 19:10:32 +02:00
76b964485f [CI:DOCS] Add link to Tutorials to docs homepage
Just create a quick link to the tutorials on GitHub
so they'll show on docs.podman.io.  I've not done rst
format before, so fingers crossed!

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-06 20:22:19 -04:00
344084430e Update manpages for image volumes and MAC address
When reviewing the manpages for `podman run` to find options to
test, I found a few mistakes. The description of how we handle
image volumes is extremely outdated, and we now provide full
support for the `--mac-address` option. Update the docs for these
flags so they're accurate.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-06 14:30:51 -04:00
5621f5199d Manifest remove, push
Implements podman manifest remove and podman manifest push.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-06 10:54:28 -04:00
1090d4d5d9 manifest annotate
Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-05 15:01:32 -04:00
ef603de8ec search --limit compatible with docker
Check --limit range and update --limit manpage explanation.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-01 11:20:19 -04:00
ca1c674d2e Merge pull request #5966 from vrothberg/v2-pod-stats
implement pod stats
2020-04-27 16:15:09 +02:00
7cb46450fd Merge pull request #5973 from rhatdan/man
[ci:docs] Cleanup man pages for pull and push
2020-04-27 15:35:27 +02:00