summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAge
* Merge pull request #3443 from adrianreber/rootfs-changes-migrationOpenShift Merge Robot2019-07-19
|\ | | | | Include changes to the container's root file-system in the checkpoint archive
| * Add --ignore-rootfs option for checkpoint/restoreAdrian Reber2019-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix typo in checkpoint/restore related textsAdrian Reber2019-07-11
| | | | | | | | Signed-off-by: Adrian Reber <areber@redhat.com>
* | Merge pull request #3579 from QiWang19/dns_netOpenShift Merge Robot2019-07-19
|\ \ | | | | | | fix --dns and --network conflict
| * | fix --dns* and --network not set to host conflictQi Wang2019-07-18
| | | | | | | | | | | | | | | | | | | | | Close #3553 This PR makes --dns, --dns-option, --dns-search, and --network not set to host flag mutually exclusive for podman build and create. Returns conflict error if both flags are set. Signed-off-by: Qi Wang <qiwan@redhat.com>
* | | Merge pull request #3584 from QiWang19/pssizeOpenShift Merge Robot2019-07-18
|\ \ \ | | | | | | | | podman-remote make --size optional in ps
| * | | podman-remote make --size optional in psQi Wang2019-07-18
| | | | | | | | | | | | | | | | | | | | | | | | Close #3578 Add `size` field to PsOpts in podman remote to receive size as an option. Signed-off-by: Qi Wang <qiwan@redhat.com>
* | | | libpod: support for cgroup namespaceGiuseppe Scrivano2019-07-18
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Move the HostConfig portion of Inspect inside libpodMatthew Heon2019-07-17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we first began writing Podman, we ran into a major issue when implementing Inspect. Libpod deliberately does not tie its internal data structures to Docker, and stores most information about containers encoded within the OCI spec. However, Podman must present a CLI compatible with Docker, which means it must expose all the information in 'docker inspect' - most of which is not contained in the OCI spec or libpod's Config struct. Our solution at the time was the create artifact. We JSON'd the complete CreateConfig (a parsed form of the CLI arguments to 'podman run') and stored it with the container, restoring it when we needed to run commands that required the extra info. Over the past month, I've been looking more at Inspect, and refactored large portions of it into Libpod - generating them from what we know about the OCI config and libpod's (now much expanded, versus previously) container configuration. This path comes close to completing the process, moving the last part of inspect into libpod and removing the need for the create artifact. This improves libpod's compatability with non-Podman containers. We no longer require an arbitrarily-formatted JSON blob to be present to run inspect. Fixes: #3500 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #3508 from csomh/healthcheck-flag-compatOpenShift Merge Robot2019-07-16
|\ \ | | | | | | Make the healthcheck flags compatible with Docker CLI
| * | Make the healthcheck flags compatible with Docker CLIHunor Csomortáni2019-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | create: ignore check if image has HEALTHCHECK NONEStefan Becker2019-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the image was built with "HEALTHCHECK NONE" then we should create a container without healthcheck configuration. Otherwise executing the healthcheck on the container will return "unhealthy" instead of the correct error message that the container doesn't have a healthcheck. We also ignore the healthcheck configuration if the command list is empty or the command string is empty. Fixes #3525 Signed-off-by: Stefan Becker <chemobejk@gmail.com>
* | | create: apply defaults on image healthcheck optionsStefan Becker2019-07-16
|/ / | | | | | | | | | | | | | | | | | | | | | | If the image doesn't provide any options, e.g. interval, timeout, etc., then apply the Docker defaults when creating the container. Otherwise the defaults will be left 0 and podman doesn't schedule the healtcheck service & timer for the container or incorrectly reports unhealthy state when the check is executed. Fixes #3525 Signed-off-by: Stefan Becker <chemobejk@gmail.com>
* | create: improve parser for --healthcheck-commandStefan Becker2019-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #3557 from rhatdan/envOpenShift Merge Robot2019-07-12
|\ \ | | | | | | Add support for --env-host
| * | Fix spelling mistakes in man pages and other docsDaniel J Walsh2019-07-11
| | | | | | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * | Add glob parsing for --env flagDaniel J Walsh2019-07-11
| | | | | | | | | | | | | | | | | | 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>
| * | Add support for -env-hostDaniel J Walsh2019-07-11
| |/ | | | | | | | | | | | | | | | | | | 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>
* / golangci-lint pass number 2baude2019-07-11
|/ | | | | | clean up and prepare to migrate to the golangci-linter Signed-off-by: baude <bbaude@redhat.com>
* first pass of corrections for golangci-lintbaude2019-07-10
| | | | Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #3528 from giuseppe/fix-auth-locationOpenShift Merge Robot2019-07-09
|\ | | | | podman: create and run honors auth file location
| * podman: create and run honors auth file locationGiuseppe Scrivano2019-07-09
| | | | | | | | | | | | | | | | if the auth file was overriden, be sure create and run honors it. Closes: https://github.com/containers/libpod/issues/3524 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Fix podman-remote usage message to display `podman-remote` instead of `podman`Ashley Cui2019-07-08
|/ | | | | | When the user uses remote client, the message prompts the user to use `podman-remote`. This does not apply for Mac usage. Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
* Merge pull request #3495 from baude/golandcodecleanupOpenShift Merge Robot2019-07-04
|\ | | | | trivial cleanups from golang
| * trivial cleanups from golangbaude2019-07-03
| | | | | | | | | | | | the results of a code cleanup performed by the goland IDE. Signed-off-by: baude <bbaude@redhat.com>
* | ps should use nostore when possiblebaude2019-07-03
|/ | | | | | | | | when not using --size with ps, we do not need a store. this should make ps more effecient when the system is under heavy load. also, prune unused ps functions as no longer needed. Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #3477 from ashley-cui/pauserootlessOpenShift Merge Robot2019-07-03
|\ | | | | Fix rootless detection error for pause & unpause
| * Fix rootless detection error for pause & unpauseAshley Cui2019-07-02
| | | | | | | | | | | | | | | | Previously, when pause & unpause were run on rootless, the error message that pause was unsupported for rootless was not being thrown. When running remote, even if remote host was root, unsupported rootless error was being thrown. Now, the error shows up when appropriate. Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
* | configure runtime without storebaude2019-07-01
|/ | | | | | | | | some podman commands do not require the use of a container/image store. in those cases, it is more effecient to not open the store, because that results in having to also close the store which can be costly when the system is under heavy write I/O loads. Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #3324 from marcov/detach-keys-configurableOpenShift Merge Robot2019-07-01
|\ | | | | libpod: specify a detach keys sequence in libpod.conf
| * podman: clarify the format of --detach-keys argumentMarco Vedovati2019-06-26
| | | | | | | | Signed-off-by: Marco Vedovati <mvedovati@suse.com>
* | Merge pull request #3422 from nalind/no-layer-imagesOpenShift Merge Robot2019-06-28
|\ \ | | | | | | Handle images which contain no layers
| * | Handle images which contain no layersNalin Dahyabhai2019-06-26
| | | | | | | | | | | | | | | | | | | | | This fixes some of our handling of images which have no layers, i.e., those whose TopLayer is set to an empty value. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* | | Merge pull request #3451 from ashley-cui/unmountOpenShift Merge Robot2019-06-28
|\ \ \ | | | | | | | | Remove umount command from remote client.
| * | | Remove umount command from remote client.Ashley Cui2019-06-27
| | | | | | | | | | | | | | | | | | | | | | | | Since there is no mount command, it does not make sense to have umount. Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
* | | | rootless: enable linger if /run/user/UID not existsGiuseppe Scrivano2019-06-27
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at least on Fedora 30 it creates the /run/user/UID directory for the user logged in via ssh. This needs to be done very early so that every other check when we create the default configuration file will point to the correct location. Closes: https://github.com/containers/libpod/issues/3410 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #3442 from baude/removelibpodfrommainphase2OpenShift Merge Robot2019-06-27
|\ \ \ | | | | | | | | libpod removal from main (phase 2)
| * | | libpod removal from main (phase 2)baude2019-06-27
| |/ / | | | | | | | | | | | | | | | this is phase 2 for the removal of libpod from main. Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #3420 from ashley-cui/remoteconfOpenShift Merge Robot2019-06-26
|\ \ \ | |/ / |/| | Fix crash for when remote host IP or Username is not set in conf file…
| * | Fix crash for when remote host IP or Username is not set in conf file & conf ↵Ashley Cui2019-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | file exists. When Host IP is not set in podman-remote.conf, error is printed out. When Username is not set in podman-remote.conf, default username is used. Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
* | | Merge pull request #3374 from giuseppe/cgroupsOpenShift Merge Robot2019-06-26
|\ \ \ | | | | | | | | cgroups: add initial support for cgroups v2
| * | | util: drop IsCgroup2UnifiedMode and use it from cgroupsGiuseppe Scrivano2019-06-26
| | |/ | |/| | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #3435 from mheon/fix_tmpfs_optionsOpenShift Merge Robot2019-06-26
|\ \ \ | |/ / |/| | Fix parsing of the --tmpfs option
| * | Fix parsing of the --tmpfs optionMatthew Heon2019-06-25
| |/ | | | | | | | | | | | | | | | | With StringSlice, we're seeing individual options added and parsed separately, so `tmpfs:nosuid,nodev` turns into three tmpfs mounts passed into pkg/sec (tmpfs:, nosuid, nodev). Swap to StringArray to tell cobra this can't be split on commas. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #3419 from baude/removelibpodfrommainphase1OpenShift Merge Robot2019-06-26
|\ \ | |/ |/| remove libpod from main
| * remove libpod from mainbaude2019-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | the compilation demands of having libpod in main is a burden for the remote client compilations. to combat this, we should move the use of libpod structs, vars, constants, and functions into the adapter code where it will only be compiled by the local client. this should result in cleaner code organization and smaller binaries. it should also help if we ever need to compile the remote client on non-Linux operating systems natively (not cross-compiled). Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #3332 from rhatdan/cgroupmanagerOpenShift Merge Robot2019-06-25
|\ \ | | | | | | Correctly identify the defaults for cgroup-manager
| * | Correctly identify the defaults for cgroup-managerDaniel J Walsh2019-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we report cgroupmanager default as systemd, even if the user modified the libpod.conf. Also cgroupmanager does not work in rootless mode. This PR correctly identifies the default cgroup manager or reports it is not supported. Also add homeDir to correctly get the homedir if the $HOME is not set. Will attempt to get Homedir out of /etc/passwd. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #3401 from mheon/templating_is_dumbOpenShift Merge Robot2019-06-25
|\ \ \ | | | | | | | | Fix inspect --format '{{.Mounts}}.
| * | | Support aliases for .Src and .Dst in inspect .MountsMatthew Heon2019-06-24
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | This provides backwards compatability with 1.4.0-1.4.2 releases which name .Source and .Destination as .Src and .Dst - useful for not breaking toolbox. Also add a test. Signed-off-by: Matthew Heon <matthew.heon@pm.me>