summaryrefslogtreecommitdiff
path: root/libpod/runtime_img.go
Commit message (Collapse)AuthorAge
* Remove some unused data structures and codeMiloslav Trmač2018-12-06
| | | | | | ... instead of unnecessarily adapting it for the DockerInsecureSkipTLSVerify type change. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
* Vendor in new new buildah/cibaude2018-10-17
| | | | | | | libpod requires new buildah and container image versions to resolve bug #1640298 Signed-off-by: baude <bbaude@redhat.com>
* Vendor in latest containers/buildahDaniel J Walsh2018-09-18
| | | | | | Switch from projectatomic/buildah to containers/buildah Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* switch projectatomic to containersDaniel J Walsh2018-08-16
| | | | | | | | | | 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
* RFC: Remove unused transport name constants from libpodMiloslav Trmač2018-08-01
| | | | | | | | | | | | | | | | | | | They are not used anywhere in the packagee. Two of the values still have users in the CLI, but used only once. So, use the .Transport.Name() calls in there directly, that is likely to be cheaper (and makes the files depend directly on the transports instead of referring to them indirectly through libpod). RFC: Should not change behavior in _this_ repo, but it is an externally-observable API change. Is there any user that could notice? Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1176 Approved by: rhatdan
* Remove the TransportNames arraysMiloslav Trmač2018-08-01
| | | | | | | | | | | | | | They are not used anywhere AFAICS, and the underlying idea that transport-specific image names are reusable across transports is very dubious anyway. So, drop them instead of documenting or fixing them. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1176 Approved by: rhatdan
* podman rmi should only untag image if parent of anotherumohnani82018-07-12
| | | | | | | | | | | | podman rmi was deleting an image even if it was a parent of another image. This fix just untags the image instead. This also fixes podman rmi to remove intermediate images of an image when the image is removed. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #1055 Approved by: mheon
* libpod: Execute poststop hooks locallyW. Trevor King2018-06-04
| | | | | | | | | | | | Instead of delegating to the runtime, since some runtimes do not seem to handle these reliably [1]. [1]: https://github.com/projectatomic/libpod/issues/730#issuecomment-392959938 Signed-off-by: W. Trevor King <wking@tremily.us> Closes: #864 Approved by: rhatdan
* Use buildah commit and bud in podmanbaude2018-04-27
| | | | | | | | | | | Vendor in buildah and use as much of commit and bug as possible for podman build and commit. Resolves #586 Signed-off-by: baude <bbaude@redhat.com> Closes: #681 Approved by: mheon
* regression: tls verify should be set on registries.conf if insecurebaude2018-04-18
| | | | | | | | | | | 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
* Remove image via storage if a buildah container is associatedTomSweeneyRedHat2018-04-05
| | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #522 Approved by: mheon
* Fix some minor issues lint has been picking upMatthew Heon2018-03-27
| | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #556 Approved by: baude
* Stage 4 Image cleanupbaude2018-03-23
| | | | | | | | | | Cull funcs from runtime_img.go which are no longer needed. Also, fix any remaining spots that use the old image technique. Signed-off-by: baude <bbaude@redhat.com> Closes: #532 Approved by: mheon
* Removing tagged images change in behaviorbaude2018-03-22
| | | | | | | | | | | | | | | An image name is really just a tag. When an image has multiple tags, we should be able to "delete" the one of its tags without harm. In this case, the "delete' is really a form of Untag (removing the tag from the image). If an image has multiple tags and the user tries to delete by ID without force, this should be denied because when you delete by ID there is no distinguishing it like image tags. Signed-off-by: baude <bbaude@redhat.com> Closes: #528 Approved by: mheon
* Migrate podman inspect and tag to image librarybaude2018-03-21
| | | | | | | Signed-off-by: baude <bbaude@redhat.com> Closes: #525 Approved by: baude
* Migrate podman images to image librarybaude2018-03-21
| | | | | | | Signed-off-by: baude <bbaude@redhat.com> Closes: #523 Approved by: mheon
* Image library stage 4 - create and commitbaude2018-03-20
| | | | | | | | | | Migrate the podman create and commit subcommandis to leverage the images library. I also had to migrate the cmd/ portions of run and rmi. Signed-off-by: baude <bbaude@redhat.com> Closes: #498 Approved by: mheon
* Stage3 Image Librarybaude2018-03-14
| | | | | | | | | | | | | This represents the stage3 implementation for the image library. At this point, we are moving the image-centric functions to pkg/image including migration of args and object-oriented references. This is a not a one-for-one migration of funcs and some funcs will need to continue to reside in runtime_img as they are overly specific to libpod and probably not useful to others. Signed-off-by: baude <bbaude@redhat.com> Closes: #484 Approved by: baude
* podman-images: return correct image listValentin Rothberg2018-03-14
| | | | | | | | | | | Return and print the correct list of images by adding all specified RepoTags to one image object, and priting them separately in repository:repotag pairs. Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #477 Approved by: rhatdan
* Podman load can pull in compressed filesumohnani82018-03-08
| | | | | | | | | Podman load can now load in docker-archive files that are compressed. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #468 Approved by: baude
* Image Resolution Stage 1baude2018-03-08
| | | | | | | | | | | | | | | | | This is the stage 1 effort for an image library that can be eventually used by buildah and podman alike. In eventuality, the main goal of the library (package) is to: * provide a consistent approach to resolving image names in various forms (from users). * based on the result of the above, provide image methods that in a singular spot but separate from the runtime. * reduce the cruft and bloat in the current podman runtime. The goal of stage 1 is to demonstrate fast, accurate image resolution for both local and remote images resulting in an image object as part of the return. Signed-off-by: baude <bbaude@redhat.com> Closes: #463 Approved by: baude
* podman import, load, and commit are too verbosebaude2018-03-07
| | | | | | | | | | | | | | | 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
* podman load dont panic when no repotagsbaude2018-02-26
| | | | | | | | | | | | | When performing a podman load, if there were no repotags in the image, podman would panic. In the case that the incoming image does have repotags, it should be imported as a none:none image so it can still be used by the user. Resolves issue #403 Signed-off-by: baude <bbaude@redhat.com> Closes: #405 Approved by: baude
* Performance enhancement for podman imagesbaude2018-02-20
| | | | | | | | | | | | | Previous code was using slow routines to collect some of the information needed to output images. Specifically size was being calculated instead of using the cached, already known size already available. Also, straight- lined several of the code paths. Overall assessment is that these improvements cut the time for images in half. Signed-off-by: baude <bbaude@redhat.com> Closes: #365 Approved by: mheon
* Migrate Create|Commit to ginkgobaude2018-02-02
| | | | | | | | | | | | Migrate create and commit bats tests to the ginkgo test suite. In doing so, some structures had to be moved to pkg/podmanstructs/podmanstructs.go so we could do better verification of test results. Signed-off-by: baude <bbaude@redhat.com> Closes: #286 Approved by: rhatdan
* Ginkgo Tests: ps, pull, push and rmbaude2018-01-31
| | | | | | | | | | | | | Migrate ps, pull, push, and rm from bats to ginkgo. Also, fixed a conditional issue with adding ports when an image defines the port and the user wants to override it. Signed-off-by: baude <bbaude@redhat.com> Closes: #277 Approved by: baude
* Streamline image resolutionbaude2018-01-23
| | | | | | | | | When trying to determine if a user-provided string that describes an image (ID, fq name, shortname, tagged), there were some inefficiencies where we looked up images multiple times to derive information about local images. Signed-off-by: baude <bbaude@redhat.com>
* Shortname deletion continuedbaude2018-01-08
| | | | | | | | | | | With certain short name usages, rmi still was unable to delete certain images. This was also reflected in several commit tests that were temporarily disabled. Signed-off-by: baude <bbaude@redhat.com> Closes: #200 Approved by: rhatdan
* Remove by shortnamebaude2018-01-08
| | | | | | | | | | | Removing by shortname was not working. Also pruned container storage's remove func from rmi and moved it into an image.Remove func, which consolidates our usage of cs. Signed-off-by: baude <bbaude@redhat.com> Closes: #188 Approved by: baude
* Run by shortnamebaude2018-01-04
| | | | | | | | | | While pulling by shortname (fedora-minimal) worked, running a container by the short name did not due to a logic error. Signed-off-by: baude <bbaude@redhat.com> Closes: #182 Approved by: rhatdan
* Add support for adding devices to containerDaniel J Walsh2017-12-19
| | | | | | | | | | Also add --quiet option to kpod create/run since this will help with writing tests. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #140 Approved by: TomSweeneyRedHat
* Add manifest type conversion to kpod pushumohnani82017-12-14
| | | | | | | | | | | User can select from 3 manifest types: oci, v2s1, or v2s2 e.g kpod push --format v2s2 alpine dir:my-directory Added "compress" flag to enable compression when true Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #126 Approved by: rhatdan
* Update kpod inspect to use the new container stateumohnani82017-12-12
| | | | | | | | | kpod inspect now uses the new libpod container state and closely matches the output of docker inspect some aspects of it are still WIP as the libpod container state is still being worked on Signed-off-by: umohnani8 <umohnani@redhat.com>
* Fix misleading print statement in kpod loadumohnani82017-12-11
| | | | | | | | | When loading an image, kpod load would print something like "Trying to pull docker.io/library/alpine...", which is misleading and makes it sound like its pulling it form the registry. Fixed this by removing these print statements for kpod load Signed-off-by: umohnani8 <umohnani@redhat.com>
* Vendor in latest upstream containers/imageumohnani82017-12-11
| | | | Signed-off-by: umohnani8 <umohnani@redhat.com>
* Fix rmi -f removing containers from storage without telling libpodMatthew Heon2017-11-29
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #68 Approved by: rhatdan
* remove unused functions and variablesSuraj Deshmukh2017-11-28
| | | | | | | Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com> Closes: #71 Approved by: rhatdan
* Add docker transport to push image before final failureTomSweeneyRedHat2017-11-28
| | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #42 Approved by: rhatdan
* Create|Run container from Image IDbaude2017-11-27
| | | | | | | | | | | As reported in Issue #50, we need to be able to run or create a container based on an image ID (as well as name). Signed-off-by: baude <bbaude@redhat.com> Closes: #76 Approved by: rhatdan
* Enhancements to papr testsbaude2017-11-17
| | | | | | | | | | | | | | | The PR contains several enhancements to our CI testing. - enable lint testing on Fedora - add Centos Atomic as test platform - integration tests on run on the OS natively (uncontainerized) - builds are done in containers - inclusion of Vagrant file for local testing Signed-off-by: baude <bbaude@redhat.com> Closes: #18 Approved by: mheon
* Address run/create performance issuesbaude2017-11-14
| | | | | | | | | | | | Fixed the logic where we observed different performance results when running an image by its fqname vs a shortname. In the case of the latter, we resolve the name without using the network. Signed-off-by: baude <bbaude@redhat.com> Closes: #37 Approved by: rhatdan
* Add 'kpod import' commandUrvashi Mohnani2017-11-07
| | | | | | | | | Imports a tarball and saves it as a filesystem image Signed-off-by: Urvashi Mohnani <umohnani@redhat.com> Closes: #12 Approved by: rhatdan
* Respect the quiet flag.Daniel J Walsh2017-11-07
| | | | | | | | | | | When setting the `kpod load -q` flag, output was still going to the screen. This patch adds a check to not output to the terminal unless there is an io.Writer specified, and then to write to the io.Writer. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #23 Approved by: rhatdan
* Fix gofmt errorsDaniel J Walsh2017-11-02
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* libpod create and runbaude2017-11-01
| | | | | | patched version of the same code that went into crio Signed-off-by: baude <bbaude@redhat.com>
* Prune Server package. Convert to new github location.Matthew Heon2017-11-01
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Initial checkin from CRI-O repoMatthew Heon2017-11-01
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>