[JIRA] (JENKINS-60674) Get published host port from the container within the inside block

3 views
Skip to first unread message

iyzsong@163.com (JIRA)

unread,
Jan 7, 2020, 5:01:03 AM1/7/20
to jenkinsc...@googlegroups.com
Bunnbu Sou created an issue
 
Jenkins / New Feature JENKINS-60674
Get published host port from the container within the inside block
Issue Type: New Feature New Feature
Assignee: Unassigned
Components: docker-workflow-plugin
Created: 2020-01-07 10:00
Priority: Minor Minor
Reporter: Bunnbu Sou

Hello, is there a way to get the published host port of the container within the `inside` block?

Like this:
```
docker.build('test').inside('--publish 8080')

{ c -> echo c.port(8080) }

```

 Our tests run inside the container, and publish a port for external system to use.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

iyzsong@163.com (JIRA)

unread,
Jan 7, 2020, 5:02:02 AM1/7/20
to jenkinsc...@googlegroups.com
Bunnbu Sou updated an issue
Change By: Bunnbu Sou
Hello, is there a way to get the published host port of the container within the `inside` block?

Like this:
``` {code:java}
  docker.build('test').inside('--publish 8080') { c ->
    echo c.port(8080)
  }
{code}
```

 Our tests run inside the container, and publish a port for external system to use.
Reply all
Reply to author
Forward
0 new messages