Commit graph

682 commits

Author SHA1 Message Date
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
umohnani8 db094f6e15 Add --all,-a flag to podman images
podman images will not show intermediate images by default.
To view all images, including intermediate images created during
a build, use the --all flag.

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

Closes: #947
Approved by: rhatdan
2018-06-18 14:41:51 +00:00
haircommander b43677c9fd Added --tls-verify functionality to podman search, with tests
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #932
Approved by: baude
2018-06-15 17:09:33 +00:00
Giuseppe Scrivano 7bdfb4f9b3 podman: accept option --rootfs to use exploded images
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #871
Approved by: mheon
2018-06-15 14:53:18 +00:00
umohnani8 6bdf023aea Vendor in latest projectatomic/buildah
Adds --rm and --force-rm to podman build.

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

Closes: #945
Approved by: rhatdan
2018-06-14 19:24:37 +00:00
umohnani8 8d5da78b0e Doc changes to fix alignment on most of the docs
Went through the docs and fixed the alignment so they
all match up and look readable when doing 'man podman [command]"

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

Closes: #943
Approved by: rhatdan
2018-06-14 17:18:45 +00:00
haircommander b868470238 Added --sort flag to podman image
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #937
Approved by: rhatdan
2018-06-14 10:26:21 +00:00
Daniel J Walsh 65033b586f add podman container and image command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #941
Approved by: TomSweeneyRedHat
2018-06-13 14:30:45 +00:00
Daniel J Walsh be217caa38 Vendor in latest buildah code
This will add --layers support.
Also add missing information in man pages on podman build features.

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

Closes: #938
Approved by: umohnani8
2018-06-13 12:49:32 +00:00
TomSweeneyRedHat 9b72746f9a Touchups for registries.conf across a few man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #927
Approved by: rhatdan
2018-06-11 20:38:37 +00:00
TomSweeneyRedHat 2b372e6ac9 Touch up whitespace issue in build man
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-06-07 11:22:09 -04:00
TomSweeneyRedHat b1ebad93b4 Add disable-content flag info to man page for build
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #916
Approved by: rhatdan
2018-06-06 20:15:06 +00:00
Micah Abbott 16c09f847b podman-run: clean up some formatting issues
Signed-off-by: Micah Abbott <miabbott@redhat.com>

Closes: #911
Approved by: rhatdan
2018-06-06 19:43:58 +00:00
TomSweeneyRedHat 781eec27b5 Add pointers for Integration Tests to docs
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #910
Approved by: rhatdan
2018-06-06 18:45:57 +00:00
Daniel J Walsh 7b2b2bc631 Add --all flag even though it is a noop so scripts will work
Until podman build supports caching, their are no intermediary builds,
but people might still use scripts that use the --all option.
Adding this will not hurt anything and could fix scripts.

Also fixed sorting issues in options handling of images

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

Closes: #896
Approved by: mheon
2018-06-05 21:46:57 +00:00
Matthew Heon 6d52ebdd13 Add flag to add annotations to a container
Also add annotations from the image the container was created
from.

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

Closes: #886
Approved by: rhatdan
2018-06-04 17:52:28 +00:00
Daniel J Walsh 29c831f9d6 Add OnBuild support for podman build
Only supported for docker formated images. OCI Does not support this flag.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-06-01 10:08:56 -04:00
Daniel J Walsh 71487466fb Cleanup man pages
Format md files to work properly when converted to man pages.
Add sed command to cleanup table in podman man page.

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

Closes: #842
Approved by: mheon
2018-05-30 13:49:45 +00:00
Daniel J Walsh 915364034f Update podman build to match buildah bud functionality
Add --label, --annotations, --idfile, --squash

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

Closes: #824
Approved by: TomSweeneyRedHat
2018-05-23 22:38:17 +00:00
Joe Doss c1efde20e0 Clarify using podman build with a URL, Git repo, or archive.
Signed-off-by: Joe Doss <joe@solidadmin.com>

