85 Commits

Author SHA1 Message Date
0b57e77d7c libpod: support for cgroup namespace
allow a container to run in a new cgroup namespace.

When running in a new cgroup namespace, the current cgroup appears to
be the root, so that there is no way for the container to access
cgroups outside of its own subtree.

By default it uses --cgroup=host to keep the previous behavior.

To create a new namespace, --cgroup=private must be provided.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-18 10:32:25 +02:00
3e53bfe36e Make the healthcheck flags compatible with Docker CLI
Docker CLI calls the healthcheck flags "--health-*", instead of
"--healthcheck-*".

Introduce the former, in order to keep compatibility, and alias
the later, in order to avoid breaking current usage.

Change "--healthcheck-*" to "--health-*" in the docs and tests.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-07-16 06:15:28 +02:00
e4cba7d36a create: improve parser for --healthcheck-command
Fix Docker CLI compatibility issue: the "--healthcheck-command" option
value should not be split but instead be passed as single string to
"CMD-SHELL", i.e. "/bin/sh -c <opt>".

On the other hand implement the same extension as is already available
for "--entrypoint", i.e. allow the option value to be a JSON array of
strings. This will make life easier for tools like podman-compose.

Updated "--healthcheck-command" option values in tests accordingly.

Continuation of #3455 & #3507

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
2019-07-14 10:33:01 +03:00
6f3e7f7ecc Merge pull request #3557 from rhatdan/env
Add support for --env-host
2019-07-12 10:33:18 +02:00
369f8b8862 Fix spelling mistakes in man pages and other docs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-11 17:56:54 -04:00
efe9c5b0e7 Add glob parsing for --env flag
Sometimes you want to add a few environmen variables based on the last field being a "*".

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-11 17:15:20 -04:00
2b64f88446 Merge pull request #3491 from giuseppe/rlimit-host
podman: add --ulimit host
2019-07-11 21:35:37 +02:00
df75fc62c8 Add support for -env-host
This flag passes the host environment into the container.  The basic idea is to
leak all environment variables from the host into the container.

Environment variables from the image, and passed in via --env and --env-file
will override the host environment.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-11 13:25:47 -04:00
fb88074e68 podman: add --ulimit host
add a simple way to copy ulimit values from the host.

if --ulimit host is used then the current ulimits in place are copied
to the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-08 19:22:54 +02:00
69a229b24b docs: fix --healthcheck-command option
Make the documentation agree with the code.

Related #3507

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
2019-07-08 19:06:01 +03:00
7e3f1c21b0 libpod: specify a detach keys sequence in libpod.conf
Add the ability of specifying a detach keys sequence in libpod.conf

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-26 10:12:34 +02:00
47e2ad8ec3 Fix documentation for log-driver
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-19 12:50:05 -04:00
292a48cab4 cmd, docs, test: fix some typos
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-18 10:52:19 +02:00
23efe4cb81 storage: support --mount type=bind,bind-nonrecursive
add support for not recursive bind mounts.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-13 15:32:45 +02:00
19e0928037 standardize documentation formatting
Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-06-10 11:48:02 -04:00
18d7fcb5eb Update completions and docs to use k8s file as log driver
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-28 11:10:57 -04:00
5eb321ac37 podman: honor env variable PODMAN_USERNS
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-24 17:34:13 +02:00
f09370c68b userns: add new option --userns=keep-id
it creates a namespace where the current UID:GID on the host is mapped
to the same UID:GID in the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-24 17:34:12 +02:00
baed81029b Fixup Flags
Mark hidden all references to signature-policy
Default all uses of --authfile
Add --authfile support to podman run and podman create.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-05-20 13:53:32 -04:00
627dbd49c5 Merge pull request #3072 from mheon/no_rm_volume
Do not remove volumes when --rm removes a container
2019-05-08 23:03:55 +02:00
0e27212254 podman-run|create man updates
the healthcheck commands were not being specified in the man pages for
run and create.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-07 10:34:48 -05:00
5c6ff901ba Do not remove volumes when --rm removes a container
This duplicates Docker behavior for the `--rm` flag.

Fixes #3071

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-06 13:17:34 -04:00
ceaaed7810 Fix manpage typos
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-03 12:21:32 -04:00
d7c367aa61 Address review comments on restart policy
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-03 10:36:16 -04:00
357e4c37e9 Add manpage information for restart policy
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-03 10:36:16 -04:00
237dec441a docs: Fix typo "healthcheck" pt2
Replaces #2988.  Want to get this is for v1.3.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-05-02 12:04:17 -04:00
cf982f1480 http-proxy: improve docs
Signed-off-by: James Cassell <code@james.cassell.me>
2019-05-01 20:56:57 -04:00
354d80626a auto pass http_proxy into container
Signed-off-by: James Cassell <code@james.cassell.me>
2019-04-30 17:29:29 -04:00
3a4be4b66c Add --read-only-tmpfs options
The --read-only-tmpfs option caused podman to mount tmpfs on /run, /tmp, /var/tmp
if the container is running int read-only mode.

The default is true, so you would need to execute a command like

--read-only --read-only-tmpfs=false to turn off this behaviour.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-26 12:29:10 -04:00
0cd92eae65 Resolve review comments
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 10:12:18 -04:00
323dc526ce Add manpages and completions for dns=none and no-hosts
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 10:12:18 -04:00
f29a765573 Corrected detach man pages and code comments
* Updated documentation to match code

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-03-13 14:16:37 -07:00
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
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
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
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
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
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
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
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
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
b504623a11 Merge pull request #1317 from rhatdan/privileged
Disable mount options when running --privileged
2018-11-30 11:09:51 -08:00
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
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
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
c285bd664e Explain the device format in man pages
Signed-off-by: Qi Wang <qiwan@redhat.com>
2018-10-23 15:14:44 -04:00
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
d2de9cd3dc Update manpages for --ip flag
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-11 11:24:08 -04:00
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
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