jenkinsci / jenkinsci/docker-workflow-plugin
[JENKINS-60674] Get published host port from the container within the inside block
- Dominant language
- Java
- Stars
- 527
- Forks
- 422
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
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.
---
Originally reported by iyzsong, imported from: Get published host port from the container within the inside block
Raw content of original issue
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.
Contributor guide
Assessment
This issue has not been assessed yet.