Forums

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

How to run a docker container and have it link to a DB as service, or a linked container

Marcel Olsder
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!
October 17, 2018

In my pipeline, in step 1 I build the docker image for my app and push it.

Then in step 2, I want to run the image so I can execute UI (cypress.io) tests against it. In that step, I need my app to access a Postgres database and ElasticSearch.

So I run the app with a docker run -d mycontainer:latest but I can't get it to connect to the DB or ES.

I've tried running those as services, and via the docker run command. But I can't seem to link to them from my app's container.

What's the proper way to set this up?

I want to migrate from Wercker, but this is a blocker for me.

Thanks a lot!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events