Closes: #822
Approved by: rhatdan
2018-05-23 17:40:25 +00:00
baude ae7c45968d set varlink timeout to 1 seconds
Add option to varlink for --timeout.  Input for this option is in milliseconds

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

Closes: #814
Approved by: baude
2018-05-22 13:50:10 +00:00
baude 3f6a739ede finish changing the path for varlink
cleanup the last references to /run/io.projectatomic... and make sure
/run/podman/projectatomic... is used.

Signed-off-by: baude <bbaude@redhat.com>
2018-05-19 10:00:52 -05:00
Daniel J Walsh 9d7c50aa03 Tighten the security on the podman varlink socket
We only want root to be allowed to access this socket.
Also move socket to /run/podman directory.  This requires
us to drop a podman.conf tmpfiles.d file.

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

Closes: #806
Approved by: mheon
2018-05-19 07:47:03 +00:00
Peter Oliver 3f8587926a Fix typo
Signed-off-by: Peter Oliver <git@mavit.org.uk>

Closes: #792
Approved by: rhatdan
2018-05-17 23:41:18 +00:00
W. Trevor King 92a9f3a212 docs/podman.1: Link to hook documentation
Collecting the Podman/libpod specifics in one place allows us use the
hooks documentation which the previous commit made more generic.

The re-ordered SEE ALSO is because [1]:

> The list should be ordered by section number and then alphabetically
> by name.

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

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

Closes: #772
Approved by: mheon
2018-05-17 18:22:10 +00:00
TomSweeneyRedHat 4eecbdbf11 Update Tutorial with Fedora kit location
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #779
Approved by: mheon
2018-05-16 16:21:37 +00:00
Daniel J Walsh 9fcc475d03 Support pulling Dockerfile from http
Currently podman build http://remote.com/Dockerfile does not work.
podman always treats this file as an Archive.

Vendoring in the latest buildah code fixes this issue.  Also updated
the man pages to better explain the syntax.

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

Closes: #775
Approved by: TomSweeneyRedHat
2018-05-16 14:39:55 +00:00
baude 061384413c improve podman commit documentation and error messages
document --format|-f in the commit man page.  also, improve the error
message when user tries to use -m with the oci image format.

Resolves: 765

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

Closes: #768
Approved by: rhatdan
2018-05-15 20:38:56 +00:00
TomSweeneyRedHat 5f6cdebacb Touch up logo links
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #771
Approved by: mheon
2018-05-15 17:35:11 +00:00
TomSweeneyRedHat a1ac074126 Add the Podman Logo
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #769
Approved by: rhatdan
2018-05-15 14:02:08 +00:00
baude 9657cd6c15 Fix varlink remove image force
Fixes a bug where the force bool was being ignored when deleting images
via the varlink interface.

Also, minor fix to the docs to add a line break between methods and types in
the doc index.

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

Closes: #753
Approved by: rhatdan
2018-05-11 16:05:10 +00:00
Matthew Heon 853c5c41f1 Add --cgroup-manager flag to Podman binary
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #507
Approved by: baude
2018-05-11 14:43:57 +00:00
baude a74107b506 alphabetize the varlink methods, types, and errors in the docs
We have decided to alphabetize things in the API documentation to help users
find things easier.  It also solves an issue where when being made, the API.md doc
would remake itself in a different order resulting in massive diffs in the pull
requests but no new content.

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

Closes: #739
Approved by: baude
2018-05-10 14:32:34 +00:00
baude 25263558f1 Generate varlink API documentation automatically
Using varlink's idl parser, we generate API documentation for the podman
API relying on the .varlink file as the source.

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

Closes: #734
Approved by: baude
2018-05-08 21:01:28 +00:00
Daniel J Walsh b51d737998 Begin wiring in USERNS Support into podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #690
Approved by: mheon
2018-05-04 17:15:55 +00:00
Daniel J Walsh fae5033a01 Make podman commit to localhost rather then docker.io
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #715
Approved by: mheon
2018-05-03 13:12:46 +00:00
baude 64dc8039e9 remove options from create/run that we cannot support
Signed-off-by: baude <bbaude@redhat.com>

