Build container access for services

Build container access for services

Services in build actions are a very popular feature allowing you to test applications that require, for example, a database or a Selenium driver to run.

Three weeks ago we added custom services that enabled tests of microservice applications—a very similar feature to docker compose. Until now, the communication was limited to one side: you could connect to a database or another service from the container that was triggering the tests, but it was impossible to connect the other way back.

We're happy to announce that connections now work both ways.

Network in build action

Scripts defined in a build action are run in a Docker container. The container is launched on the basis of a Docker image configured in the Environment tab.

Once you attach a service to the container, you define the hostname that is used to connect to it:

Image loading...Services tab

The default name of the services' main container is "MainService". You can change it by clicking the hostname in the Services tab (the input is hidden):

Image loading...Hostname change

Ports

All default services have predefined ports. For example, the port for MySQL is 3306. The port is listed in the details of each service:

Image loading...Setting up port

The ports used for communication between the custom service and the main container should be defined in the Docker image.

Warning
Buddy is 100% customer driven. If there’s a feature or integration you miss, let us know in the comments below or directly at support@buddy.works.
Jarek Dylewski

Jarek Dylewski

Customer Support

A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.

Apr 11th 2019
Share