如何使用Docker构buildpipe道插件公开端口

我在Jenkins中使用了下面的pipe道阶段。 如何在调用apitestimage.inside时暴露5800端口?

stage('build Dockerimage and run API-tests') { steps{ script { def apitestimage = docker.build('apitestimage', '--no-cache=true dockerbuild') apitestimage.inside { dir('testing'){ sh 'ctest' } } sh 'docker rmi --force apitestimage' } } }