# Testcontainers support in Travis CI

**URL:** <https://travis-ci.community/t/testcontainers-support-in-travis-ci/5936>\
**Category:** Java\
**Tags:** java, bug, docker\
**Created:** [November 14, 2019, 4:14pm UTC](https://travis-ci.community/t/testcontainers-support-in-travis-ci/5936 "2019-11-14T16:14:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xaviarias](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/xaviarias/32/3078_2.png) [@xaviarias](https://travis-ci.community/u/xaviarias)\
**Post date:** [November 14, 2019, 4:14pm UTC](https://travis-ci.community/t/testcontainers-support-in-travis-ci/5936/1 "2019-11-14T16:14:59Z")

</div>

Hi,

[This repository](https://github.com/xaviarias/travis-testcontainers) contains a Gradle project with a simple network test to validate Travis CI build pipeline.

The test tries to connect to a Docker container, which listens for requests in the port 8080 and returns a HTTP 200 OK code with a string.

You can clone and validate the test is passing in a local machine, however, it fails on Travis CI with a connection refused error.

To run the test in your machine you will need a Java SDK and Docker installed. Then run the command under the project directory:

`./gradlew test`

An example of a failed build:  
[https://travis-ci.org/xaviarias/travis-testcontainers/builds/611946891](https://travis-ci.org/xaviarias/travis-testcontainers/builds/611946891)

Edit: The GitHub workflow for the same build is [working](https://github.com/xaviarias/travis-testcontainers/commit/56adb22c828320d06b16e396063895c8eda13c4c/checks?check_suite_id=311238934).
