Commit graph

682 commits

Author SHA1 Message Date
Robert P. J. Day ee23622ca5 docs/podman-rm.1.md: delete "Not yet implemented" msg for volume removal
Since this feature appears to be implemented, remove the qualifier.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2019-03-30 18:30:41 -04:00
Robert P. J. Day 1f78a80bf1 docs/podman-inspect.1.md: add missing option hyphen for "-t"
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2019-03-30 13:35:38 -04:00
Daniel J Walsh 455312361b
Fix location of libpod.conf
libpod.conf defaults to /usr/share/containers/libpod.conf.

Clarify how administrators can override it and the location
of the users version for rootless mode.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-30 07:39:05 -04:00
Matthew Heon 99318b0894 Remove wait event
It's not necessary to log an event for a read-only operation like
wait.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-29 14:50:43 -04:00
OpenShift Merge Robot f4d90a96cb
Merge pull request #2691 from baude/psdynamic
Add watch mode to podman ps
2019-03-29 07:59:11 -07:00
OpenShift Merge Robot 9b789359f1
Merge pull request #2575 from haircommander/hotfix_play_kube
Default to SELinux private label for play kube mounts
2019-03-29 05:47:02 -07:00
OpenShift Merge Robot 376a89c7a4
Merge pull request #2524 from ekultails/podman-ps_man_page_status
Add all possible container status states to the podman-ps manual page.
2019-03-29 05:33:03 -07:00
Peter Hunt 0d0ad59641 Default to SELinux private label for play kube mounts
Before, there were SELinux denials when a volume was bind-mounted by podman play kube.
Partially fix this by setting the default private label for mounts created by play kube (with DirectoryOrCreate)
For volumes mounted as Directory, the user will have to set their own SELinux permissions on the mount point

also remove left over debugging print statement

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-03-28 09:54:31 -04:00
baude 3423c5a8c9 Add watch mode to podman ps
allows users to "watch" the output of podman ps on a set interval in
seconds. in watch mode, the screen is cleared between intervals as well.

podman -ps -w1 watches on 1 second intervals

Signed-off-by: baude <bbaude@redhat.com>
2019-03-28 08:34:27 -05:00
Luke Short 68ba4154e3 Add all container status states to the podman-ps manual page.
Signed-off-by: Luke Short <ekultails@gmail.com>
2019-03-28 09:17:18 -04:00
Qi Wang 2729695892 fix bug system df add blank space to the output
fix typo in Containers space usage: of podman system df -v, add a space for created time Change format string to const

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-28 09:13:40 -04:00
OpenShift Merge Robot 340eeec1b6
Merge pull request #2747 from mheon/dns_none
Add --dns=none
2019-03-27 10:49:42 -07:00
Pat Riehecky 1a9252e25c doc: add note that pod publish ports are static once defined
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2019-03-27 12:08:47 -05:00
Matthew Heon 0cd92eae65 Resolve review comments
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 10:12:18 -04:00
Matthew Heon 323dc526ce Add manpages and completions for dns=none and no-hosts
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 10:12:18 -04:00
OpenShift Merge Robot fcbca91dca
Merge pull request #2749 from jcpunk/doc
docs/podman-pod-create.1.md: add example with port mapping
2019-03-27 02:17:02 -07:00
OpenShift Merge Robot 9e556530d2
Merge pull request #2498 from QiWang19/sysdf
podman system df- show podman disk usage
2019-03-26 04:51:06 -07:00
Qi Wang 25e0f87069 system df to show podman disk usage
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-25 15:05:26 -04:00
Pat Riehecky fc19720218 docs/podman-pod-create.1.md: add example with port mapping
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
2019-03-25 08:09:14 -05:00
baude bb69004b8c podman health check phase3
podman will not start a transient service and timer for healthchecks.
this handles the tracking of the timing for health checks.

added the 'started' status which represents the time that a container is
in its start-period.

the systemd timing can be disabled with an env variable of
DISABLE_HC_SYSTEMD="true".

added filter for ps where --filter health=[starting, healthy, unhealthy]
can now be used.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-22 14:58:44 -05:00
OpenShift Merge Robot f611f382d1
Merge pull request #2541 from TomSweeneyRedHat/dev/tsweeney/docpull
Update pull and pull-always in bud man page
2019-03-21 07:36:56 -07:00
OpenShift Merge Robot eeda995e78
Merge pull request #2719 from rhatdan/man
Fix man page to mention race condition
2019-03-21 07:15:55 -07:00
OpenShift Merge Robot b83d05722f
Merge pull request #2727 from clebergnu/podman_run_1_readonly
docs/podman-run.1.md: remove extra whitespace in --read-only
2019-03-21 07:00:06 -07:00
Daniel J Walsh 6c812c3472
Fix man page to mention race condition
Also modify man page to talk about podman-container-logs as well as podman-logs.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-20 17:25:08 -04:00
Cleber Rosa e936b1da5f docs/podman-run.1.md: remove extra whitespace in --read-only
Signed-off-by: Cleber Rosa <crosa@redhat.com>
2019-03-20 17:10:07 -04:00
Ed Santiago beb71323b1 man pages - consistency fixes
podman-generate and -play had the wrong NAMEs.

podman-restart and -volume-prune the wrong SYNOPSIS.

All the rest are varying degrees of minor:

  - missing a space between the NAME and description
  - multi-line SYNOPSIS that could be collapsed into one
  - use of UPPER CASE in synopsis instead of *asterisks*
  - improper use of **double asterisks** for options
  - varlink and version were transposed in podman-1
  - fixed inconsistencies between the description in
    the man page and that in the parent manpage. These
    are too numerous for me to fix all.

Added: script that could be used in CI to prevent future
such inconsistencies. It cannot be enabled yet because
there are still 35+ inconsistencies in need of cleaning.

This will be difficult to review on github. I suggest
pulling the PR and running 'git log -1 -p | cdif | less'

'cdif' is a handy tool for colorizing individual diffs between
lines:

   http://kaz-utashiro.github.io/cdif/

There are other such tools; use your favorite. Comparing
without visual highlights may be painful.

I also encourage you to run hack/man-page-checker and suggest
more fixes for the problems it's finding.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-20 14:37:59 -06:00
Daniel J Walsh d0ee203986
Cleanup messages on podman load
If user does not specify file or redirect for stdin, then
throw an error

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-18 12:23:41 -04:00
OpenShift Merge Robot 310155b4ee
Merge pull request #2685 from kunalkushwaha/ps-man-page-fix-2664
output of port grouping in ps command added as example
2019-03-18 06:15:01 -07:00
Kunal Kushwaha 1549a7666b output of port grouping in ps command added as example
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-18 10:05:34 +09:00
Ed Santiago 8a570b2dd2 podman image tree: fix usage message
Minor fix to Use message: add IMAGE argument. (I'm a stickler
for this because my zsh completion is self-generating, from
the --help messages).

Also, sort 'tree' before 'trust' in man page.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-16 08:09:35 -06:00
OpenShift Merge Robot 97fb495718
Merge pull request #2620 from baude/multilogs
display logs for multiple containers at the same time
2019-03-16 04:21:32 -07:00
OpenShift Merge Robot 3384bd87c8
Merge pull request #2672 from TomSweeneyRedHat/dev/tsweeney/clistoreconf
Add CLI storage conf example to run manpage
2019-03-16 04:12:38 -07:00
OpenShift Merge Robot 3754f58499
Merge pull request #2643 from rhatdan/volumes
Make sure buildin volumes have the same ownership and permissions as …
2019-03-15 14:52:45 -07:00
TomSweeneyRedHat 26a89b61b3 Add CLI storage conf example to run manpage
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Add an example to the run man page to illustrate how
you can configure storage from the CLI.  This addresses
a request from issue #2662.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-03-15 15:03:47 -04:00
baude 5e86acd591 display logs for multiple containers at the same time
add the ability for users to specify more than one container at a time
while using podman logs.  If more than one container is being displayed,
podman will also prepend a shortened container id of the container on
the log line.

also, enabled the podman-remote logs command during the refactoring of
the above ability.

fixes issue #2219

Signed-off-by: baude <bbaude@redhat.com>
2019-03-15 13:41:01 -05:00
OpenShift Merge Robot 6e4c32967e
Merge pull request #2595 from jwhonce/bug/1677908
Add --replace flag to "podman container runlabel"
2019-03-15 10:52:57 -07:00
Daniel J Walsh 9d81be9614
Make sure buildin volumes have the same ownership and permissions as image
When creating a new image volume to be mounted into a container, we need to
make sure the new volume matches the Ownership and permissions of the path
that it will be mounted on.

For example if a volume inside of a containre image is owned by the database
UID, we want the volume to be mounted onto the image to be owned by the
database UID.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-15 10:44:44 -04:00
TomSweeneyRedHat a220473698 Update pull and pull-always in bud man page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Update the `--pull` and `--pull-always` documentation in the build
command to clarify what each does.

Fixes: https://github.com/containers/buildah/issues/1381
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-03-14 18:09:23 -04:00
OpenShift Merge Robot fc5951ad55
Merge pull request #1642 from kunalkushwaha/image-tree
Tree implementation for podman images
2019-03-14 09:53:49 -07:00
TomSweeneyRedHat d033452b3d Replace skopeo-containers with containers-common
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Replaces 'skopeo-containers' with 'containers-common' in the files that
I feel comfortable changing it in.  There are a number of rpm building
related files that still have it, but I was hesitant to do so.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-03-14 09:01:30 -04:00
OpenShift Merge Robot 296c61d896
Merge pull request #2638 from jwhonce/issue/1959
Corrected detach man pages and code comments
2019-03-14 05:49:24 -07:00
OpenShift Merge Robot f6cfa8f4d8
Merge pull request #2640 from TomSweeneyRedHat/dev/tsweeney/builddocfix2
Replace buildah with podman in build doc
2019-03-14 01:12:19 -07:00
OpenShift Merge Robot fb5f8ebcb6
Merge pull request #2624 from edsantiago/inspect_usability
Usability cleanup for 'inspect'
2019-03-14 00:31:22 -07:00
Kunal Kushwaha a4b3b9ffbb Tree implementation for podman images
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-14 11:22:06 +09:00
TomSweeneyRedHat 4b41f05a91 Replace buildah with podman in build doc
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Remove the word buildah from the man page and replace it
with podman.  Cut and paste job gone bad apparently.

