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

com.fitbur.github.dockerjava.jaxrs.RemoveImageCmdExec Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.fitbur.github.dockerjava.jaxrs;

import com.fitbur.github.dockerjava.api.com.fitburmand.RemoveImageCmd;
import com.fitbur.github.dockerjava.core.DockerClientConfig;
import com.fitbur.slf4j.Logger;
import com.fitbur.slf4j.LoggerFactory;

import javax.ws.rs.client.WebTarget;

public class RemoveImageCmdExec extends AbstrSyncDockerCmdExec implements RemoveImageCmd.Exec {

    private static final Logger LOGGER = LoggerFactory.getLogger(RemoveImageCmdExec.class);

    public RemoveImageCmdExec(WebTarget baseResource, DockerClientConfig dockerClientConfig) {
        super(baseResource, dockerClientConfig);
    }

    @Override
    protected Void execute(RemoveImageCmd com.fitburmand) {
        WebTarget webResource = getBaseResource().path("/images/" + com.fitburmand.getImageId())
                .queryParam("force", com.fitburmand.hasForceEnabled() ? "1" : "0")
                .queryParam("noprune", com.fitburmand.hasNoPruneEnabled() ? "1" : "0");

        LOGGER.trace("DELETE: {}", webResource);
        webResource.request().com.fitburlete().close();

        return null;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy