Commit graph

179 commits

Author SHA1 Message Date
OpenShift Merge Robot c2dab75f0e
Merge pull request #4517 from baude/macvlan
macvlan networks
2019-12-09 07:53:55 -08:00
baude ef872dcd21 macvlan networks
add the ability to a macvlan network with podman network create.

Signed-off-by: baude <bbaude@redhat.com>
2019-12-09 08:40:40 -06:00
OpenShift Merge Robot c9696c451d
Merge pull request #4596 from kunalkushwaha/container-prune
container prune command fixed as per docker prune command
2019-12-02 18:33:58 -08:00
Kunal Kushwaha bca01ed461 man page updated with examples of filter option
examples with filter added

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2019-12-02 11:47:56 +09:00
Daniel J Walsh 79bf5010ed
Add podman system reset command
This command will destroy all data created via podman.
It will remove containers, images, volumes, pods.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-29 05:34:52 -05:00
Sascha Grunert 63e46cc85c
Add support for image name history
We leverage the containers/storage image history tracking feature to
show the previously used image names when running:
`podman images --history`

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-11-27 13:42:06 +01:00
Valentin Rothberg a3d13fb286 podman {pod,} rm/stop: add --ignore flag
Add an --ignore flag to podman rm and stop. When specified, Podman will
ignore "no such {container,pod}" errors that occur when a specified
container/pod is not present in the store (anymore).  The motivation
behind adding this flag is to write more robust systemd services using
Podman.  A user might have manually decided to remove a container/pod
which would lead to a failure during the `ExecStop` directive of a
systemd service referencing that container/pod.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-25 09:48:13 +01:00
Valentin Rothberg 061bf77588 podman rm/stop --cidfile
Add a --cidfile flag to podman rm/stop to pass a container ID via a
file.  Podman run already provides the functionaly to store the ID
in a specified file which we now complete with rm/stop.  This allows
for a better life-cycle management in systemd services.  Note that
--cdifile can be specified multiple times to rm/stop.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-18 14:44:08 +01:00
OpenShift Merge Robot 225f22b9d5
Merge pull request #4506 from TomSweeneyRedHat/dev/tsweeney/bump_buildah1.11.5
Bump to Buildah v1.11.5
2019-11-13 20:19:54 +01:00
TomSweeneyRedHat 6003033ada Bump to Buildah v1.11.5
Bump to Buildah v1.11.5.  Most notably changes to the
podman build `--pull` functionality.  `--pull=true` and `--pull=false` now
work as Docker does, `--pull-never` added to supply the functionality
of the old `--pull=false`.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-11-13 10:57:19 -05:00
Dmitry Smirnov 8d928d525f codespell: spelling corrections
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2019-11-13 08:15:00 +11:00
Jakub Filak 2497b6c77b
podman: add support for specifying MAC
I basically copied and adapted the statements for setting IP.

Closes #1136

Signed-off-by: Jakub Filak <jakub.filak@sap.com>
2019-11-06 16:22:19 +01:00
baude 2f6b8b94e8 enable dnsplugin for network create
when users create a new network and the dnsname plugin can be found by
podman, we will enable container name resolution on the new network.
there is an option to opt *out* as well.

tests cannot be added until we solve the packaging portion of the
dnsname plugin.

Signed-off-by: baude <bbaude@redhat.com>
2019-10-28 12:52:30 -05:00
TomSweeneyRedHat beadd2694b Add squash-all, fix squash option in build
Translate the podman build --squash command to podman build --layers=false which
has the same functionality as docker build --squash. Add a new option --squash-all
which will squash all layers into one. This will be translated to buildah bud --squash
for the buildah bud api.

Also allow only one option, squash, layers or squash--all to be used per build command.

Fixes: https://github.com/containers/buildah/issues/1234

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-10-11 13:28:38 -04:00
baude b94ea07265 enhance podman network rm
when removing a podman network, we need to make sure we delete the
network interface if one was ever created (by running a container).
also, when removing networks, we check if any containers are using the
network.  if they are, we error out unless the user provides a 'force'
option which will remove the containers in question.

Signed-off-by: baude <bbaude@redhat.com>
2019-09-12 14:03:52 -05:00
OpenShift Merge Robot 7042a3d7a5
Merge pull request #3862 from baude/networkcreate
podman network create
2019-09-09 19:44:57 +02:00
baude ee432cf279 podman network create
initial implementation of network create.  we only support bridging
networks with this first pass.

Signed-off-by: baude <bbaude@redhat.com>
2019-09-09 09:32:43 -05:00
Daniel J Walsh f4ebfcb97d
Fix podman import bash completions
podman import bash completions are throwing errors.  Updated this completion
to work correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-07 06:29:07 -04:00
OpenShift Merge Robot 1eb6b271bb
Merge pull request #3833 from QiWang19/cert-dir
add --cert-dir image sign
2019-08-28 13:21:48 -07:00
TomSweeneyRedHat 9ced2488c9 Add --digestfile option to push
Add the digestfile option to the push command so the digest can
be stored away in a file when requested by the user.  Also have added
a debug statement to show the completion of the push.

Emulates Buildah's https://github.com/containers/buildah/pull/1799/files

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-08-21 10:11:52 -04:00
Qi Wang f3f01830db add --cert-dir image sign
Requirement from #2726
Add --cert-dir for `podman image sign`.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-17 13:13:26 -04:00
OpenShift Merge Robot 76f327f73f
Merge pull request #3617 from QiWang19/create_pull
add --pull flag for podman create&run
2019-08-17 14:55:14 +02:00
baude 6220ef1488 inclusion of podman network
adding podman network and the subcommands inspect, list, and rm.  the
inspect subcommand displays the raw cni network configuration.  the list
subcommand displays a summary of the cni networks ala ps.  and the rm
subcommand removes a cni network.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-15 12:49:12 -05:00
Qi Wang decfea65be add --pull flag for podman create&run
Requirement from https://github.com/containers/libpod/issues/3575#issuecomment-512238393

Added --pull for podman create and pull to match the newly added flag in docker CLI.
`missing`: default value, podman will pull the image if it does not exist in the local.
`always`: podman will always pull the image.
`never`: podman will never pull the image.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-09 15:21:34 -04:00
Adrian Reber c23b92b409
restore: added --ignore-static-ip option
If a container is restored multiple times from an exported checkpoint
with the help of '--import --name', the restore will fail if during
'podman run' a static container IP was set with '--ip'. The user can
tell the restore process to ignore the static IP with
'--ignore-static-ip'.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-08-02 10:10:54 +02:00
Peter Hunt a1a79c08b7 Implement conmon exec
This includes:
	Implement exec -i and fix some typos in description of -i docs
	pass failed runtime status to caller
	Add resize handling for a terminal connection
	Customize exec systemd-cgroup slice
	fix healthcheck
	fix top
	add --detach-keys
	Implement podman-remote exec (jhonce)
	* Cleanup some orphaned code (jhonce)
	adapt remote exec for conmon exec (pehunt)
	Fix healthcheck and exec to match docs
		Introduce two new OCIRuntime errors to more comprehensively describe situations in which the runtime can error
		Use these different errors in branching for exit code in healthcheck and exec
	Set conmon to use new api version

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-22 15:57:23 -04:00
OpenShift Merge Robot deb087d7b1
Merge pull request #3443 from adrianreber/rootfs-changes-migration
Include changes to the container's root file-system in the checkpoint archive
2019-07-19 02:38:26 +02:00
Hunor Csomortáni 47c1fe6a5c Completion: complete "--health-start-period" in bash
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-07-16 06:15:30 +02:00
Hunor Csomortáni 51c00eae8b Completion: --no-healthcheck is not an option
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-07-16 05:50:52 +02:00
Daniel J Walsh 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
Adrian Reber 05549e8b29
Add --ignore-rootfs option for checkpoint/restore
The newly added functionality to include the container's root
file-system changes into the checkpoint archive can now be explicitly
disabled. Either during checkpoint or during restore.

If a container changes a lot of files during its runtime it might be
more effective to migrated the root file-system changes in some other
way and to not needlessly increase the size of the checkpoint archive.

If a checkpoint archive does not contain the root file-system changes
information it will automatically be skipped. If the root file-system
changes are part of the checkpoint archive it is also possible to tell
Podman to ignore these changes.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-07-11 14:43:35 +02:00
Matthew Heon 49e696642d Add --storage flag to 'podman rm' (local only)
This flag switches to removing containers directly from c/storage
and is mostly used to remove orphan containers.

