クラス ContainerFinder


  • public class ContainerFinder
    extends java.lang.Object
    Execute `docker ps` command to find out the id of container that is publishing the specified IP port
     $ docker ps --filter publish=80 --filter status=running -q
     fd5ad3b76b13
     
    --filter publish=portNumber : require the container which publishes the portNumber --filter status=running : require the container which is running -q : show container-id only Reference: - https://matsuand.github.io/docs.docker.jp.onthefly/engine/reference/commandline/ps/
    • コンストラクタの詳細

      • ContainerFinder

        public ContainerFinder()
    • メソッドの詳細

      • findContainerByHostPort

        public static ContainerFinder.ContainerFindingResult findContainerByHostPort​(PublishedPort publishedPort)
                                                                              throws java.io.IOException,
                                                                                     java.lang.InterruptedException
        例外:
        java.io.IOException
        java.lang.InterruptedException