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

org.voovan.docker.message.exec.ExecCreate Maven / Gradle / Ivy

Go to download

By encapsulating the Docker API enables developers to use Java can quickly developed the control and operation of the Docker application, using streaming operation, simple and clear.

The newest version!
package org.voovan.docker.message.exec;

import org.voovan.tools.TObject;
import org.voovan.tools.json.JSON;
import org.voovan.tools.log.Logger;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author helyho
 * 

* DockerFly Framework. * WebSite: https://git.oschina.net/helyho/JDocker * Licence: Apache v2 License */ public class ExecCreate { private Boolean attachStdin; private Boolean attachStdout; private Boolean attachStderr; private String detachKeys; private Boolean tty; private Boolean privileged; private List cmd; //v1.25 private List env; public ExecCreate() { attachStdin = false; attachStdout = true; attachStderr = true; detachKeys = "ctrl-p,ctrl-q"; tty = true; cmd = new ArrayList(); env = new ArrayList(); } public Boolean isAttachStdin() { return attachStdin; } public void setAttachStdin(Boolean attachStdin) { this.attachStdin = attachStdin; } public Boolean isAttachStdout() { return attachStdout; } public void setAttachStdout(Boolean attachStdout) { this.attachStdout = attachStdout; } public Boolean isAttachStderr() { return attachStderr; } public void setAttachStderr(Boolean attachStderr) { this.attachStderr = attachStderr; } public String getDetachKeys() { return detachKeys; } public void setDetachKeys(String detachKeys) { this.detachKeys = detachKeys; } public Boolean isTty() { return tty; } public void setTty(Boolean tty) { this.tty = tty; } public Boolean isPrivileged() { return privileged; } public void setPrivileged(Boolean privileged) { this.privileged = privileged; } public List getCmd() { return cmd; } public void setCmd(List cmd) { this.cmd = cmd; } public List getEnv() { return env; } public void setEnv(List env) { this.env = env; } public static void main(String[] args) { ExecCreate execCreate = new ExecCreate(); execCreate.getCmd().addAll(TObject.asList("ls", "-lh")); Logger.simple(JSON.formatJson(JSON.toJSON(execCreate))); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy