Currently, the resources associated with the io.Reader returned by
TarStream are only freed when it is read until EOF. This means that
partial uploads or exports (for example, in the case of a full disk or
severed connection) can leak a goroutine and open file. This commit
changes TarStream to return an io.ReadCloser. Resources are freed when
Close is called.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
PR https://github.com/docker/docker/pull/17986
inadvertently included changes to some vendored files.
This reverts those changes.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These changes were made as part of https://github.com/docker/docker/pull/17478
but inadvertently added to the v1.21 API version.
Also added a short description to the API changelog.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Plugin drivers were added to docker info in
https://github.com/docker/docker/pull/17300
but not added to the example output in the online
docs.
Also fixed mixed tabs/spaces in the API documentation.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Our tooling used to convert Markdown to HTML doesn't
properly handle '|' symbols embeded in code blocks
inside a table.
Changed the table to a plain HTML table as a workaround.
Also fixed indentation levels of two code examples.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2. modified page to remove note for apparmor and added it as a requirement for installing it on ubuntu
3. moved note to under prerequisites section
Signed-off-by: Zuhayr Elahi <elahi.zuhayr@gmail.com>
Currently, the Docker repos will trigger apt-get errors on a
multiarch-configured deb system because the repos don't contain all
architectures. For example, on a multiarch system supporting amd64 and
armhf, apt-get will look for armhf Docker packages, fail to find them,
and error out.
Fix this by qualifying the repo line with the currently active
architecture.
This fixes issue #18207.
Signed-off-by: Martin Kelly <martin@surround.io>
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.
Add v1 migration code.
Update registry, api/*, and daemon packages to use the reference
package's types where applicable.
Update daemon package to use image/layer/tag stores instead of the graph
package
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
The image store abstracts image handling. It keeps track of the
available images, and makes it possible to delete existing images or
register new ones. The image store holds references to the underlying
layers for each image.
The image/v1 package provides compatibility functions for interoperating
with older (non-content-addressable) image structures.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
The tag store associates tags and digests with image IDs. This
functionality used to be part of graph package. This commit splits it
off into a self-contained package with a simple interface.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Layer store manages read-only and read-write layers on a union file system.
Read only layers are always referenced by content addresses.
Read-write layer identifiers are handled by the caller but upon registering
its difference, the committed read-only layer will be referenced by content
hash.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Can't safely use uint32 for locker since we need to decrement the count,
which requires loading the unit and doing some math, which is inherintly
racey.
Instead use Int32 which we can safely use with atomic and AddInt32 with
`-1`
Signed-off-by: Brian Goff <cpuguy83@gmail.com>