/** * Total memory (memory + swap). Set to -1 to enable unlimited swap. * @param totalMemory Total memory (memory + swap) in bytes. * @return BuildParam */ public static BuildParam totalMemory(final Integer totalMemory) { return create("memoryswap", totalMemory.toString()); }
/** * Set memory limit for build. * @param memory Memory limit for build, in bytes. * @return BuildParam */ public static BuildParam memory(final Integer memory) { return create("memory", memory.toString()); }
/** * CPU shares (relative weight). * @param cpuShares CPU shares (relative weight). * @return BuildParam */ public static BuildParam cpuShares(final Integer cpuShares) { return create("cpushares", cpuShares.toString()); }
/** * CPUs in which to allow execution, e.g. <code>0-3</code>, <code>0,1</code>. * @param cpusetCpus CPUs in which to allow execution * @return BuildParam */ public static BuildParam cpusetCpus(final Integer cpusetCpus) { return create("cpusetcpus", cpusetCpus.toString()); } }
/** * CPU shares (relative weight). * @param cpuShares CPU shares (relative weight). * @return BuildParam */ public static BuildParam cpuShares(final Integer cpuShares) { return create("cpushares", cpuShares.toString()); }
/** * Total memory (memory + swap). Set to -1 to enable unlimited swap. * @param totalMemory Total memory (memory + swap) in bytes. * @return BuildParam */ public static BuildParam totalMemory(final Integer totalMemory) { return create("memoryswap", totalMemory.toString()); }
/** * Set memory limit for build. * @param memory Memory limit for build, in bytes. * @return BuildParam */ public static BuildParam memory(final Integer memory) { return create("memory", memory.toString()); }
/** * Always attempt to pull a newer version of the base image even if one exists locally. * * @return BuildParam */ public static BuildParam pullNewerImage() { return create("pull", "true"); }
/** * Always remove intermediate containers. * * @return BuildParam */ public static BuildParam forceRm() { return create("forcerm", "true"); }
/** * Do not use the cache when building the image. * * @return BuildParam */ public static BuildParam noCache() { return create("nocache", "true"); }
/** * Repository name (and optionally a tag) to be applied to the * resulting image in case of success. * * <p>You could also pass the name explicitly to {@link #build(Path, String, BuildParam...)} * or one of the other build methods that takes an explicit name. * @param name A name to apply to the image * @return BuildParam */ public static BuildParam name(final String name) { return create("t", name); }
/** * path within the build context to the Dockerfile. This is ignored * if {@link #remote(URI)} is specified and points to an individual filename. * * <p>You could also pass the dockerfile path explicitly to * {@link #build(Path, String, String, ProgressHandler, BuildParam...)} * or one of the other build methods that takes an explicit dockerfile path. * @param dockerfile Path to the dockerfile in the build context. * @return BuildParam */ public static BuildParam dockerfile(final Path dockerfile) { return create("dockerfile", dockerfile.toString()); }
/** * A Git repository URI or HTTP/HTTPS URI build source. If the URI * specifies a filename, the file's contents are placed into a file called `Dockerfile`. * * @param remote A Git repository URI or HTTP/HTTPS URI build source. * @return BuildParam */ public static BuildParam remote(final URI remote) { return create("remote", remote.toString()); }
/** * Always attempt to pull a newer version of the base image even if one exists locally. * * @return BuildParam */ public static BuildParam pullNewerImage() { return create("pull", "true"); }
/** * Control whether to remove intermediate containers after a successful build. * * @param rm Whether to remove * @return BuildParam */ public static BuildParam rm(final boolean rm) { return create("rm", String.valueOf(rm)); }
/** * CPUs in which to allow execution, e.g. <code>0-3</code>, <code>0,1</code>. * @param cpusetCpus CPUs in which to allow execution * @return BuildParam */ public static BuildParam cpusetCpus(final Integer cpusetCpus) { return create("cpusetcpus", cpusetCpus.toString()); } }
/** * Do not use the cache when building the image. * * @return BuildParam */ public static BuildParam noCache() { return create("nocache", "true"); }
/** * Suppress verbose build output. * * @return BuildParam */ public static BuildParam quiet() { return create("q", "true"); }
/** * Repository name (and optionally a tag) to be applied to the * resulting image in case of success. * * <p>You could also pass the name explicitly to {@link #build(Path, String, BuildParam...)} * or one of the other build methods that takes an explicit name. * @param name A name to apply to the image * @return BuildParam */ public static BuildParam name(final String name) { return create("t", name); }
/** * Always remove intermediate containers. * * @return BuildParam */ public static BuildParam forceRm() { return create("forcerm", "true"); }