Forums

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

How do I connect container to services in Pipelines without network=host?

Richard Taylor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 13, 2019

I used to run this with --networking=host, but that's no longer viable.

I've tried both localhost and 127.0.0.1. I'm getting connection refused

 

options:
docker: true

definitions:
services:
redis:
image: redis
rabbitmq:
image: rabbitmq

pipelines:
branches:
master:
- step:
name: Build
services:
- redis
- rabbitmq
script:
- export IMAGE=$ECR/$BITBUCKET_REPO_SLUG
- docker build -t $IMAGE:$BITBUCKET_COMMIT .
- docker run -e REDIS_HOST=127.0.0.1 -e AMQP_URL=amqp://127.0.0.1:5672 --entrypoint rspec $IMAGE:$BITBUCKET_COMMIT app/spec
- docker push $IMAGE:$BITBUCKET_COMMIT

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events