It's a superior solution to our former one, which attempted
removal from storage under certain circumstances and could, under
some conditions, not trigger.

Also contains the beginning of support for storage in `ps` but
wiring that in is going to be a much bigger pain.

Fixes #3329.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-13 17:02:20 -04:00
Matthew Heon f909b745ec Add --filename option to generate kube
This allows writing output directly to a file, instead of STDOUT.
Makes things easier for some scripting tasks. Like the unit tests
for 'play kube'.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-11 11:26:46 -04:00
Adrian Reber bef83c42ea
migration: add possibility to restore a container with a new name
The option to restore a container from an external checkpoint archive
(podman container restore -i /tmp/checkpoint.tar.gz) restores a
container with the same name and same ID as id had before checkpointing.

This commit adds the option '--name,-n' to 'podman container restore'.
With this option the restored container gets the name specified after
'--name,-n' and a new ID. This way it is possible to restore one
container multiple times.

If a container is restored with a new name Podman will not try to
request the same IP address for the container as it had during
checkpointing. This implicitly assumes that if a container is restored
from a checkpoint archive with a different name, that it will be
restored multiple times and restoring a container multiple times with
the same IP address will fail as each IP address can only be used once.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-04 14:02:51 +02:00
Adrian Reber 7b1ab8a0f4
Added bash completion for container migration
Signed-off-by: Adrian Reber <areber@redhat.com>
2019-06-03 22:05:13 +02:00
Matthew Heon 32fc6b906c Add --pause to podman cp manpage and bash completions
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-29 22:53:51 -04:00
OpenShift Merge Robot 8422503f43
Merge pull request #3221 from josegonzalez/master
Add missing 'container cp' alias and document missing 'container update' command
2019-05-29 20:46:09 +02:00
Jose Diaz-Gonzalez 635c161f38 add missing container cp command
'docker cp' is an alias for 'docker container cp', and podman should have the equivalent alias.

Signed-off-by: Jose Diaz-Gonzalez <email@josediazgonzalez.com>
2019-05-29 12:44:25 -04:00
Peter Hunt f61fa28d39 Added --log-driver and journald logging
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-28 11:10:57 -04:00
Peter Hunt 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
Daniel J Walsh 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
baude c18ad2bfd9 Generate systemd unit files for containers
the podman generate systemd command will generate a systemd unit file
based on the attributes of an existing container and user inputs.  the
command outputs the unit file to stdout for the user to copy or
redirect.  it is enabled for the remote client as well.

users can set a restart policy as well as define a stop timeout
override for the container.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-02 14:35:53 -05:00
Matthew Heon 0b2c9c2acc Add basic structure of podman init command
As part of this, rework the number of workers used by various
Podman tasks to match original behavior - need an explicit
fallthrough in the switch statement for that block to work as
expected.

Also, trivial change to Podman cleanup to work on initialized
containers - we need to reset to a different state after cleaning
up the OCI runtime.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 11:12:24 -04:00
James Cassell 354d80626a auto pass http_proxy into container
Signed-off-by: James Cassell <code@james.cassell.me>
2019-04-30 17:29:29 -04:00
Daniel J Walsh 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
Peter Hunt 0b34b4a59c Add podman pod prune
podman system prune would leave pods be, and not prune them if they were stopped.
Fix this by adding a `podman pod prune` command that prunes stopped pods similarly to containers.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-04-16 11:23:18 -04:00
Ed Santiago a07b2c2c60 (minor): fix misspelled 'Healthcheck'
Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-04-10 09:43:56 -06:00
baude 3423c5a8c9 Add watch mode to podman ps
allows users to "watch" the output of podman ps on a set interval in
seconds. in watch mode, the screen is cleared between intervals as well.

podman -ps -w1 watches on 1 second intervals

Signed-off-by: baude <bbaude@redhat.com>
2019-03-28 08:34:27 -05:00
Matthew Heon 323dc526ce Add manpages and completions for dns=none and no-hosts
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 10:12:18 -04:00
Qi Wang 25e0f87069 system df to show podman disk usage
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-25 15:05:26 -04:00