Commit graph

22 commits

Author SHA1 Message Date
baude 0e58ec7474 podman push should honor registries.conf
Like podman pull, when you push an image, podman should check
if the registry is listed as insecure and if so, it should
--tls-verify=false unless the user overrides this.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #738
Approved by: mheon
2018-05-10 14:56:56 +00:00
baude b44d4fb1ec Fix pulling from secure registry
when pulling from a secure registry that is documented in registries.conf, we
should be able to pull without tls-verify=false

Signed-off-by: baude <bbaude@redhat.com>

Closes: #718
Approved by: rhatdan
2018-05-04 14:13:18 +00:00
baude a824186ac9 Use buildah commit and bud in podman
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
2018-04-27 20:51:07 +00:00
baude 39a7a773a6 varlink images
implement varlink image functions for working with libpod with the exception of a
couple due to incompletions on the libpod side of things (build).

also, created a first pass at a libpodpy package which will stand as a client to
working with libpod's varlink methods using python.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #669
Approved by: baude
2018-04-26 19:14:44 +00:00
baude cc03743c0f Strip transport from image name when looking for local image
When a user pulls an image using a transport, like docker-daemon, we try to lookup
the new image in storage by the input name after the pull.  Because the input name
has a transport (different than local storage), that lookup would fail.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #644
Approved by: rhatdan
2018-04-26 11:17:47 +00:00
Matthew Heon aa247f950c Remove more Errorf in favor of Wrapf
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #668
Approved by: rhatdan
2018-04-25 18:34:55 +00:00
Matthew Heon 379404d306 Do not eat error messages from pullImage
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #668
Approved by: rhatdan
2018-04-25 18:34:55 +00:00
umohnani8 27107fdac1 Vendor in latest containers/image and contaners/storage
Made necessary changes to functions to include contex.Context wherever needed

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #640
Approved by: baude
2018-04-19 14:08:47 +00:00
baude 313e5e83e9 regression: tls verify should be set on registries.conf if insecure
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
2018-04-18 14:07:59 +00:00
baude fa8442e4a0 podman pull should always try to pull
In the case where you have an image local, if the the user runs
podman pull, we should always attempt to pull an updated image.

Added a forceRemote bool to New (image) so we can differentiate
between "pull" or run because the actions differ.  Run does not
need to pull the latest -- only run.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #618
Approved by: baude
2018-04-14 23:55:24 +00:00
baude 1700f2b238 Use buildah commit for podman commit
Resolves: #586 and #520
Signed-off-by: baude <bbaude@redhat.com>

Closes: #592
Approved by: mheon
2018-04-10 13:31:59 +00:00
baude 1e59053cc5 Allow sha256: prefix for input
We should allow users to pass in image ids with the sha256: prefix
for local images.

Resolves: #493

Signed-off-by: baude <bbaude@redhat.com>

Closes: #560
Approved by: baude
2018-03-29 16:31:43 +00:00
Matthew Heon 26d7e3c7b8 Fix some minor issues lint has been picking up
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #556
Approved by: baude
2018-03-27 14:46:17 +00:00
baude 304bf53c28 cmd/podman/run.go: Error nicely when no image found
When no image is found, display a useful error message. Also, in imageToRef
protect against a nil image being passed.

Resolves: #553

Signed-off-by: baude <bbaude@redhat.com>

Closes: #555
Approved by: mheon
2018-03-27 00:17:55 +00:00
baude 1d4f40bd1a First tag, untag THEN reload the image
Signed-off-by: baude <bbaude@redhat.com>

Closes: #543
Approved by: mheon
2018-03-26 14:54:10 +00:00
baude f7c8dd5836 Stage 4 Image cleanup
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
2018-03-23 15:35:37 +00:00
baude d364d41e1b Removing tagged images change in behavior
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
2018-03-22 19:06:51 +00:00
baude d0835493d5 Migrate podman inspect and tag to image library
Signed-off-by: baude <bbaude@redhat.com>

Closes: #525
Approved by: baude
2018-03-21 19:14:50 +00:00
baude 3428de0672 Migrate podman images to image library
Signed-off-by: baude <bbaude@redhat.com>

Closes: #523
Approved by: mheon
2018-03-21 16:20:14 +00:00
baude 38a1b2f16d Image library stage 4 - create and commit
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
2018-03-20 16:20:12 +00:00
baude b85b217f55 Stage3 Image Library
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
2018-03-14 20:21:31 +00:00
baude bb6f0f8e26 Image Resolution Stage 1
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
2018-03-08 19:31:31 +00:00