All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dockerjava.api.command.PruneCmd Maven / Gradle / Ivy

package com.github.dockerjava.api.command;

import com.github.dockerjava.api.model.PruneResponse;
import com.github.dockerjava.api.model.PruneType;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import java.util.List;
import java.util.Map;

/**
 * Delete unused content (containers, images, volumes, networks, build relicts)
 *
 * @since {@link RemoteApiVersion#VERSION_1_25}
 */
public interface PruneCmd extends SyncDockerCmd {

    @Nonnull
    PruneType getPruneType();

    @Nonnull
    String getApiPath();

    @CheckForNull
    Map> getFilters();

    PruneCmd withPruneType(final PruneType pruneType);
    /**
     * Prune containers created before this timestamp
     * Meaningful only for CONTAINERS and IMAGES prune type
     * @param until Can be Unix timestamps, date formatted timestamps,
     *              or Go duration strings (e.g. 10m, 1h30m) computed relative to the daemon machine’s time.
     */
    PruneCmd withUntilFilter(String until);

    /**
     * When set to true, prune only unused and untagged images. When set to false, all unused images are pruned.
     * Meaningful only for IMAGES prune type
     */
    PruneCmd withDangling(Boolean dangling);

    /**
     * Prune containers with the specified labels
     */
    PruneCmd withLabelFilter(String... label);

    @Override
    PruneResponse exec();

    interface Exec extends DockerCmdSyncExec {
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy