Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cacheFrom to build options #1383

Closed
wants to merge 1 commit into from

Conversation

thomaschaaf
Copy link
Contributor

@thomaschaaf thomaschaaf commented Jan 9, 2017

This adds the cache-from build option (moby/moby#26839) and fixes #1382.

Signed-off-by: Thomas Schaaf <[email protected]>
@thomaschaaf
Copy link
Contributor Author

Is there a problem with my addtion?

@graingert
Copy link

@shin- ping

Copy link
Contributor

@bfirsh bfirsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

A nit: the cachefrom option also needs to be added to the ImageCollection docstring.

(@shin- perhaps we should add a comment to duped docstrings like this to remind contributors to copy changes between them.)

@graingert
Copy link

@thomaschaaf can you update the ImageCollection docstring?

@MichaelPereira
Copy link

@thomaschaaf To save you the search, this is where it should be added:

path (str): Path to the directory containing the Dockerfile
fileobj: A file object to use as the Dockerfile. (Or a file-like
object)
tag (str): A tag to add to the final image
quiet (bool): Whether to return the status
nocache (bool): Don't use the cache when set to ``True``
rm (bool): Remove intermediate containers. The ``docker build``
command now defaults to ``--rm=true``, but we have kept the old
default of `False` to preserve backward compatibility
stream (bool): *Deprecated for API version > 1.8 (always True)*.
Return a blocking generator you can iterate over to retrieve
build output as it happens
timeout (int): HTTP timeout
custom_context (bool): Optional if using ``fileobj``
encoding (str): The encoding for a stream. Set to ``gzip`` for
compressing
pull (bool): Downloads any updates to the FROM image in Dockerfiles
forcerm (bool): Always remove intermediate containers, even after
unsuccessful builds
dockerfile (str): path within the build context to the Dockerfile
buildargs (dict): A dictionary of build arguments
container_limits (dict): A dictionary of limits applied to each
container created by the build process. Valid keys:
- memory (int): set memory limit for build
- memswap (int): Total memory (memory + swap), -1 to disable
swap
- cpushares (int): CPU shares (relative weight)
- cpusetcpus (str): CPUs in which to allow execution, e.g.,
``"0-3"``, ``"0,1"``
decode (bool): If set to ``True``, the returned stream will be
decoded into dicts on the fly. Default ``False``.

@graingert
Copy link

@thomaschaaf @MichaelPereira I've got a fork of this at #1417 with that change.

@shin-
Copy link
Contributor

shin- commented Jan 26, 2017

Closing: #1417

@shin- shin- closed this Jan 26, 2017
@thomaschaaf thomaschaaf deleted the cachefrom branch January 27, 2017 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support cache-from flag
6 participants