Fixes: #2639
2019-03-13 20:50:02 -04:00
Jhon Honce f29a765573 Corrected detach man pages and code comments
* Updated documentation to match code

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-03-13 14:16:37 -07:00
Jhon Honce 504a0ff72f Add --replace flag to "podman container runlabel"
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1677908

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-03-13 13:16:49 -07:00
Ed Santiago 360487ab6d Add 'podman events' to podman(1)
Also: enforce noSubArgs for podman events

Also: remove unnecessary '[flags]' from Use message (Cobra
adds it automatically)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-13 10:22:10 -06:00
Ed Santiago 3de5e4a99f Usability cleanup for 'inspect'
Make the usage messages (and options) different between
podman inspect, podman image inspect, and podman container inspect.

Disable inapplicable options (-l, -s) for podman image inspect

Disable -t (type) when the type is implicit through the subcommand.

Update man page to reflect differences in usage.

Fix broken test.

Uglier than desirable due to Go and Cobra limitations

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-13 08:29:52 -06:00
OpenShift Merge Robot 883566fbc0
Merge pull request #2562 from baude/healtcheckphase2
healthcheck phase 2
2019-03-12 13:09:13 -07:00
baude 03716cf7f3 healtcheck phase 2
integration of healthcheck into create and run as well as inspect.
healthcheck enhancements are as follows:

* add the following options to create|run so that non-docker images can
define healthchecks at the container level.
  * --healthcheck-command
  * --healthcheck-retries
  * --healthcheck-interval
  * --healthcheck-start-period

* podman create|run --healthcheck-command=none disables healthcheck as
described by an image.
* the healthcheck itself and the healthcheck "history" can now be
observed in podman inspect
* added the wiring for healthcheck history which logs the health history
of the container, the current failed streak attempts, and log entries
for the last five attempts which themselves have start and stop times,
result, and a 500 character truncated (if needed) log of stderr/stdout.

The timings themselves are not implemented in this PR but will be in
future enablement (i.e. next).

Signed-off-by: baude <bbaude@redhat.com>
2019-03-12 14:29:18 -05:00
baude ca1e76ff63 Add event logging to libpod, even display to podman
In lipod, we now log major events that occurr.  These events
can be displayed using the `podman events` command. Each
event contains:

* Type (container, image, volume, pod...)
* Status (create, rm, stop, kill, ....)
* Timestamp in RFC3339Nano format
* Name (if applicable)
* Image (if applicable)

The format of the event and the varlink endpoint are to not
be considered stable until cockpit has done its enablement.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-11 15:08:59 -05:00
OpenShift Merge Robot 8656d2d887
Merge pull request #2538 from giuseppe/slirp4netns-path
libpod: allow to configure path to the slirp4netns binary
2019-03-11 07:56:50 -07:00
TomSweeneyRedHat 3e3fcd5422 Remove --rm and --detach don't coexist note
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

With later changes of Podman, you can now use both the
--rm and --detach in a single run command.  This PR removes
the documentation in the man pages saying this is not
allowed.

Fixes: #2601
2019-03-11 09:34:30 -04:00
Giuseppe Scrivano e02393ba70
libpod: allow to configure path to the network-cmd binary
allow to configure the path to the network-cmd binary, either via an
option flag --network-cmd-path or through the libpod.conf
configuration file.

This is currently used to customize the path to the slirp4netns
binary.

Closes: https://github.com/containers/libpod/issues/2506

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-11 09:29:04 +01:00
Ed Santiago 91e15bd802 add podman-healthcheck(1) to podman(1)
...caught by hack/podman-commands.sh script. Which had a little
buglet, which I fixed: add a special case for 'help', which
neither has nor needs a man page.

I believe the podman-commands.sh script is ready to be run in CI,
hint hint.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-07 14:33:25 -07:00
OpenShift Merge Robot ef714756b7
Merge pull request #2532 from QiWang19/i2520
add flag --extract tar file in podman cp
2019-03-06 09:40:39 -08:00
Qi Wang d9e1b2c470 add flag --extract tar file in podman cp
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-06 10:06:25 -05:00
baude 598bde52d0 podman healthcheck run (phase 1)
Add the ability to manually run a container's healthcheck command.
This is only the first phase of implementing the healthcheck.
Subsequent pull requests will deal with the exposing the results and
history of healthchecks as well as the scheduling.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-05 14:03:55 -06:00
Giuseppe Scrivano 0b34327ad4
exec: support --preserve-fds
Allow to pass additional FDs to the process being executed.

Closes: https://github.com/containers/libpod/issues/2372

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-02 11:45:42 +01:00
OpenShift Merge Robot 8ee471f800
Merge pull request #2495 from baude/runlabelpulldefault
Pull image for runlabel if not local
2019-03-01 12:50:50 -08:00
baude a4b82c03d3 Pull image for runlabel if not local
In cases where a user issues the podman container runlabel
command and the image is not local, we now default to pulling
the image automatically to mimic the atomic cli behavior.

Fixes: BZ #1677905