Closes: #711
Approved by: rhatdan
2018-05-02 18:54:14 +00:00
TomSweeneyRedHat 40da888274 Add iidfile parame to build and commit man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #693
Approved by: mheon
2018-04-30 21:31:46 +00:00
umohnani8 d5d6e68592 Make ':' a restricted character for file names
file names for podman load, save, export, and import cannot
contain ":" in them. It is a reserved character for parsing
filenames.

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

Closes: #694
Approved by: rhatdan
2018-04-30 19:58:22 +00:00
TomSweeneyRedHat d7d0e13837 Add isolation note to build man page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #677
Approved by: rhatdan
2018-04-26 14:11:12 +00:00
Daniel J Walsh 99d180efcc Modify man pages so they compile correctly in mandb
This fixes an issue where if you did
man -k podman-run

podman-run (1)    - (unknown subject)

Now you will see

man -k podman-run
podman-run (1)       - Run a command in a new container

More importantly

man -k containers | grep podman
podman (1)           - Simple management tool for containers and images
podman-kill (1)      - Kills one or more containers with a signal
podman-pause (1)     - Pause one or more containers
podman-ps (1)        - Prints out information about containers
podman-rm (1)        - Remove one or more containers
podman-start (1)     - Start one or more containers
podman-stats (1)     - Display a live stream of 1 or more containers' resource usage statistics
podman-stop (1)      - Stop one or more containers
podman-unpause (1)   - Unpause one or more containers
podman-wait (1)      - Waits on one or more containers to stop and prints exit code

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

