how to execute docker commands through Java program

后端 未结 3 1779
礼貌的吻别
礼貌的吻别 2021-01-18 11:44

Instead of calling Docker remote APIs, I need develop a program which just talks to Docker Linux Client (not Docker daemon). Here is my code

    try {
               


        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-18 12:23

    To overcome the error you're facing, you should use "-i" instead of "-it". The -t arg tells docker to allocate a pseudo tty.

    Having said that, I agree with Florian, you should use the docker remote api. https://docs.docker.com/engine/reference/api/docker_remote_api/

提交回复
热议问题