The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

build and run docker image within the pipeline

Wilber Marcel da Silva
November 18, 2020

I would like to upload my generated war in a container to be able to test an endpoint of it. So far I can build and rotate the image, but I can't access the resource in any way, it is as follows:

...
services:
- docker
script:
- ls -lia
- chmod 755 Dockerfile
- docker -v
- docker build -t imageteste .
- docker run -d -p 8040:8080 --name ordermanagement -i imageteste
- docker ps
- docker inspect ordermanagement
- docker exec -i ordermanagement sh -c "wget 172.17.0.1:8040/ordermanagement/order/all"

I've tried curl to no avail, so I'm using wget. The return is as follows:

docker exec -i ordermanagement sh -c "wget 172.17.0.1:8040/ordermanagement/order/all"
Connecting to 172.17.0.1:8040 (172.17.0.1:8040)
wget: error getting response: Connection reset by peer

The funny thing is that I ran exactly the same commands from my machine's prompt and it returns me the expected that for this resource using GET it would be 405.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Jason Harrison
Contributor
November 26, 2020
TAGS
AUG Leaders

Atlassian Community Events