Closes: #676
Approved by: mheon
2018-04-26 13:46:14 +00:00
Daniel J Walsh c78ce0e8fd
Merge pull request #641 from nathwill/man-libpod
add libpod.conf man page (closes #537)
2018-04-23 20:49:30 -04:00
baude 8493dba23c Initial varlink implementation
Signed-off-by: baude <bbaude@redhat.com>

Closes: #627
Approved by: mheon
2018-04-23 14:29:45 +00:00
Nathan Williams 79f08c4699 add libpod.conf man page
Signed-off-by: Nathan Williams <nath.e.will@gmail.com>
2018-04-21 22:37:21 -07:00
baude 95f272a0c5 Allow podman start to attach to a running container
If a container is already running, and a user asks to start it -a (attach), we should
honor this and attach to the container.

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

Closes: #634
Approved by: baude
2018-04-18 14:44:51 +00:00
baude 313e5e83e9 regression: tls verify should be set on registries.conf if insecure
In the case where podman needs to pull an image, if that registry that the image
resides on is known to be insesure (as defined in /etc/containers/registries.conf),
tls-verify should be altered on the fly.

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

Closes: #626
Approved by: mheon
2018-04-18 14:07:59 +00:00
umohnani8 6449704232 Modify diff and inspect docs
Format the examples in podman-diff.md better.
The description for --type in the inspect docs was slightly different
from that in the inline help.
Also stated what values to use in the Go template for the --format flag.

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

Closes: #620
Approved by: mheon
2018-04-17 14:49:47 +00:00
baude 1700f2b238 Use buildah commit for podman commit
Resolves: #586 and #520
Signed-off-by: baude <bbaude@redhat.com>

Closes: #592
Approved by: mheon
2018-04-10 13:31:59 +00:00
Matthew Heon 4640e79667 Add conmon-pidfile flag to bash completions/manpages
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #584
Approved by: rhatdan
2018-04-03 17:13:43 +00:00
Daniel J Walsh 7d4f82c020 Add files section to podman man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #536
Approved by: TomSweeneyRedHat
2018-03-26 12:03:20 +00:00
Matthew Heon c1ff034a6c Small manpage reword
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #533
Approved by: baude
2018-03-23 15:22:01 +00:00
Matthew Heon 5fc5b4eacb Document .containerenv in manpages. Move it to /run.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #533
Approved by: baude
2018-03-23 15:22:01 +00:00
Daniel J Walsh d7acfb478e
Merge pull request #447 from mheon/sig_proxy
Add signal proxying to podman run and attach
2018-03-16 10:34:32 -04:00
Matthew Heon 5c20bc4963 Add restart to main podman manpage
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #503
Approved by: rhatdan
2018-03-16 13:55:49 +00:00
Matthew Heon 95cad5a477 Make manpage more clear
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #503
Approved by: rhatdan
2018-03-16 13:55:49 +00:00
Matthew Heon 2724434369 Add 'podman restart' command
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #503
Approved by: rhatdan
2018-03-16 13:55:49 +00:00
Matthew Heon cd73a6904d Add signal proxying to podman run, start, and attach
Also removes sig-proxy from 'podman create', where is does not
make sense.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-15 16:00:20 -04:00
Daniel J Walsh 647fedc2a2 We should not allow a user to mount a container with a different label
We need to get the label from the container and mount with it.

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

Closes: #502
Approved by: mheon
2018-03-15 19:08:54 +00:00
Daniel J Walsh 97c2c33978 Remove references to container restart on create/run command
podman does not support autorestart.  Should use systemd if you
want containers to restart

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

Closes: #487
Approved by: edsantiago
2018-03-14 16:06:41 +00:00
Matthew Heon 58c35daea2
Merge pull request #471 from TomSweeneyRedHat/dev/tsweeney/podmanman
Update commands section to a table and add missing commands
2018-03-12 15:45:39 -04:00
Matthew Heon b78a450cd5 Remove crio.conf references from manpages
Also changes a few docker-login references to podman-login.

Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #473
Approved by: rhatdan
2018-03-12 14:38:41 +00:00
TomSweeneyRedHat 8898621b4e Update commands section to a table and add missing commands
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-03-10 15:14:14 -05:00
baude 4344639508 podman import, load, and commit are too verbose
The progress should not be show for import, load, and commit.  It makes machine
parsing of the output much more difficult.  Also, each command should output an
image ID or name for the user.

Added a --verbose flag for users that still want to see progress.

Resolves issue #450

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

Closes: #456
Approved by: rhatdan
2018-03-07 20:59:11 +00:00
TomSweeneyRedHat 042139673e Add buildah bud options from common.go
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #453
Approved by: rhatdan
2018-03-06 23:55:46 +00:00
Ed Santiago e8fbe93e29 docs: podman-top: fix nonworking example
(minor) One example in the podman-top man page results in an
error when actually invoked:

    unable to find PID field in ps output. try a different set of ps arguments

Cause: commit 6cb1c31d (PR #400) has to check PIDs in order to
filter those in the container.

Solution: add 'pid' to the list of requested output fields in
the sample command.

Signed-off-by: Ed Santiago <santiago@redhat.com>

Closes: #457
Approved by: rhatdan
2018-03-06 23:32:33 +00:00
baude 11091041c2 docs/podman-info.1.md update man page
update man page with example outputs.  tidy up the man page
where applicable.

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

Closes: #429
Approved by: rhatdan
2018-03-01 17:59:08 +00:00
Ed Santiago 683dc89baf (minor) correct misspellings in man pages
Signed-off-by: Ed Santiago <santiago@redhat.com>

Closes: #410
Approved by: baude
2018-02-27 18:59:10 +00:00
baude b351b12e27 Tagging an image alias by shortname
When trying to tag an alias (tag) of an image using only the shortname
and no tag, we were unable to find the image in storage.  This corrects
that issue and adds an integration test to protect against regression. I
also updated the man page per the filed issue.

While writing the integration test, I discovered that inspect could also
not find a tagged image without its :tag.

Resolves Issue #385
Resolves Issue #384

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

Closes: #398
Approved by: mheon
2018-02-26 18:28:54 +00:00
umohnani8 3d395767d8 Implement --image-volumes for create and run
--image-volumes tells podman what to do with the image volumes in the image config
There are 3 options: bind, tmpfs, and ignore
bind puts the volume contents in /var/lib/containers/storage/container-id/volumes/vol-dir
and bind mounts it into the container at /vol-dir
tmpfs mounts /vol-dir as a tmps into the container
ignore doesn't mount the image volumes onto the container

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

Closes: #377
Approved by: rhatdan
2018-02-22 15:14:00 +00:00
baude 6ce70a33c5 Inspect output should be in array form
Inspect should be able to inspect one or more containers depending
on the user input.  Therefore, inspect output should be in array
format so the consumer could potentially iterate it.  This PR allows
users to specify one more or containers|images|or a mix for
inspection.  The output, as stated, is therefore in array form.  This
holds true even for a singular image.

In the case that the user enters an invalid container|image "name", we
handle that gracefully.  Podman will output json for the valid names
until it reaches the invalid one.  For example:

In this case, podman will out the json for alpine and then print an
error about 123 being invalid.  It will not continute onto busybox.
This behavior imatates docker.

This addresses issue #360

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

Closes: #371
Approved by: baude
2018-02-21 14:22:36 +00:00
Matthew Heon e929e7de4c Add --time alias to manpages
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #375
Approved by: rhatdan
2018-02-21 13:32:59 +00:00
Ed Santiago 2cfe9cbf38 language: correct 'vice versa' in docs
Signed-off-by: Ed Santiago <santiago@redhat.com>
2018-02-19 09:45:30 -07:00
TomSweeneyRedHat ab88304162 Touch up tutorial location and install reqs
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #337
Approved by: rhatdan
2018-02-15 19:51:46 +00:00
baude 409ed259c6 Return imageid from podman pull
When using podman to pull an image, print the image id after
the image is pulled.

Resolves issue #329

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

Closes: #342
Approved by: rhatdan
2018-02-15 17:18:08 +00:00
Daniel J Walsh 2e96acf300 Change json to match docker inspect
Changing these fields caused the output of podman inspect to more
closely match docker inspect.

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

Closes: #306
Approved by: mheon
2018-02-11 11:50:34 +00:00
baude fa9658cbfa podman logs: fix tailing
Fix issues with tailing of container logs as described
in issue #16.  Also add in the ability to use a duration or
known time stamp formats for the --since flag.

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

Closes: #317
Approved by: mheon
2018-02-09 15:27:52 +00:00
baude 4cfd0f50fb docs/tutorials/podman_tutorial.md
Update now that more of the podman commands are working
correctly, esp top and friends.

Signed-off-by: baude <bbaude@redhat.com>
2018-02-07 15:07:31 -06:00
Daniel J Walsh 588c9bb5de
Merge pull request #289 from TomSweeneyRedHat/dev/tsweeney/username
Change un/pwd handling to match Buildah's
2018-02-07 14:07:54 -05:00
Daniel J Walsh 6716581545
Merge pull request #303 from umohnani8/certs
Change default certs dir to /etc/containers/certs.d
2018-02-07 14:06:25 -05:00
Daniel J Walsh 1fde1a0de7 Change sudo examples to use $ instead of $
sudo is not required when running as root, and # indicates
that you are already root.  $ indicates you are not root.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-02-07 09:34:04 -05:00
umohnani8 fff9a1ee20 Change default certs dir to /etc/containers/certs.d
Updated man pages to reflect the change

Signed-off-by: umohnani8 <umohnani@redhat.com>
2018-02-06 17:10:10 -05:00
umohnani8 367213a394 Match podman inspect output to docker inspect
Made a change to make sure that the output paths of podman inspect
matches that of docker inspect. For example to get the stop signal
you should be able to do podman inspect ctr --format {{.Config.StopSignal}}
and the same thing in docker will give the same results.

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

Closes: #292
Approved by: rhatdan
2018-02-06 19:31:55 +00:00
Matthew Heon 69d75a8251 Touchup podman kill manpage
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #299
Approved by: rhatdan
2018-02-06 19:03:57 +00:00
umohnani8 0d7e6fa22f Add podman search command
podman search queries a registry for a matching image and prints
the output.
I added a new flag called "registry" giving the user the option
to search a specific registry if they don't want to search all
their default registries.

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

Closes: #241
Approved by: rhatdan
2018-02-06 18:09:31 +00:00
Lokesh Mandvekar 31c56e2b9c avoid period character at the beginning of newline
Otherwise causes rpmlint error for manpage

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Closes: #296
Approved by: baude
2018-02-06 16:18:49 +00:00
TomSweeneyRedHat bb37c11651 Change un/pwd handling to match Buildah's
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-02-06 09:29:23 -05:00
baude 910baf433f Deprecate --format for podman top
Issue #169 describes a common failure when running podman top where
if the commands inside the container container a space in them, podman
will panic.  This was occuring because we take the output from ps and
attempt to format it nicely for output and things like JSON.  Given that
this cannot be predicted or dealt with programatically, the decision was
made to deprecate the format switch and simply output what ps provides
us.

Migrated top integration tests to ginkgo.

Resolves Issue: https://github.com/projectatomic/libpod/issues/169

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

Closes: #291
Approved by: rhatdan
2018-02-05 15:41:06 +00:00
Daniel J Walsh 095aaaa639 Allow users to specify logpath
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #135
Approved by: mheon
2018-02-03 19:49:14 +00:00
TomSweeneyRedHat 03cfe5ebbe Add authfile, cert-dir and creds params to build
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #280
Approved by: mheon
2018-02-01 14:43:54 +00:00
baude b3f8eef8d8 docs/tutorials/podman_tutorial.md: Add Ubuntu
Adding in how to install and run podman on Ubuntu.

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

Closes: #275
Approved by: baude
2018-01-30 23:51:27 +00:00
Daniel J Walsh 099b5fb6f6 Ran spell checker through all man pages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #269
Approved by: TomSweeneyRedHat
2018-01-29 15:21:34 +00:00
umohnani8 12e3d9d8a2 Fix podman stats based on QE feedback
QE found issues with formatting the go template and
the man page was lacking information.
Changed the format of the output to match latest docker.
Add shortID function that returns the truncated ID

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

Closes: #258
Approved by: rhatdan
2018-01-25 03:23:10 +00:00
baude b74e38b042 podman port
podman port reports the port mappings per container.  it can be used
to report the ports ofa single container or latest container or all
containers.

in the case of a single container, the user can add an option filter for
port and protocol.

Signed-off-by: baude <bbaude@redhat.com>
2018-01-23 08:54:57 -06:00
TomSweeneyRedHat 67f06cf1cf Touchup build to add missing -q flag
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #247
Approved by: rhatdan
2018-01-20 05:41:24 +00:00
Daniel J Walsh 858116f648
Merge pull request #216 from rhatdan/docker
Add support for mimicing docker CLI
2018-01-18 14:51:46 -05:00
Daniel J Walsh 0207e629ee Add support for mimicing docker CLI
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-01-18 07:01:48 -05:00
TomSweeneyRedHat 0aa2459b2d Slim down README.md and make tutorials page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-01-17 15:49:06 -05:00
Daniel J Walsh d4e4878ec3 Remove --storage-opt from podman run/create
podman command has storage options as a global option,
these should be set there, rather then in the create and
run commands.

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

Closes: #234
Approved by: baude
2018-01-17 14:49:23 +00:00
umohnani8 2bfb31ddf4 Implement and test the following flags for podman run and create
memory, memory-reservation, memory-swap, memory-swappiness, kernel-memory,
cpu-period, cou-quota, cpu-shares, cpus, cpuset-cpus, cpuset-mems,
blkio-weight, blkio-weight-device, sysctl, and ulimit

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

Closes: #221
Approved by: mheon
2018-01-15 19:27:10 +00:00
baude 245a338f5a Add latest to wait
It is desirable to have a --latest switch on the podman wait
command so we can wait on the latest container created to end.

Also, fixes a panic with latest where no containers are available.

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

Closes: #201
Approved by: baude
2018-01-08 22:44:38 +00:00
baude 7b08aa78e4 Shortcut for most recent container
It is desirable to have a shortcut for the most
recently created container.  We can now use "**latest"
to represent the most recent container instead of its
container ID or name.  For example:

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

Closes: #179
Approved by: baude
2018-01-08 19:12:17 +00:00