Signed-off-by: baude <bbaude@redhat.com>
2019-03-01 09:20:12 -06:00
Ed Santiago 6f474c5704 Fix link inconsistencies in man pages
Found via:

    for i in docs/*.md;do x=$(perl -ne 'if (/\[(podman-.*?)\(1\)\]\((podman-.*?)\.1\.md/) { print "  $1 != $2\n" if $1 ne $2; print " ENOENT $2\n" unless -e "docs/$2.1.md" }' <$i); if [ -n "$x" ]; then echo $i; echo "$x";fi;done

...which is probably a good candidate for another CI hook,
except I have no idea how to rewrite it in awk.

Additionally, mark `podman refresh` and `podman container refresh`
as hidden, remove its man page, and remove references to it from
all other man pages.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-01 06:53:52 -07:00
Daniel J Walsh be0845936a
Move Alias lines to descriptions of commands
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-28 15:14:08 -05:00
Daniel J Walsh edfe644a0c
No podman container ps command exists
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-28 14:57:03 -05:00
Daniel J Walsh b4b7b298fc
Clean up man pages to match commands
Also add podman-commands.sh to compare man pages to commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-27 16:37:40 -05:00
Ed Santiago a20ff42134 Better usage synopses for subcommands
Conceptually simple: include, where applicable, a brief
description of command-line options for each subcommand.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-02-26 18:10:36 -07:00
Matthew Heon 5fcbe5baab Add volume path to default libpod.conf (and manpage)
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 09:38:02 -05:00
Valentin Rothberg 7fea0d7077 docs: cross-reference podman-{generate,play}-kube
Addresses: https://github.com/containers/libpod/pull/2428#discussion_r260200694
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-26 15:07:05 +01:00
OpenShift Merge Robot f9ef82ee7c
Merge pull request #2362 from mheon/add_locks_to_config
Add num_locks to the default libpod config
2019-02-26 10:37:59 +01:00
Matthew Heon 5b010ee58b Add num_locks to the default libpod config
Allow adjusting number of locks in libpod.conf via an already
available knob we previously didn't expose in the default config
file.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-25 17:43:25 -05:00
OpenShift Merge Robot e45c442080
Merge pull request #2358 from rhatdan/namespace
Fix up handling of user defined network namespaces
2019-02-25 21:31:50 +01:00
Daniel J Walsh fe4c0c3780
Change exit code to 1 on podman rmi nosuch image
Make it easy for scripts to determine if an image removal
failure.   If only errors were no such image exit with 1
versus 125.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-25 12:49:27 -05:00
Daniel J Walsh e41279b902
Change exit code to 1 on podman rm nosuch container
Make it easy for scripts to determine if a container removal
fails versus the container did not exist.

If only errors were no such container exit with 1 versus 125.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-25 10:31:04 -05:00
Daniel J Walsh b87bdced1f
Fix up handling of user defined network namespaces
If user specifies network namespace and the /etc/netns/XXX/resolv.conf
exists, we should use this rather then /etc/resolv.conf

Also fail cleaner if the user specifies an invalid Network Namespace.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 05:47:27 -05:00
TomSweeneyRedHat ff0b4652ef Vendor Buildah v1.7
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Vendors in Buildah 1.7 into Podman.
Also the latest imagebuilder and changes for
`build --target`

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-22 16:40:05 -05:00
baude 6ab6e2c307 hide --latest on the remote-client
in the case of the remote-client, it was decided to hide the latest
flag to avoid confusion for end-users on what the "last" container,
volume, or pod are.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-22 14:13:08 -06:00
Matthew Heon d2b77f8b33 Do not make renumber shut down the runtime
The original intent behind the requirement was to ensure that, if
two SHM lock structs were open at the same time, we should not
make such a runtime available to the user, and should clean it up
instead.

It turns out that we don't even need to open a second SHM lock
struct - if we get an error mapping the first one due to a lock
count mismatch, we can just delete it, and it cleans itself up
when it errors. So there's no reason not to return a valid
runtime.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00
TomSweeneyRedHat 675a202a1b Fifth chunk of Cobra Examples
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

The fifth and final chunk of examples for the Cobra
examples in the CLI help output.

Also includes a few man page touchups.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-18 19:37:09 -05:00
OpenShift Merge Robot 3f32eae56f
Merge pull request #2357 from TomSweeneyRedHat/dev/tsweeney/cobrahelp3
Add 3rd chunk of Cobra examples
2019-02-17 22:44:04 +01:00
OpenShift Merge Robot 6aaf8d39a9
Merge pull request #2295 from haircommander/recursive-start
Recursively start a pod if a container is run in it
2019-02-17 21:04:33 +01:00
TomSweeneyRedHat b62c0e703d Add 3rd chunk of Cobra examples
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Adds the third chunk of Cobra examples to the cli help.
As were putting together a release tomorrow, tried to
hit the heavy commands with this PR.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-17 13:49:05 -05:00
Peter Hunt 81804fc464 pod infra container is started before a container in a pod is run, started, or attached.
Prior, a pod would have to be started immediately when created, leading to confusion about what a pod state should be immediately after creation. The problem was podman run --pod ... would error out if the infra container wasn't started (as it is a dependency). Fix this by allowing for recursive start, where each of the container's dependencies are started prior to the new container. This is only applied to the case where a new container is attached to a pod.

Also rework container_api Start, StartAndAttach, and Init functions, as there was some duplicated code, which made addressing the problem easier to fix.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-02-15 16:39:24 -05:00
TomSweeneyRedHat 72b91eb87f Second chunk of Cobra help
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Adds examples to Cobra help for a second chunk of commands.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-15 14:38:46 -05:00
OpenShift Merge Robot 40c6d5c98c
Merge pull request #2188 from TomSweeneyRedHat/dev/tsweeney/pullall
Add --all-tags to pull command
2019-02-15 14:45:03 +01:00
Giuseppe Scrivano 7899b738f4
docs: mention the new OCI runtime configuration
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-15 13:04:23 +01:00
OpenShift Merge Robot 81ace5caac
Merge pull request #2333 from TomSweeneyRedHat/dev/tsweeney/helpexamples
Add examples for Cobra
2019-02-15 00:07:34 +01:00
OpenShift Merge Robot 1a9128d1e4
Merge pull request #2320 from QiWang19/stdinPW
--password-stdin flag in `podman login`
2019-02-14 22:31:58 +01:00
OpenShift Merge Robot 18bf883eeb
Merge pull request #2151 from QiWang19/cp
'podman cp' copy between host and container
2019-02-14 22:31:52 +01:00
TomSweeneyRedHat a7a691809a Add examples for Cobra
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

First pass of entries for the Examples listed in the Cobra
Help.  Will add others in following PR's.
2019-02-14 15:03:11 -05:00
Daniel J Walsh 52df1fa7e0
Fix volume handling in podman
iFix builtin volumes to work with podman volume

Currently builtin volumes are not recored in podman volumes when
they are created automatically. This patch fixes this.

Remove container volumes when requested

Currently the --volume option on podman remove does nothing.
This will implement the changes needed to remove the volumes
if the user requests it.

When removing a volume make sure that no container uses the volume.

Signed-off-by: Daniel J Walsh dwalsh@redhat.com
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-14 13:21:52 -05:00
Qi Wang a8b149b406 --password-stdin flag in podman login
Support --password-stdin flag, reads a password from STDIN and pass it to `podman login`.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-02-14 10:09:25 -05:00
Qi Wang 36d962990a 'podman cp' copy between host and container
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-02-14 09:29:53 -05:00
OpenShift Merge Robot b7a3685cba
Merge pull request #2281 from rhatdan/deleteContainer
Remove container from storage on --force
2019-02-11 20:31:03 +01:00
OpenShift Merge Robot 8440b0734c
Merge pull request #2306 from baude/podstatsgotemplate
Podman pod stats -- fix GO template output
2019-02-11 16:02:53 +01:00
baude 4994fecd46 Podman pod stats -- fix GO template output
Go templates were not being processed or printed correctly for podman
pod stats.  Added the ability to do templates as well as honor the
table identifier.

Fixes #2258

Signed-off-by: baude <bbaude@redhat.com>
2019-02-10 11:27:09 -06:00
Daniel J Walsh 62c8ba527e
Add troubleshooting information about running a rootless containers.
Add a problem statement about shadow-utils and missing entries from
/etc/subuid and /etc/subgid.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-10 08:08:22 -07:00
TomSweeneyRedHat 1543a01be8 Add --all-tags to pull command
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Add --all-tags for the `podman pull` command so all tags
of an image will be pulled, not just ':latest'.  Emulates
the change in Buildah https://github.com/containers/buildah/pull/1263

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-09 20:00:19 -05:00
OpenShift Merge Robot c86e8f180c
Merge pull request #2280 from TomSweeneyRedHat/dev/tsweeney/trusty2
Update image-trust man with further comments
2019-02-09 14:02:10 +01:00
Daniel J Walsh 233ba5bd89
Remove container from storage on --force
Currently we can get into a state where a container exists in
storage but does not exist in libpod.  If the user forces a
removal of this container, then we should remove it from storage
even if the container is owned by another tool.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-09 05:33:14 -07:00
TomSweeneyRedHat 38422a38e7 Update image-trust man with further comments
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

After the last update, @mtrmac had some great suggestions which I've incorporated.
I've updated the G:oogle doc and have added this PR in case it's easier to see the diffs.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-08 13:47:30 -05:00
OpenShift Merge Robot f250745fe0
Merge pull request #2269 from rhatdan/selinux
Add documentation on running systemd on SELinux systems
2019-02-07 03:35:57 +01:00
Daniel J Walsh 1dd7bd0d0f
Add documentation on running systemd on SELinux systems
Lots of users are attempting to run systemd within a container.  They are
being blocked from running SELinux systems since they need the
container_manage_cgroup which is not enabled by default.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-06 05:52:39 -08:00
Daniel J Walsh 74d984e056
Add podman system prune and info commands
We are missing the equivalence of the docker system commands

This patch set adds `podman system prune`
and `podman system info`

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-05 10:41:55 -08:00
Daniel J Walsh 3554bfce98
Merge pull request #2196 from baude/toolbox
Changes to container runlabel for toolbox project
2019-02-05 10:34:40 -05:00
OpenShift Merge Robot d5593b8e71
Merge pull request #2233 from TomSweeneyRedHat/dev/tsweeney/trusty
Touch up image-trust man
2019-02-02 22:20:33 +01:00
TomSweeneyRedHat bae483c496 Touch up image-trust man
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

In #1899, @rhatdan asked me to try and tweak the verbiage
a bit in the podman-images-trust man page.  I've done so,
or attempted to, and have also added a policy-json(5) link.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-02 15:03:17 -05:00
TomSweeneyRedHat b58b95b408 Rework Podman description
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Rework the Podman Description.  I'm starting off with the Podman man page
to build consensus and we can then add to other places as appropriate.

This partially addresses: #1636

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-01 13:44:41 -05:00
OpenShift Merge Robot 805c6d997b
Merge pull request #2244 from rhatdan/version
Add support for short option -f in podman version
2019-01-30 18:51:22 +01:00
OpenShift Merge Robot d38da7b8be
Merge pull request #2243 from rhatdan/size
Add support for short option -s in podman inspect
2019-01-30 18:51:12 +01:00
Daniel J Walsh 2ed52c299f
Add support for short option -f in podman version
docker version supports a short options -f for --format

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-30 15:41:52 +00:00
Daniel J Walsh a05f3a49fd
Add support for short option -s in podman inspect
docker inspect supports a short -s option for --size.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-30 15:31:19 +00:00
Daniel J Walsh 9e340da255
Add support for short option -f
docker info supports a short -f option for --format.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-30 15:28:15 +00:00
baude 735f0de633 Changes to container runlabel for toolbox project
The toolbox project would benefit from a few changes to more closely
resembe the original atomic cli project.  Changes made are:

* only pull image for container runlabel if the label exists in the image
* if a container image does not have the desired label, exit with non-zero

Signed-off-by: baude <bbaude@redhat.com>
2019-01-30 08:44:58 -06:00
baude 656033ca96 podman image prune -- implement all flag
we now, by default, only prune dangling images.  if --all is passed, we
prune dangling images AND images that do not have an associated containers.

also went ahead and enabled the podman-remote image prune side of things.

Fixes: #2192

Signed-off-by: baude <bbaude@redhat.com>
2019-01-29 16:51:48 -06:00
Ken Dreyer 8b47e3ce6f tutorials: describe how to use podman in updates-testing
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2019-01-25 16:11:03 -07:00
OpenShift Merge Robot 812894bcea
Merge pull request #2203 from 9034725985/patch-1
remove sudo
2019-01-23 22:01:42 +01:00
Kushal f7f220d827
remove sudo
just tested with podman 1.0.0 on fedora 29
we don't need sudo

I tried this again and it seems like we DO need sudo?
Maybe I misunderstood something
but looks like I am unable to reproduce getting an IP address

also it would be nice if creating a check point
(which I belive means writing to disk) could be done without root
but I guess it depends on where on disk I am writing?

in any case, here is my new console output

```console
[kus@asus-vivobook personal]$ cd libpod/
[kus@asus-vivobook libpod]$ git checkout patch-1
Branch 'patch-1' set up to track remote branch 'patch-1' from 'origin'.
Switched to a new branch 'patch-1'
[kus@asus-vivobook libpod]$ podman run -dt -e HTTPD_VAR_RUN=/var/run/httpd -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
>                   -e HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
>                   -e HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
>                   registry.fedoraproject.org/f29/httpd /usr/bin/run-httpd
Trying to pull registry.fedoraproject.org/f29/httpd...Getting image source signatures
Copying blob 281a37f51f75: 85.68 MiB / 85.68 MiB [=======================] 1m47s
Copying blob ab0d48faadd2: 4.64 MiB / 4.64 MiB [=========================] 1m47s
Copying blob e1bf69dce18d: 49.77 MiB / 49.77 MiB [=======================] 1m47s
Copying config 532763348c4e: 6.66 KiB / 6.66 KiB [==========================] 0s
Writing manifest to image destination
Storing signatures
78917177dbf7634993fdcc44e0bc90c9422482b9a9e757c85c14dfd1ee09c777
[kus@asus-vivobook libpod]$ podman ps
CONTAINER ID  IMAGE                                        COMMAND               CREATED        STATUS            PORTS  NAMES
78917177dbf7  registry.fedoraproject.org/f29/httpd:latest  container-entrypo...  4 seconds ago  Up 3 seconds ago         nifty_lewin
[kus@asus-vivobook libpod]$ podman inspect -l | grep IPAddress\"
            "IPAddress": "",
[kus@asus-vivobook libpod]$ sudo podman inspect -l | grep IPAddress\"
[sudo] password for kus:
no such container
[kus@asus-vivobook libpod]$ podman logs --latest
=> sourcing 10-set-mpm.sh ...
=> sourcing 20-copy-config.sh ...
=> sourcing 40-ssl-certs.sh ...
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
[Tue Jan 22 12:59:38.887673 2019] [ssl:warn] [pid 1:tid 140100965338496] AH01909: 10.0.2.100:8443:0 server certificate does NOT include an ID which matches the server name
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
[Tue Jan 22 12:59:38.998169 2019] [ssl:warn] [pid 1:tid 140100965338496] AH01909: 10.0.2.100:8443:0 server certificate does NOT include an ID which matches the server name
[Tue Jan 22 12:59:38.998876 2019] [lbmethod_heartbeat:notice] [pid 1:tid 140100965338496] AH02282: No slotmem from mod_heartmonitor
[Tue Jan 22 12:59:39.001562 2019] [cgid:error] [pid 28:tid 140100965338496] (13)Permission denied: AH01243: Couldn't bind unix domain socket /run/httpd/cgisock.1
[Tue Jan 22 12:59:39.006051 2019] [mpm_event:notice] [pid 1:tid 140100965338496] AH00489: Apache/2.4.37 (Fedora) OpenSSL/1.1.1-pre9 configured -- resuming normal operations
[Tue Jan 22 12:59:39.006164 2019] [core:notice] [pid 1:tid 140100965338496] AH00094: Command line: 'httpd -D FOREGROUND'
[Tue Jan 22 12:59:39.006445 2019] [cgid:crit] [pid 1:tid 140100965338496] AH01238: cgid daemon failed to initialize
[kus@asus-vivobook libpod]$ podman top 78917177dbf7634993fdcc44e0bc90c9422482b9a9e757c85c14dfd1ee09c777
USER      PID   PPID   %CPU    ELAPSED           TTY     TIME   COMMAND
default   1     0      0.000   2m10.968144627s   pts/0   0s     httpd -D FOREGROUND
default   24    1      0.000   2m9.968688975s    pts/0   0s     /usr/bin/coreutils --coreutils-prog-shebang=cat /usr/bin/cat
default   25    1      0.000   2m9.968784295s    pts/0   0s     /usr/bin/coreutils --coreutils-prog-shebang=cat /usr/bin/cat
default   26    1      0.000   2m9.968880829s    pts/0   0s     /usr/bin/coreutils --coreutils-prog-shebang=cat /usr/bin/cat
default   27    1      0.000   2m9.968997468s    pts/0   0s     /usr/bin/coreutils --coreutils-prog-shebang=cat /usr/bin/cat
default   29    1      0.000   2m9.969134191s    pts/0   0s     httpd -D FOREGROUND
default   38    1      0.000   2m9.969239549s    pts/0   0s     httpd -D FOREGROUND
default   72    1      0.000   2m9.969344456s    pts/0   0s     httpd -D FOREGROUND
[kus@asus-vivobook libpod]$ podman container checkpoint 78917177dbf7634993fdcc44e0bc90c9422482b9a9e757c85c14dfd1ee09c777
checkpointing a container requires root
[kus@asus-vivobook libpod]$ podman stop --latest
78917177dbf7634993fdcc44e0bc90c9422482b9a9e757c85c14dfd1ee09c777
[kus@asus-vivobook libpod]$ podman ps -a
CONTAINER ID  IMAGE                                        COMMAND               CREATED        STATUS                    PORTS  NAMES
78917177dbf7  registry.fedoraproject.org/f29/httpd:latest  container-entrypo...  3 minutes ago  Exited (0) 9 seconds ago         nifty_lewin
[kus@asus-vivobook libpod]$ podman rm --latest
78917177dbf7634993fdcc44e0bc90c9422482b9a9e757c85c14dfd1ee09c777
```

original:
```console
[kus@mcny ~]$ podman run -dt -e HTTPD_VAR_RUN=/var/run/httpd -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
>                   -e HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
>                   -e HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
>                   registry.fedoraproject.org/f27/httpd /usr/bin/run-httpd
Trying to pull registry.fedoraproject.org/f27/httpd...Getting image source signatures
Copying blob ff3dab903f92: 80.73 MiB / 80.73 MiB [=========================] 14s
Copying blob 9347d6e9d864: 7.30 MiB / 7.30 MiB [===========================] 14s
Copying blob 2fc5c44251d4: 44.82 MiB / 44.82 MiB [=========================] 14s
Copying config 18f01f6f77ef: 6.55 KiB / 6.55 KiB [==========================] 0s
Writing manifest to image destination
Storing signatures
d0362571c3850159315778700a63a305296150177578a9339cca0d9c86ed97f1
[kus@mcny ~]$ podman ps
CONTAINER ID  IMAGE                                        COMMAND               CREATED         STATUS             PORTS  NAMES
d0362571c385  registry.fedoraproject.org/f27/httpd:latest  container-entrypo...  36 seconds ago  Up 36 seconds ago         happy_babbage
[kus@mcny ~]$
```

Signed-off-by: Kushal <kushaldeveloper@gmail.com>
2019-01-22 08:04:25 -05:00
Daniel J Walsh 69f8b8bd7e
Update transfer.md and commands.md to add missing commands.
These pages are a litte out of data.  Add missing content.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-21 14:08:19 -05:00
Daniel J Walsh 78fc4c67fd
Add --latest and --all to podman mount/umount
I find these useful for playing around with containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-16 10:05:41 -05:00
Giuseppe Scrivano 50c86ae389
oci: allow to define multiple OCI runtimes
we can define multiple OCI runtimes that can be chosen with
--runtime.

in libpod.conf is possible to specify them with:

[runtimes]
foo = [
             "/usr/bin/foo",
	     "/usr/sbin/foo",
]
bar = [
             "/usr/bin/foo",
	     "/usr/sbin/foo",
]

If the argument to --runtime is an absolute path then it is used
directly without any lookup in the configuration.

Closes: https://github.com/containers/libpod/issues/1750

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-01-14 10:22:18 +01:00
Daniel J Walsh 55583bdfa6
Fix up image sign and trust
Add completions
Fix man pages
fix code in sign to answer PR Comments.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-09 15:19:46 -05:00
OpenShift Merge Robot c37f731596
Merge pull request #2040 from QiWang19/signimg
Support podman image sign
2019-01-09 09:09:10 -08:00
OpenShift Merge Robot 7f91ebb441
Merge pull request #2103 from debarshiray/wip/debarshiray/man-page-order-long-short-options
List the long variant of each option before its shorter counterpart
2019-01-09 03:04:53 -08:00
Debarshi Ray bdf8965846 List the long variant of each option before its shorter counterpart
This is the style followed in most of the other man pages.

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-01-09 11:14:06 +01:00
W. Trevor King f6a2b6bf2b hooks: Add pre-create hooks for runtime-config manipulation
There's been a lot of discussion over in [1] about how to support the
NVIDIA folks and others who want to be able to create devices
(possibly after having loaded kernel modules) and bind userspace
libraries into the container.  Currently that's happening in the
middle of runc's create-time mount handling before the container
pivots to its new root directory with runc's incorrectly-timed
prestart hook trigger [2].  With this commit, we extend hooks with a
'precreate' stage to allow trusted parties to manipulate the config
JSON before calling the runtime's 'create'.

I'm recycling the existing Hook schema from pkg/hooks for this,
because we'll want Timeout for reliability and When to avoid the
expense of fork/exec when a given hook does not need to make config
changes [3].

[1]: https://github.com/opencontainers/runc/pull/1811
[2]: https://github.com/opencontainers/runc/issues/1710
[3]: https://github.com/containers/libpod/issues/1828#issuecomment-439888059

Signed-off-by: W. Trevor King <wking@tremily.us>
2019-01-08 21:06:17 -08:00
OpenShift Merge Robot c9d63fe89d
Merge pull request #2097 from debarshiray/wip/debarshiray/podman-exec-workdir
Add a --workdir option to 'podman exec'
2019-01-08 10:21:14 -08:00
Debarshi Ray 867669374c Add a --workdir option to 'podman exec'
Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-01-08 17:42:37 +01:00
Debarshi Ray e02199f2a4 Default --sig-proxy to true for 'podman start --attach'
The --sig-proxy option in both 'podman attach' and 'podman run' default
to true, and there's no reason for 'podman start --attach' to be any
different. However, since it only makes sense to proxy signals when
the container is attached, 'podman start --sig-proxy' will continue to
error if --attach isn't used.

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-01-08 16:34:09 +01:00
Qi Wang bce22dc621 [WIP]Support podman image sign
Generate a signature claim for an image using user keyring (--sign-by). The signature file will be stored in simple json format under the default or the given directory (--directory or yaml file in /etc/containers/registries.d/).

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-01-08 09:53:18 -05:00
Daniel J Walsh b367855d5f
Add the configuration file used to setup storage to podman info
Users have no idea what storage configuration file is used to setup
storage, so adding this to podman info, should make it easier to
discover.

This requires a revendor of containers/storage

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-07 10:02:26 -05:00
Valentin Rothberg 75578aad61 add container-init support
Add support for executing an init binary as PID 1 in a container to
forward signals and reap processes.  When the `--init` flag is set for
podman-create or podman-run, the init binary is bind-mounted to
`/dev/init` in the container and "/dev/init --" is prepended to the
container's command.

The default base path of the container-init binary is `/usr/libexec/podman`
while the default binary is catatonit [1].  This default can be changed
permanently via the `init_path` field in the `libpod.conf` configuration
file (which is recommended for packaging) or temporarily via the
`--init-path` flag of podman-create and podman-run.

[1] https://github.com/openSUSE/catatonit

Fixes: #1670
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-01-04 11:42:03 +01:00
Daniel J Walsh ad36345fde
Add troubleshooting for sparse files
A common failure with people building container images is the
creation of large sparse files, particularly useradd creating
the lastlog file.

This PR Documents the failures.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-30 08:08:13 -05:00
Daniel J Walsh a22f00d4c5
Allow alias for list, ls, ps to work
Allow multiple alias for listing containers and images.

Also fix documentation for umount and unmount

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-23 09:38:57 -05:00
Daniel J Walsh c657dc4fdb
Switch all referencs to image.ContainerConfig to image.Config
This will more closely match what Docker is doing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-21 15:59:34 -05:00
OpenShift Merge Robot 2de6cadd6f
Merge pull request #1967 from baude/kubereplay
Add Play
2018-12-20 05:41:38 -08:00
OpenShift Merge Robot 2e9952c424
Merge pull request #1900 from vbatts/cni-config-instructions
docs/tutorials: add a basic network config
2018-12-20 03:55:03 -08:00
OpenShift Merge Robot 8ec8ee935e
Merge pull request #1899 from QiWang19/trustimg
Support podman image trust command
2018-12-19 13:07:10 -08:00
baude 9b03cacc87 Add Play
podman play kube adds the ability for the user to recreate pods and containers
from a Kubernetes YAML file in libpod.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-19 14:20:55 -06:00
Qi Wang 31edf47285 Support podman image trust command
Display the trust policy of the host system. The trust policy is stored in the /etc/containers/policy.json file and defines a scope of registries or repositories.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-12-19 13:36:11 -05:00
OpenShift Merge Robot c8eaf59d5f
Merge pull request #2021 from rhatdan/restart
Add information on --restart
2018-12-18 13:02:39 -08:00
OpenShift Merge Robot 9b6a70f6c9
Merge pull request #1935 from deuscapturus/master
add getlogin command
2018-12-18 12:27:29 -08:00
Daniel J Walsh 59635cd186
Add information on --restart
We need to recommend that users use Systemd unit files if they want
the container to restart automatically.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-18 12:50:50 -05:00
baude 0702e71ca5 generate service object inline
no longer require the service object be output to a different file; we should be
doing this inline with the pods for user convenience.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-18 09:17:30 -06:00
Vincent Batts 4faf8d8836
docs/tutorials: add a basic network config
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2018-12-17 12:28:55 -05:00
Theodore Cowan d5647fe053
add --get-login command to podman-login.
Returns user if user is logged-in to the registry.  Returns error
if not logged in with non-zero status code.

Signed-off-by: Theodore Cowan <theodore-cowan@pluralsight.com>
2018-12-17 11:20:40 -05:00
OpenShift Merge Robot 5073638d83
Merge pull request #1953 from baude/podstoptimeout
add timeout to pod stop
2018-12-07 09:06:03 -08:00
baude 5209894100 add timeout to pod stop
like podman stop of containers, we should allow the user to specify
a timeout override when stopping pods; otherwise they have to wait
the full timeout time specified during the pod/container creation.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-07 10:27:41 -06:00
OpenShift Merge Robot 49d9a8f951
Merge pull request #1928 from baude/podtokube
generate kube
2018-12-07 07:46:52 -08:00
Miloslav Trmač b134951d14 Minimally update for the DockerInsecureSkipTLSVerify type change
Following SystemContext.DockerInsecureSkipTLSVerify, make the
DockerRegistryOne also an OptionalBool, and update callers.

Explicitly document that --tls-verify=true and --tls-verify unset
have different behavior in those commands where the behavior changed
(or where it hasn't changed but the documentation needed updating).

Also make the --tls-verify man page sections a tiny bit more consistent
throughout.

This is a minimal fix, without changing the existing "--tls-verify=true"
paths nor existing manual insecure registry lookups.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2018-12-06 23:34:59 +01:00
OpenShift Merge Robot 5c6e02b55b
Merge pull request #1904 from umohnani8/volume
Add "podman volume" command
2018-12-06 08:59:13 -08:00
OpenShift Merge Robot 3e60de629d
Merge pull request #1912 from baude/prune
Add ability to prune containers and images
2018-12-06 08:31:20 -08:00
OpenShift Merge Robot 99bbbeb746
Merge pull request #1887 from mheon/rm_sync
Add --sync option to podman rm
2018-12-06 08:11:51 -08:00
Matthew Heon e5335fd74c Remove --sync flag from podman rm
Per discussion with Dan, it would be better to automatically
handle potential runtime errors by automatically syncing if they
occur. Retaining the flag for `ps` makes sense, as we won't even
be calling the OCI runtime and as such won't see errors if the
state desyncs, but rm can be handled automatically.

The automatic desync handling code will take some additional work
so we'll land this as-is (sync on ps is enough to solve most
desync issues).

Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-12-06 09:10:45 -05:00
Matthew Heon 28bead8be8 Add --sync flag to podman ps
The previous commit added support for --sync to podman rm to
ensure state inconsistencies would not prevent containers from
being removed.

Add the flag to podman ps as well, so that all containers can be
forcibly synced and all state inconsistencies resolved.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-12-06 09:10:45 -05:00
Matthew Heon a0c9be2061 Add --sync option to podman rm
With the changes made recently to ensure Podman does not hit the
OCI runtime as often to sync state, we can find ourselves in a
situation where the runtime's state does not match ours.

Add a --sync flag to podman rm to ensure we can still remove
containers when this happens.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2018-12-06 09:10:45 -05:00
umohnani8 4c70b8a94b Add "podman volume" command
Add support for podman volume and its subcommands.
The commands supported are:
	podman volume create
	podman volume inspect
	podman volume ls
	podman volume rm
	podman volume prune

This is a tool to manage volumes used by podman. For now it only handle
named volumes, but eventually it will handle all volumes used by podman.

Signed-off-by: umohnani8 <umohnani@redhat.com>
2018-12-06 10:17:16 +00:00
Giuseppe Scrivano 0a838fc239
tutorial: add ostree dependency
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-06 11:13:56 +01:00
baude e037427035 Add ability to prune containers and images
Allow user to prune unused/unnamed images, the layer images from building,
via podman rmi --prune.

Allow user to prune stopped/exiuted containers via podman rm --prune.

This should resolve #1910

Signed-off-by: baude <bbaude@redhat.com>
2018-12-05 19:57:54 -06:00
OpenShift Merge Robot b81f640bb5
Merge pull request #1920 from wking/explicit-hooks-dirs
libpod/container_internal: Deprecate implicit hook directories
2018-12-04 12:19:48 -08:00
baude c8436b4912 generate kube
add the ability to generate kubernetes pod and service yaml representations
of libpod containers and pods.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-04 08:03:49 -06:00
baude 9c359a31d5 create pod on the fly
when a user specifies --pod to podman create|run, we should create that pod
automatically.  the port bindings from the container are then inherited by
the infra container.  this signicantly improves the workflow of running
containers inside pods with podman.  the user is still encouraged to use
podman pod create to have more granular control of the pod create options.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-03 15:49:17 -06:00
W. Trevor King a4b483c848 libpod/container_internal: Deprecate implicit hook directories
Part of the motivation for 800eb863 (Hooks supports two directories,
process default and override, 2018-09-17, #1487) was [1]:

> We only use this for override. The reason this was caught is people
> are trying to get hooks to work with CoreOS. You are not allowed to
> write to /usr/share... on CoreOS, so they wanted podman to also look
> at /etc, where users and third parties can write.

But we'd also been disabling hooks completely for rootless users.  And
even for root users, the override logic was tricky when folks actually
had content in both directories.  For example, if you wanted to
disable a hook from the default directory, you'd have to add a no-op
hook to the override directory.

Also, the previous implementation failed to handle the case where
there hooks defined in the override directory but the default
directory did not exist:

  $ podman version
  Version:       0.11.2-dev
  Go Version:    go1.10.3
  Git Commit:    "6df7409cb5a41c710164c42ed35e33b28f3f7214"
  Built:         Sun Dec  2 21:30:06 2018
  OS/Arch:       linux/amd64
  $ ls -l /etc/containers/oci/hooks.d/test.json
  -rw-r--r--. 1 root root 184 Dec  2 16:27 /etc/containers/oci/hooks.d/test.json
  $ podman --log-level=debug run --rm docker.io/library/alpine echo 'successful container' 2>&1 | grep -i hook
  time="2018-12-02T21:31:19-08:00" level=debug msg="reading hooks from /usr/share/containers/oci/hooks.d"
  time="2018-12-02T21:31:19-08:00" level=warning msg="failed to load hooks: {}%!(EXTRA *os.PathError=open /usr/share/containers/oci/hooks.d: no such file or directory)"

With this commit:

  $ podman --log-level=debug run --rm docker.io/library/alpine echo 'successful container' 2>&1 | grep -i hook
  time="2018-12-02T21:33:07-08:00" level=debug msg="reading hooks from /usr/share/containers/oci/hooks.d"
  time="2018-12-02T21:33:07-08:00" level=debug msg="reading hooks from /etc/containers/oci/hooks.d"
  time="2018-12-02T21:33:07-08:00" level=debug msg="added hook /etc/containers/oci/hooks.d/test.json"
  time="2018-12-02T21:33:07-08:00" level=debug msg="hook test.json matched; adding to stages [prestart]"
  time="2018-12-02T21:33:07-08:00" level=warning msg="implicit hook directories are deprecated; set --hooks-dir="/etc/containers/oci/hooks.d" explicitly to continue to load hooks from this directory"
  time="2018-12-02T21:33:07-08:00" level=error msg="container create failed: container_linux.go:336: starting container process caused "process_linux.go:399: container init caused \"process_linux.go:382: running prestart hook 0 caused \\\"error running hook: exit status 1, stdout: , stderr: oh, noes!\\\\n\\\"\""

(I'd setup the hook to error out).  You can see that it's silenly
ignoring the ENOENT for /usr/share/containers/oci/hooks.d and
continuing on to load hooks from /etc/containers/oci/hooks.d.

When it loads the hook, it also logs a warning-level message
suggesting that callers explicitly configure their hook directories.
That will help consumers migrate, so we can drop the implicit hook
directories in some future release.  When folks *do* explicitly
configure hook directories (via the newly-public --hooks-dir and
hooks_dir options), we error out if they're missing:

  $ podman --hooks-dir /does/not/exist run --rm docker.io/library/alpine echo 'successful container'
  error setting up OCI Hooks: open /does/not/exist: no such file or directory

I've dropped the trailing "path" from the old, hidden --hooks-dir-path
and hooks_dir_path because I think "dir(ectory)" is already enough
context for "we expect a path argument".  I consider this name change
non-breaking because the old forms were undocumented.

Coming back to rootless users, I've enabled hooks now.  I expect they
were previously disabled because users had no way to avoid
/usr/share/containers/oci/hooks.d which might contain hooks that
required root permissions.  But now rootless users will have to
explicitly configure hook directories, and since their default config
is from ~/.config/containers/libpod.conf, it's a misconfiguration if
it contains hooks_dir entries which point at directories with hooks
that require root access.  We error out so they can fix their
libpod.conf.

[1]: https://github.com/containers/libpod/pull/1487#discussion_r218149355

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-12-03 12:54:30 -08:00
baude 318bf7017b podman pod exists
like containers and images, users would benefit from being able to check
if a pod exists in local storage.  if the pod exists, the return code is 0.
if the pod does not exists, the return code is 1.  Any other return code
indicates a real errors, such as permissions or runtime.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-03 12:00:18 -06:00
OpenShift Merge Robot b504623a11
Merge pull request #1317 from rhatdan/privileged
Disable mount options when running --privileged
2018-11-30 11:09:51 -08:00
baude 82bcef3895 add pod short option to ps
podman ps has a flag --pod; simply adding a short option of -p

Signed-off-by: baude <bbaude@redhat.com>
2018-11-30 09:15:11 -06:00
OpenShift Merge Robot effd63d6d5
Merge pull request #1848 from adrianreber/master
Add tcp-established to checkpoint/restore
2018-11-28 07:00:24 -08:00
Daniel J Walsh 3beacb73bc
Disable mount options when running --privileged
We now default to setting storage options to "nodev", when running
privileged containers, we need to turn this off so the processes can
manipulate the image.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-11-28 07:53:28 -05:00
Giuseppe Scrivano 95f22a2ca0
network: allow slirp4netns mode also for root containers
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-28 09:21:59 +01:00
Adrian Reber af7d67771b
Add '--tcp-established' to checkpoint/restore man page
Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-28 08:00:38 +01:00
baude 9d883d2032 add podman container|image exists
Add an exists subcommand to podman container and podman image that allows
users to verify the existence of a container or image by ID or name.  The return
code can be 0 (success), 1 (failed to find), or 125 (failed to work with runtime).

Issue #1845

Signed-off-by: baude <bbaude@redhat.com>
2018-11-26 09:19:39 -06:00
OpenShift Merge Robot e3ece3bb90
Merge pull request #1860 from TomasTomecek/version-add-format
implement --format for version command
2018-11-25 04:52:38 -08:00
Tomas Tomecek 43c20d0200 implement --format for version command
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2018-11-25 12:42:05 +01:00
Steve Phillips 22d971cd75
podman_tutorial.md typos: arguement -> argument; missing 'a'
Signed-off-by: Steve Phillips <steve@tryingtobeawesome.com>
2018-11-24 16:08:58 -08:00
OpenShift Merge Robot 1fdfeb8710
Merge pull request #1835 from adrianreber/master
Added option to keep container running after checkpointing
2018-11-21 05:11:12 -08:00
Adrian Reber 24c0739453
Update checkpoint/restore man pages
This adds the '--leave-running, -R' to the container-checkpoint man
page. As the information for '--all, -a' and '--latest, -l' was also
still missing it is included in this commit.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-20 17:25:44 +01:00
baude 690c52a113 Allow users to expose ports from the pod to the host
we need to allow users to expose ports to the host for the purposes
of networking, like a webserver.  the port exposure must be done at
the time the pod is created.

strictly speaking, the port exposure occurs on the infra container.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-20 09:49:34 -06:00
OpenShift Merge Robot 7965716c74
Merge pull request #1803 from QiWang19/issuebuildah1051
Add space between num & unit in images output
2018-11-12 13:33:28 -08:00
Qi Wang b6fabf1d21 Add space between num & unit in images output
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-11-12 14:06:31 -05:00
OpenShift Merge Robot d2f2c56aaa
Merge pull request #1794 from jmtd/patch-1
remove $-prefix from (most) shell examples
2018-11-12 09:34:45 -08:00
OpenShift Merge Robot 87668f10c1
Merge pull request #1799 from xakraz/fixes/doc_containers
docs: Fix duplicated entry for pod-container-unmount
2018-11-12 07:52:05 -08:00
Jonathan Dowland eb91f82bb2 remove $-prefix from (most) shell examples
For the shell examples related to building and installing podman, remove the
shell prompt indicator character '$'.

This makes copying and pasting lines much easier.

Retain the prompt indicator for the post-install shell examples, since they
(often) mix shell commands and shell command output, so it serves a useful
purpose to distinguish them.

Signed-off-by: Jonathan Dowland <jdowland@redhat.com>
2018-11-12 11:38:57 +00:00
Xavier Krantz c8c174aaca docs: Fix duplicated entry for pod-container-unmount
Signed-off-by: Xavier Krantz <xakraz@gmail.com>
2018-11-11 07:44:41 +01:00
Daniel J Walsh 542d8fe95f
Better document rootless containers
Need to return an error pointing user in right direction if rootless podman
fails, because of no /etc/subuid or /etc/subgid files.

Also fix up man pages to better describe rootless podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-11-10 04:46:06 -05:00
OpenShift Merge Robot 78e6d8e7d7
Merge pull request #1772 from baude/rmdelpaused
rm -f now removes a paused container
2018-11-09 10:28:14 -08:00
OpenShift Merge Robot e8e16fcc78
Merge pull request #1726 from giuseppe/default-to-fuse-overlayfs
rootless: default to fuse-overlayfs when available
2018-11-09 06:07:32 -08:00
baude 2dd9cae37c rm -f now removes a paused container
We now can remove a paused container by sending it a kill signal while it
is paused.  We then unpause the container and it is immediately killed.

Also, reworked how the parallelWorker results are handled to provide a
more consistent approach to how each subcommand implements it. It also
fixes a bug where if one container errors, the error message is duplicated
when printed out.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-08 15:18:11 -06:00
Vincent Batts da6f15ad21
podman_tutorial: cni build path has changed
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2018-11-08 14:21:25 -05:00
Giuseppe Scrivano c7926aa7ca
rootless: default to fuse-overlayfs when available
If fuse-overlayfs is present, rootless containers default to use it.
This can still be overriden either via the command line with
--storage-driver or in the ~/.config/containers/storage.conf
configuration file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-08 10:58:49 +01:00
TomSweeneyRedHat 185ec6de43 Touch up --log* options and daemons in man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-11-07 19:54:17 -05:00
baude b559c19c2f Make kill, pause, and unpause parallel.
Operations like kill, pause, and unpause -- which can operation on one or
more containers -- can greatly benefit from parallizing its main job (eq kill).

In the case of pauseand unpause, an --all option as was added. pause --all will
pause all **running** containers.  And unpause --all will unpause all **paused**
containers.

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 14:23:55 -05:00
baude 2011782d9d Make restart parallel and add --all
When attempting to restart many containers, we can benefit from making
the restarts parallel.  For convenience, two new options are added:

--all attempts to restart all containers
--run-only when used with --all will attempt to restart only running containers

Signed-off-by: baude <bbaude@redhat.com>
2018-11-01 13:14:12 -05:00
Qi Wang c285bd664e Explain the device format in man pages
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-10-23 15:14:44 -04:00
Daniel J Walsh 3157595288
Fix man page to show info on storage
Also fix lint errors.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-10-22 16:16:54 -04:00
Paul W. Frields a7a3a5ca2a Fix trivial missing markup in manpage
Signed-off-by: Paul W. Frields <stickster@gmail.com>
2018-10-18 14:22:24 -04:00
Jhon Honce 40cb756801 Add support for pod commands
* Add support for pod -- create, inspect, kill, pause, ps, rm,
  restart, start, stop, top, unpause
* Update pylintrc to better reflect pep8 code standards
* Fix various pylint reported errors
* Refactor code that determines screen width to no longer
  require initializing curses.  Improved start up time and
  pushing data blob down ssh tunnel.
* Correct pod-create man page, cgroupparent not boolean
* Abort integration tests if podman service fails to start

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-10-12 09:34:23 -07:00
Qi Wang 88673a5fcf Support auth file environment variable & add change to man pages
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-10-12 10:05:14 -04:00
OpenShift Merge Robot 6983e00a28
Merge pull request #1623 from mheon/static_ip
Add ability to specify static IPs with --ip flag
2018-10-11 10:40:37 -07:00
OpenShift Merge Robot 92b68e802c
Merge pull request #1621 from QiWang19/issue1615
Document --net as an alias of --network in podman run & create
2018-10-11 10:19:05 -07:00
Matthew Heon d2de9cd3dc Update manpages for --ip flag
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-11 11:24:08 -04:00
Qi Wang dd02559473 Document --net as an alias of --network in podman run & create
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-10-11 11:22:20 -04:00
baude 255b56ae41 fix runlabel functions based on QA feedback
Signed-off-by: baude <bbaude@redhat.com>
2018-10-11 09:52:53 -05:00
Adrian Reber 5bafafc7eb
tutorial: add checkpoint/restore to tutorial
Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-03 21:41:40 +02:00
Adrian Reber e2b639a32f
docs: add checkpoint and restore man pages
This adds the podman-container-checkpoint and
podman-container-restore man pages.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-03 21:41:40 +02:00
OpenShift Merge Robot d5687946f6
Merge pull request #1528 from baude/runlabel
Add container runlabel command
2018-10-02 17:16:43 -07:00
OpenShift Merge Robot b63b1f9cb6
Merge pull request #1562 from mheon/update_install_instructions
Update docs to build a runc that works with systemd
2018-10-02 10:34:32 -07:00
Matthew Heon dd73525fd5 Update docs to build a runc that works with systemd
Runc disables systemd cgroup support when build statically, so
don't tell people to do that now that we're defaulting to systemd
for cgroup management.

Also, fix some error messages to use the proper ID() call for
containers.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-01 10:23:06 -04:00
Daniel J Walsh 249a51a2fc
Add --all flag to podman kill
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-30 07:48:41 +02:00
baude 4f825f2e07 Add container runlabel command
Execute the command as described by a container image.  The value of the label is processed
into a command by:

1. Ensuring the first argument of the command is podman.
2. Substituting any variables with those defined by the environment or otherwise.

If no label exists in the container image, nothing is done.

podman container runlabel LABEL IMAGE extra_args
Signed-off-by: baude <bbaude@redhat.com>
2018-09-28 14:14:13 -05:00
baude 6db7027e97 Add buildah version and distribution to info
For the sake of debug and problem reporting, we would benefit from knowing
what buildah version was vendored into podman.  Also, knowing the distribution
and distribution version would also be handy.

Signed-off-by: baude <bbaude@redhat.com>
2018-09-28 10:48:16 -05:00
Daniel J Walsh 52c1365f32 Add --mount option for create & run command
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1524
Approved by: mheon
2018-09-21 21:33:41 +00:00
Daniel J Walsh fbfcc7842e Add new field to libpod to indicate whether or not to use labelling
Also update some missing fields libpod.conf obtions in man pages.

Fix sort order of security options and add a note about disabling
labeling.

When a process requests a new label.  libpod needs to reserve all
labels to make sure that their are no conflicts.

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

Closes: #1406
Approved by: mheon
2018-09-20 16:01:29 +00:00
Daniel J Walsh 800eb86338 Hooks supports two directories, process default and override
ALso cleanup files section or podman man page

Add description of policy.json
Sort alphabetically.
Add more info on  oci hooks

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

Closes: #1487
Approved by: umohnani8
2018-09-17 16:28:28 +00:00
Matthew Heon 0405555345
Merge pull request #1434 from rhatdan/wait
Add --interval flag to podman wait
2018-09-14 16:52:13 -04:00
Urvashi Mohnani 70b160ae03 Search registries with an empty query
Adds functionality to search registries implementing the v2
endpoint with an empty query, that is the results will be
all the available images on the registries.
If this is tried with a v1 registry an error will occur.
To search a whole registry, there needs to be a trailing slash
at the end, i.e `podman search registry.fedoraproject.org/`.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #1444
Approved by: rhatdan
2018-09-13 16:20:40 +00:00
Daniel J Walsh 9ec82caa31
Add --interval flag to podman wait
Waiting uses a lot of CPU, so drop back to checking once/second
and allow user to pass in the interval.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-13 10:11:00 -04:00
Daniel J Walsh 61eda671ec Add podman rm --volumes flag
While this is not implemented yet, it is needed for working with existing
docker scripts.

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

Closes: #1460
Approved by: mheon
2018-09-13 13:27:09 +00:00
Daniel J Walsh 6f2bd8d795 Change references to cri-o to point at new repository
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1425
Approved by: mheon
2018-09-07 17:47:45 +00:00
baude f0c962282b fix docs for podman build
podman build docs should now reflect that the --layers default value is true.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1424
Approved by: mheon
2018-09-07 13:37:52 +00:00
Daniel J Walsh 2e6243b185 Fix up libpod.conf man pages and referencese to it.
Remove podman --config option, since it does not do anything.

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

Closes: #1410
Approved by: mheon
2018-09-06 14:48:51 +00:00
Daniel J Walsh 1ee466eee4 We should fail Podman with ExitCode 125 by default
$ ./bin/podman  --foo
$ echo $?
125
$ ./bin/podman  foo
Command "foo" not found.
See `podman --help`.
$ echo $?
1

After this change

$ ./bin/podman  foo
Command "foo" not found.
See `podman --help`.
$ echo $?
125

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

Closes: #1398
Approved by: vrothberg
2018-09-05 14:04:50 +00:00
Daniel J Walsh 27ca091c08
Add proper support for systemd inside of podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-08-31 14:42:32 -04:00
Naja Melan de414c4354 fixup A few language changes and subuid(5)
Signed-off-by: Naja Melan <najamelan@autistici.org>

Closes: #1380
Approved by: rhatdan
2018-08-31 13:52:11 +00:00
Naja Melan 357eff7235 Make the documentation of user namespace options in podman-run clearer
This proposes a more comprehensible man page.

A number of things have been lost in translation and this should be reviewed:
- the former docs from --userns say that it is disabled by default. I
  suppose that this is the same as --userns:host, but this should be confirmed.
  It also stated that is would use options like pid=host, which confuses me
  as pid namespaces are a totally different thing from user namespaces. It also
  mentions the enabling of --privileged. I think the difference between using
  --userns:host and not using any user namespace options at all is not clear
  and maybe not very logical. Also what would be the difference between using
  --userns:host and using --priveleged alone?
- I found the syntax for --gidmap at the bottom of the man page in the examples.
  In the example it doesn't use '=', eg. podman run `--gidmap 0:30000:2000`.
  For consistency with the other options I have used '=' for now, but if it is
  optional, I would remove it everywhere, as less tokens is usually improved
  readability. For now the inconsistency remains between the options doc and the
  examples section.
- It wasn't very clear to me whether one should hard wrap long lines or not as the
  contains a mix.
- I haven't for now looked at user namespace options on other commands, but
  that should be done surely before merging.
- I didn't know which command to run to generate the groff, so that needs doing still.

from issue #1374

Signed-off-by: Naja Melan <najamelan@autistici.org>

Signed-off-by: Naja Melan <najamelan@autistici.org>

Closes: #1380
Approved by: rhatdan
2018-08-31 13:52:11 +00:00
Valentin Rothberg 1c0cd0796a docs: consistent format for example
All bash examples are now placed in a code section (```).  The PS1
prompt is set to `$`.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1375
Approved by: rhatdan
2018-08-30 16:51:56 +00:00
Valentin Rothberg 1243bfa6f1 docs: consistent headings
Base heading is level 2, which is identical to the level 1.  However
level 3 will be indendet which is used a lot in the `## EXAMPLES`
sections.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1375
Approved by: rhatdan
2018-08-30 16:51:56 +00:00
Valentin Rothberg 3f6426aeec docs: make HISTORY consistent
- second heading
 - consistent mail addresses <user@domain.com>
 - change order with latest changes first

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1375
Approved by: rhatdan
2018-08-30 16:51:56 +00:00
Valentin Rothberg 442742aa0a docs: fix headers
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1375
Approved by: rhatdan
2018-08-30 16:51:56 +00:00
Daniel J Walsh eb5fdebc84 Vendor in latest projectatomic/buildah
This will help document the defaults in podman build.

podman build --help will now show the defaults and mention
the environment variables that can be set to change them.

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

Closes: #1364
Approved by: mheon
2018-08-29 14:27:11 +00:00
Valentin Rothberg 14d567deae document --rm semantics
The `--rm` flag will only cause a container to be removed when it has
been created and started successfully.  Otherwise, it will not be
removed to allow the container to be inspected and to analyze the root
cause of the failure.  Document those semantics more clearly in the
manpages to avoid confusion for users.

Fixes: #1359
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1362
Approved by: rhatdan
2018-08-28 16:28:43 +00:00
Daniel J Walsh 1a90b2fd36 allow specification of entrypoint in the form of a slice
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1352
Approved by: mheon
2018-08-28 14:29:12 +00:00
Matthew Heon 9edea231f1 Fix manpage to note how multiple filters are combined
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1345
Approved by: umohnani8
2018-08-27 14:47:41 +00:00
Valentin Rothberg 90e93e66b0 docs: add containers-mounts.conf(5)
Add a containers-mounts.conf(5) manpage.  The mounts.conf is used by
other tools (e.g., CRI-O) as well.  A dedicated manpage reduces
redundancy.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1350
Approved by: rhatdan
2018-08-27 13:00:51 +00:00
Valentin Rothberg 3b91c5e0c5 docs: use "containers-" prefix for registries and storage
Use the "containers-" prefix for all references to the
containers-registries.conf and containers-storage.conf
configuration files.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1350
Approved by: rhatdan
2018-08-27 13:00:51 +00:00
Daniel J Walsh e7fbf329c2 Reveal information about container capabilities
I am often asked about the list of capabilities availabel to a container.
We should be listing this data in the inspect command for effective
capabilities and the bounding set.

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

Closes: #1335
Approved by: TomSweeneyRedHat
2018-08-24 12:16:19 +00:00
haircommander 2a7449362f Change pause container to infra container
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1187
Approved by: mheon
2018-08-23 18:16:28 +00:00
haircommander d5e690914d Added option to share kernel namespaces in libpod and podman
A pause container is added to the pod if the user opts in. The default pause image and command can be overridden. Pause containers are ignored in ps unless the -a option is present. Pod inspect and pod ps show shared namespaces and pause container. A pause container can't be removed with podman rm, and a pod can be removed if it only has a pause container.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1187
Approved by: mheon
2018-08-23 18:16:28 +00:00
haircommander 88df4ea0f9 Add podman pod top
Using the vendored changes from psgo, incorporate JoinNamespaceAndProcessInfoByPids to get process information for each pid namespace of running containers in the pod. Also added a man page, and tests.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1298
Approved by: mheon
2018-08-23 15:01:17 +00:00
Daniel J Walsh c32074fa4f Fix syntax description of --ulimit command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1327
Approved by: vrothberg
2018-08-23 12:49:45 +00:00
TomSweeneyRedHat 7e94fbb493 Touch up cert-dir in man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1312
Approved by: rhatdan
2018-08-21 14:29:15 +00:00
Micah Abbott e40c99a19e tutorial: point to containers/skopeo
Signed-off-by: Micah Abbott <miabbott@redhat.com>

Closes: #1300
Approved by: mheon
2018-08-18 15:19:23 +00:00
Matthew Heon 76915d5ffd Mention that systemd is the default cgroup manager
Update docs to reflect our changed default CGroup manager.

Fixes: #1292

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1293
Approved by: baude
2018-08-17 18:27:46 +00:00
Daniel J Walsh d20f3a5146 switch projectatomic to containers
Need to get some small changes into libpod to pull back into buildah
to complete buildah transition.

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

Closes: #1270
Approved by: mheon
2018-08-16 17:12:36 +00:00
Daniel J Walsh dda3a742f2 Document STORAGE_DRIVER and STORAGE_OPTS environment variable
Default settings for storage can be overriden by setting these environment
variables.

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

Closes: #1282
Approved by: mheon
2018-08-16 14:12:42 +00:00
baude 06fafe4cd0 add podman pod inspect
first pass of podman pod inspect

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1236
Approved by: rhatdan
2018-08-09 11:06:32 +00:00
Daniel J Walsh d1257b1a0b Cleanup man pages
podman does not support nocopy so remove reference in the man page.

podman build now supports --isolation, so add documentation.

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

Closes: #1225
Approved by: TomSweeneyRedHat
2018-08-08 13:34:14 +00:00
Daniel J Walsh 33d6221ae3 Have info print conmon/oci runtime information
We need into to identify the OCI runtime and conmon used by podman.

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

Closes: #1224
Approved by: baude
2018-08-07 14:16:26 +00:00
baude bd9d3a8fa5 Rename varlink socket and interface
io.projectatomic.podman -> io.podman

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1204
Approved by: mheon
2018-08-06 14:49:11 +00:00
baude 99a37afc3a Add Runc and Conmon versions to Podman Version
It will be handy to know the runc and conmon versions as our
code gets into the wild.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1207
Approved by: rhatdan
2018-08-05 23:19:47 +00:00
Daniel J Walsh 7462ebe830 Vendor in latest github.com/projectatomic/buildah
This adds support for Dockerfile.in and fixes some limits
issues on docker build

Also adds support for podman build to read Dockerfile from stdin.

cat Dockerfile | podman build -f - .

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

Closes: #1209
Approved by: mheon
2018-08-03 14:39:07 +00:00
haircommander 26b9b17d27 Added ps --pod option
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1205
Approved by: rhatdan
2018-08-02 20:39:06 +00:00
Daniel J Walsh 995ab8391d
Man page fixes found by https://pagure.io/ManualPageScan
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-08-02 09:21:43 -04:00
Daniel J Walsh 8e1ef558eb Add --force to podman umount to force the unmounting of the rootfs
podman umount will currently only unmount file system if not other
process is using it, otherwise the umount decrements the container
storage to indicate that the caller is no longer using the mount
point, once the count gets to 0, the file system is actually unmounted.

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

Closes: #1184
Approved by: TomSweeneyRedHat
2018-08-01 17:53:30 +00:00
Daniel J Walsh 00caebde61 Add documentations on how to setup /etc/subuid and /etc/subgid
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1185
Approved by: giuseppe
2018-07-31 08:35:20 +00:00
haircommander f258e43c7c Add pod pause/unpause
Added Pause() and Unpause() to libpod/pod.go

Added man pages, tests and completions

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1126
Approved by: rhatdan
2018-07-27 14:20:08 +00:00
Valentin Rothberg 159f7f179b vendor latest containers/psgo
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1162
Approved by: rhatdan
2018-07-26 17:01:40 +00:00
haircommander 73e3945282 Add pod kill
With tests, man page, and completions.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1125
Approved by: rhatdan
2018-07-25 18:22:35 +00:00
haircommander 8ce0e0b246 Added pod restart
With tests, man page and completions.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1152
Approved by: rhatdan
2018-07-25 17:54:27 +00:00
Daniel J Walsh c90b7400a8
Merge pull request #1116 from mheon/namespaces
Add Pod and Container namespaces
2018-07-25 08:47:35 -04:00
Giuseppe Scrivano e43270fc5e podman: allow to specify the IPC namespace to join
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1145
Approved by: rhatdan
2018-07-24 21:50:49 +00:00
Giuseppe Scrivano 977c8a9cd6 podman: allow to specify the UTS namespace to join
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1145
Approved by: rhatdan
2018-07-24 21:50:49 +00:00
Giuseppe Scrivano 8223fbaac6 podman: allow to specify the PID namespace to join
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1145
Approved by: rhatdan
2018-07-24 21:50:49 +00:00
Giuseppe Scrivano 819c807125 podman: allow to specify the userns to join
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1145
Approved by: rhatdan
2018-07-24 21:50:49 +00:00
Giuseppe Scrivano 41c7e43b4d network: support ns: prefix to join existing namespace
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1145
Approved by: rhatdan
2018-07-24 21:50:49 +00:00
Matthew Heon 1b51e88098 Update comments in BoltDB and In-Memory states
Better explain the inner workings of both state types in comments
to make reviews and changes easier.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-24 16:12:31 -04:00
Matthew Heon 7a358e4277 Address first round of review comments
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-24 16:12:31 -04:00
Matthew Heon 3ae0c80806 Add --namespace flag to Podman
Allows joining libpod to a specific namespace when running a
Podman command.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-24 16:12:31 -04:00
Daniel J Walsh 153d33814d We don't currently support --mac-address
Make this clear in the docs and Command.

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

Closes: #1138
Approved by: mheon
2018-07-24 14:52:30 +00:00
Daniel J Walsh 07fe4e51cb Vendor in latest containers/psgo code
Fixes spaces and sorting on capabilties and Descriptors

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

Closes: #1148
Approved by: vrothberg
2018-07-24 14:21:06 +00:00
Daniel J Walsh 2c11e38b24 Add format descriptors infor to podman top
Trying to play with podman top, I had a hard time
finding info on format options.

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

Closes: #1134
Approved by: umohnani8
2018-07-23 17:02:12 +00:00
Valentin Rothberg acd28b9fc9 docs/podman-top: fix typo and whitespace
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1131
Approved by: mheon
2018-07-23 13:34:19 +00:00
Matthew Heon 72c82fb79e
Merge pull request #1117 from haircommander/pod-start-stop1
Add pod start and stop
2018-07-20 13:50:54 -04:00
haircommander 17f257140e Added pod start and stop
As well as added tests, man pages, and completions.
Also reformatted and refactored a couple of other small things in the other pod commands.

Signed-off-by: haircommander <pehunt@redhat.com>
2018-07-20 08:44:44 -04:00
Giuseppe Scrivano d4f14be3a7
rootless: support a per-user mounts.conf
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-20 11:00:53 +02:00
Giuseppe Scrivano c737d01937
rootless: allow a per-user registries.conf file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-20 11:00:52 +02:00
Giuseppe Scrivano 067ae31095
rootless: allow a per-user storage.conf file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-20 11:00:50 +02:00
Giuseppe Scrivano c17f8f664c
rootless, docs: document the libpod.conf file used in rootless mode
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-20 11:00:49 +02:00
Valentin Rothberg ba1871dac0 podman-top: use containers/psgo
Use github.com/containers/psgo instead of execing `ps (1)`.  The psgo
library enables a much more flexible interface with respect to which
data to be printed (e.g., capabilities, seccomp mode, PID, PCPU, etc.)
while the output can be parsed reliably.  The library does not use
ps (1) but parses /proc and /dev instead.  To list the processes of a
given container, psgo will join the mount namespace of the given
container and extract all data from there.

Notice that this commit breaks compatibility with docker-top.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1113
Approved by: rhatdan
2018-07-19 20:47:52 +00:00
William Zhang 4692f3ab32 Update podman_tutorial.md
Fix the familiarizing-yourself-with-podman link.

Signed-off-by: William Zhang <warmchang@outlook.com>

Closes: #1108
Approved by: rhatdan
2018-07-18 15:23:22 +00:00
Giuseppe Scrivano 6372c977ea rootless: require subids to be present
Most images won't work without multiple ids/gids.  Error out
immediately if there are no multiple ids available.

The error code when the user is not present in /etc/sub{g,u}id looks
like:

$ bin/podman run --rm -ti alpine echo hello
ERRO[0000] No subuid ranges found for user "gscrivano"

Closes: https://github.com/projectatomic/libpod/issues/1087

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1097
Approved by: rhatdan
2018-07-16 13:40:40 +00:00
haircommander a04a8d1dd4 Added full podman pod ps, with tests and man page
Signed-off-by: haircommander <pehunt@redhat.com>
2018-07-13 09:17:33 -04:00
haircommander 1aad3fd96b Podman pod create/rm commands with man page and tests.
Includes a very stripped down version of podman pod ps, just for testing

Signed-off-by: haircommander <pehunt@redhat.com>
2018-07-13 09:05:03 -04:00
Daniel J Walsh e615b7d671 Log all output of logrus to syslog as well as stdout/stderr
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1084
Approved by: baude
2018-07-12 21:19:05 +00:00
umohnani8 4855998f1c Add --volumes-from flag to podman run and create
podman now supports --volumes-from flag, which allows users
to add all the volumes an existing container has to a new one.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #931
Approved by: mheon
2018-07-09 19:30:03 +00:00
TomSweeneyRedHat 99959e55fa Fix nits and GOPATH in tutorial
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1052
Approved by: baude
2018-07-06 00:49:56 +00:00
W. Trevor King f2462ca59e docs: Follow man-pages(7) suggestions for SYNOPSIS
man-pages(7) has [1]:

> For commands, this shows the syntax of the command and its arguments
> (including options); boldface is used for as-is text and italics are
> used to indicate replaceable arguments. Brackets ([]) surround
> optional arguments, vertical bars (|) separate choices, and ellipses
> (...) can be repeated.

I've adjusted our SYNOPSIS entries to match that formatting, and
generally tried to make them more consistent with the precedent set by
the man-pages project.  Outside of the SYNOPSIS entry, I prefer using
backticks for literals, although in some places I've left the **
bolding to keep things visually similar to a nearby SYNOPSIS entry.

[1]: http://man7.org/linux/man-pages/man7/man-pages.7.html

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #1027
Approved by: rhatdan
2018-07-04 09:40:37 +00:00
TomSweeneyRedHat 6d8fac87ed Allow multiple mounts
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1030
Approved by: rhatdan
2018-07-03 18:02:45 +00:00
Daniel J Walsh 7fc1a329bd Add podman container cleanup to CLI
When we run containers in detach mode, nothing cleans up the network stack or
the mount points.  This patch will tell conmon to execute the cleanup code when
the container exits.

It can also be called to attempt to cleanup previously running containers.

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

Closes: #942
Approved by: mheon
2018-06-29 15:25:21 +00:00
TomSweeneyRedHat 41bd607c12 Allow multiple containers and all for umount
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1012
Approved by: rhatdan
2018-06-29 15:01:21 +00:00
umohnani8 3b9046a170 Remove the --registry flag from podman search
Instead of setting the --registry flag to search a single registry,
prefix the registry before the image name in the input, an example is
`podman search registry.fedoraproject.org/fedora` and this will search for
the fedora image in only registry.fedoraproject.org.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #1011
Approved by: rhatdan
2018-06-28 16:55:29 +00:00
Giuseppe Scrivano 19f5a504ff docs: add documentation for rootless containers
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #936
Approved by: rhatdan
2018-06-27 14:07:17 +00:00
umohnani8 c75f4d4e70 Add --authfile to podman search
Since podman search requires credentials to search private registries,
add the --authfile flag to allow users to pass in credentials from a
different authfile than the default one.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #998
Approved by: rhatdan
2018-06-27 09:46:50 +00:00
Daniel J Walsh 208b9a6b6b Add podman-image and podman-container man page links
podman image and podman container have alternate CLI
to standard CLI for a lot of commands.  The man pages
can be shared between both.  This patch adds links so that
of some executes

`podman image load`, they will actually see the `podman load` man page.

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

Closes: #993
Approved by: mheon
2018-06-25 21:38:46 +00:00
Matthew Heon 7cdddf7fad Point podman-refresh at the right manpage
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #981
Approved by: baude
2018-06-22 19:26:46 +00:00
Matthew Heon f557523207 Add manpages for podman refresh
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #981
Approved by: baude
2018-06-22 19:26:46 +00:00
Daniel J Walsh 3092d20847 Fix docs on --sig-proxy to match current behaviour
Signals are proxied to the container process whether or not
the tty is used

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

Closes: #984
Approved by: mheon
2018-06-22 15:42:01 +00:00
TomSweeneyRedHat 89af35175d Add cap-add and cap-drop to build man page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #968
Approved by: mheon
2018-06-22 14:55:32 +00:00
Daniel J Walsh 2c81a756e3 Update the version of conmon used in test
Also start using podmin in /usr/libexec/podman rather then crio.

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

Closes: #979
Approved by: baude
2018-06-22 13:19:08 +00:00
haircommander 4ab054073d Added --sort to ps
Also podman ps now allows user to only output size of root FS, changed language of images and ps --sort to be by "created" as opposed to "time", and refactored the way templates are created (converted from psJSONParams type).

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #948
Approved by: rhatdan
2018-06-19 14:45:29 +00:00
haircommander d8f2cb8622 TLS verify is skipped per registry.
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #952
Approved by: rhatdan
2018-06-18 18:46:55 +00:00