summaryrefslogtreecommitdiff
path: root/cmd/podman/shared
Commit message (Collapse)AuthorAge
* Merge pull request #3557 from rhatdan/envOpenShift Merge Robot2019-07-12
|\ | | | | Add support for --env-host
| * 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>
* 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>
* trivial cleanups from golangbaude2019-07-03
| | | | | | the results of a code cleanup performed by the goland IDE. Signed-off-by: baude <bbaude@redhat.com>
* 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 #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>
* | 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 #3366 from edsantiago/test_typo_fixesOpenShift Merge Robot2019-06-19
|\ | | | | fix broken healthcheck tests
| * fix broken healthcheck testsEd Santiago2019-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Four of the healthcheck tests were completely broken. They were written with the option '--healthcheck-cmd' which is not an option (it should be '--healthcheck-command', with 'command' as a full word). The tests were merely checking exit code, not error message, so of course they failed. I have fixed the command line and added checks for the expected diagnostic. (Side note: do not write tests that check exit code but nothing else. This should not need to be said). One of the four tests was invalid: --healthcheck-interval 0.5s. Per Brent: initially i was going to restrict sub one-second intervals That test has been removed. It would probably be a good idea for a future PR to add some validation such as preventing negative values, but that's left as an exercise for later. Also: grammar fix in an error message. Caught by my ginkgo log greasemonkey script, which highlights 'Error' messages and grabbed my attention. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #3352 from mheon/inspect_config_to_libpodOpenShift Merge Robot2019-06-18
|\ \ | |/ |/| Move the Config portion of Inspect into libpod
| * Move the Config portion of Inspect into libpodMatthew Heon2019-06-17
| | | | | | | | | | | | | | | | While we're at it, rewrite how we populate it. There were several potential segfaults in the optional spec.Process block, and a few fields not being populated correctly versus 'docker inspect'. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | cmd, docs, test: fix some typosGiuseppe Scrivano2019-06-18
|/ | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Begin to break up pkg/inspectMatthew Heon2019-06-03
| | | | | | | | | | Let's put inspect structs where they're actually being used. We originally made pkg/inspect to solve circular import issues. There are no more circular import issues. Image structs remain for now, I'm focusing on container inspect. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* Implement podman logs with log-driver journaldPeter Hunt2019-05-28
| | | | | | | | Add a journald reader that translates the journald entry to a k8s-file formatted line, to be added as a log line Note: --follow with journald hasn't been implemented. It's going to be a larger undertaking that can wait. Signed-off-by: Peter Hunt <pehunt@redhat.com>
* Added --log-driver and journald loggingPeter Hunt2019-05-28
| | | | Signed-off-by: Peter Hunt <pehunt@redhat.com>
* userns: add new option --userns=keep-idGiuseppe Scrivano2019-05-24
| | | | | | | 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>
* create: skip resources validation with cgroup v2Giuseppe Scrivano2019-05-13
| | | | | | | skip resources validation when cgroup v2 is detected, as we don't support it yet. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* add varlink bridgebaude2019-05-08
| | | | | | | | allow the user to define a remote host and remote username for their remote podman sessions. this is then feed to the varlink "bridge" as the ssh credentials and endpoint. Signed-off-by: baude <bbaude@redhat.com>
* Address review comments on restart policyMatthew Heon2019-05-03
| | | | Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* Restart policy conflicts with the --rm flagMatthew Heon2019-05-03
| | | | Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* Add container restart policy to Libpod & PodmanMatthew Heon2019-05-03
| | | | | | | This initial version does not support restart count, but it works as advertised otherwise. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* Merge pull request #2905 from QiWang19/globalvarOpenShift Merge Robot2019-05-03
|\ | | | | Add variable for global flags to runlabel
| * Add variable for global flags to runlabelQi Wang2019-05-02
| | | | | | | | | | | | use $GLOBAL_OPTS to pass global flags to the runlabel command. Signed-off-by: Qi Wang <qiwan@redhat.com>
* | Merge pull request #3061 from baude/parsecleanupOpenShift Merge Robot2019-05-03
|\ \ | | | | | | clean up shared/parse/parse.go
| * | clean up shared/parse/parse.gobaude2019-05-02
| | | | | | | | | | | | | | | | | | | | | prune unused functions and add unit tests for a number of the remaining ones. Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #2959 from mheon/merge_volume_flagsOpenShift Merge Robot2019-05-03
|\ \ \ | |/ / |/| | Merge volume flags implementation
| * | Migrate to unified volume handling codeMatthew Heon2019-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify handling for the --volume, --mount, --volumes-from, --tmpfs and --init flags into a single file and set of functions. This will greatly improve readability and maintainability. Further, properly handle superceding and conflicting mounts. Our current patchwork has serious issues when mounts conflict, or when a mount from --volumes-from or an image volume should be overwritten by a user volume or named volume. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | Always pass pod into MakeContainerConfigMatthew Heon2019-05-01
| | | | | | | | | | | | | | | | | | | | | | | | Play kube was passing the pod, but CreateConfig was not. Unify it so they both do, so we can remove some unnecessary duplicate lookup code. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | Remove non-config fields from CreateConfigMatthew Heon2019-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | The goal here is to keep only the configuration directly used to build the container in CreateConfig, and scrub temporary state and helpers that we need to generate. We'll keep those internally in MakeContainerConfig. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * | Add a new function for converting a CreateConfigMatthew Heon2019-05-01
| |/ | | | | | | | | | | | | | | | | | | | | Right now, there are two major API calls necessary to turn a filled-in CreateConfig into the options and OCI spec necessary to make a libpod Container. I'm intending on refactoring both of these extensively to unify a few things, so make a common frontend to both that will prevent API changes from leaking out of the package. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #3039 from mheon/podman_initOpenShift Merge Robot2019-05-02
|\ \ | | | | | | Add podman init command
| * | Add basic structure of podman init commandMatthew Heon2019-05-01
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 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>
* / Remove two bits of dead codeChris Evich2019-05-02
|/ | | | Signed-off-by: Chris Evich <cevich@redhat.com>
* auto pass http_proxy into containerJames Cassell2019-04-30
| | | | Signed-off-by: James Cassell <code@james.cassell.me>
* Add --read-only-tmpfs optionsDaniel J Walsh2019-04-26
| | | | | | | | | | | 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>
* journald event loggingbaude2019-04-24
| | | | | | | | | add the ability for podman to read and write events to journald instead of just a logfile. This can be controlled in libpod.conf with the `events_logger` attribute of `journald` or `file`. The default will be set to `journald`. Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #2917 from baude/remotestartOpenShift Merge Robot2019-04-17
|\ | | | | podman-remote start
| * podman-remote startbaude2019-04-17
| | | | | | | | | | | | | | enable the ability to start containers from the remote-client. also, enable start integration tests for remote testing. Signed-off-by: baude <bbaude@redhat.com>
* | Add podman pod prunePeter Hunt2019-04-16
|/ | | | | | | 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>
* pod: drop dead codeGiuseppe Scrivano2019-04-15
| | | | | | | we always create a user namespace now, so no need to check if we are running as non root. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Incorporate image and default environment variables in play kubePeter Hunt2019-04-14
| | | | | | Also put Environment variable parsing from image data into a helper function Signed-off-by: Peter Hunt <pehunt@redhat.com>
* Merge pull request #2903 from baude/remotegenkubeOpenShift Merge Robot2019-04-12
|\ | | | | podman-remote generate kube
| * podman-remote generate kubebaude2019-04-12
| | | | | | | | | | | | Allow the ability to generate kube YAML from the podman remote-client. Signed-off-by: baude <bbaude@redhat.com>
* | Fixes for podman-remote run and attachbaude2019-04-11
|/ | | | | | | | Fixes the ability to run (create,start) a container and attach to its console correctly. We can now also exit from the console without hanging the remote client. Signed-off-by: baude <bbaude@redhat.com>