Forums

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

How to access this service container by port number

Si January 27, 2019

I have some local testing with docker containers, and I'm trying to replicate it in bitbucket pipelines. I have the following in my pipelines definition:

definitions:
services:
chrome:
image: previousnext/chrome-headless
ports:
- "9222:9222"

 And I understand this should make it available on localhost:9222. But when the tests run, I get...

Could not fetch version information from http://localhost:9222/json/version. Please check if Chrome is running.

 I'm not sure how to debug. I don't even know if the container is running.  I have also tried simply

chrome:
image: previousnext/chrome-headless:65

 

2 answers

0 votes
Si January 28, 2019

I fixed this by using the service in my step with:

services:
- chrome
0 votes
Si January 28, 2019

nevermind. I just ran the docker command directly.

Si January 28, 2019

I unaccepted this answer, i have other issues with memory running docker containers in steps, and I believe I should be using service definitions.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events