Commit Graph

31 Commits

Author SHA1 Message Date
Josh Hawn 213e3d1166 Add Tarsum Calculation during v2 Pull operation
While the v2 pull operation is writing the body of the layer blob to disk
it now computes the tarsum checksum of the archive before extracting it to
the backend storage driver. If the checksum does not match that from the
image manifest an error is raised.

Also adds more debug logging to the pull operation and fixes existing test
cases which were failing. Adds a reverse lookup constructor to the tarsum
package so that you can get a tarsum object using a checksum label.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-01-15 14:05:05 -08:00
Tonis Tiigi 6705477673 Fix misuses of format based logging functions
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
2014-11-19 23:59:02 +02:00
Michael Crosby 039aa2741f Merge pull request #8964 from jlhawn/image_checksum
Compute TarSum on storage of image layer content
2014-11-13 18:07:20 -08:00
Recursive Madman 5cd53195fd Don't loose precision when parsing image size on 32 bit machines. Presumably fixes #8979.
Signed-off-by: Recursive Madman <recursive.madman@gmx.de>
2014-11-11 09:24:45 +01:00
Josh Hawn 059e589c34 Compute TarSum on storage of image layer content
Now, newly created/imported layers will have the checksum of
the layer diff computed and stored in the image json file.

For now, it is not an error if the computed checksum does not
match an existing checksum, only a warning message is logged. The
eventual goal is to use the checksums in the image JSON to verify
the integrity of the layer contents when doing `docker load` or
`docker pull`, and error out if it does not match.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-11-05 10:17:55 -08:00
unclejack 4dbbe4f51a image: stream img JSON & Decode in LoadImage
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-04 16:15:00 +02:00
Josh Hawn 26184de8ab Remove `jsonData` argument from `image.StoreImage`
The argument specified the json data to save to disk when registering
a new image into the image graph. If it is nil, then the given image
is serialized to json and that is written by default. This default
behavior is sufficient if the given image was originally deserialzed
from this jsonData to begin with which has always been the case.

Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-11-03 17:39:21 -08:00
Alexandr Morozov ee7dd44c01 Mass gofmt
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:11:48 -07:00
Alexandr Morozov 7c62cee51e Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:06 -07:00
Rafe Colton 30d5a42c1f Move archive package into pkg/archive
Now that the archive package does not depend on any docker-specific
packages, only those in pkg and vendor, it can be safely moved into pkg.

Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
2014-09-29 23:23:36 -07:00
Josh Hawn dee6b481fe Refactor use of graphdriver.Differ
Some graphdrivers are Differs and type assertions are made
in various places throughout the project. Differ offers some
convenience in generating/applying diffs of filesystem layers
but for most graphdrivers another code path is taken.

This patch brings all of the logic related to filesystem
diffs in one place, and simplifies the implementation of some
common types like Image, Daemon, and Container.

Signed-off-by: Josh Hawn <josh.hawn@docker.com>
2014-09-16 15:10:32 -07:00
unclejack 76212635b5 move some io related utils to pkg/ioutils
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-03 11:36:21 +03:00
Solomon Hykes 2a39635d30 Cleanup: move image depth checks in image/
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-15 00:43:12 +00:00
Josiah Kiehl a02f67be5b Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
2014-08-13 15:18:15 -07:00
Victor Vieux b3ee9ac74e update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
Vincent Batts d3bc787bca docker save: raw json
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-06-20 14:38:17 -04:00
Michael Crosby f0e6e135a8 Initial work on selinux patch
This has every container using the docker daemon's pid for the processes
label so it does not work correctly.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-29 03:40:05 -07:00
Alexander Larsson 359b7df5d2 Rename runtime/* to daemon/*
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-17 14:43:01 -07:00
Michael Crosby 2bddcd68b4 Gofmt imports
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:41:28 -07:00
Michael Crosby 96c4816cef Move graphdrivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:40:12 -07:00
Michael Crosby 82a5439835 Move image into sub pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-09 22:59:29 -07:00
Solomon Hykes dd0227b700 Removed deprecated docker/image package 2013-03-09 20:17:31 -08:00
Solomon Hykes c59fff422f gofmt 2013-03-09 19:44:09 -08:00
Solomon Hykes 5e2f0639c6 dockerd: create /var/lib/docker if it doesn't exist 2013-02-19 13:03:58 -08:00
Solomon Hykes 059837c92a Upload or download gzipped and bzipped images with put/pull -j/-b 2013-02-12 22:23:14 -08:00
Solomon Hykes de1c361a6e docker rmi: remove an image 2013-02-01 00:08:45 -08:00
Solomon Hykes f8f9285cca Fix bug introduced in c7a944caf2 which caused 'docker images' to crash 2013-01-29 12:15:39 -08:00
Solomon Hykes c7a944caf2 List containers ordered by creation time 2013-01-29 03:24:31 -08:00
Solomon Hykes 49da84d7c4 Fixed a bug which caused 'docker cp' to fail when the destination name already exists. 2013-01-28 23:17:47 -08:00
Solomon Hykes 2dadcf9b81 Fixed bug which caused AUFS layers to be mounted in the wrong order. 2013-01-28 23:15:02 -08:00
Solomon Hykes 904b0ab52b Experimenting with a UI which differentiates images and containers 2013-01-27 15:42:42 -08:00