DEV Community

Discussion on: The complete guide to setup a CI/CD for Rails 6+ on Gitlab

 
zimski profile image
CHADDA Chakib

Hi Patrik,

When I print /etc/hosts inside a service and the main container, I get:

# Inside a service
2018-12-26T14:48:23.565202452Z 127.0.0.1    localhost
2018-12-26T14:48:23.565246527Z ::1  localhost ip6-localhost ip6-loopback
2018-12-26T14:48:23.565251755Z fe00::0  ip6-localnet
2018-12-26T14:48:23.565256138Z ff00::0  ip6-mcastprefix
2018-12-26T14:48:23.565260449Z ff02::1  ip6-allnodes
2018-12-26T14:48:23.565264704Z ff02::2  ip6-allrouters
2018-12-26T14:48:23.565268770Z 172.17.0.6   cc27ba611b73

# inside the main container
127.0.0.1   localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.5  postgres a35defa95dba runner-a252ce20-project-5796108-concurrent-0-postgres-0
172.17.0.6  runner-a252ce20-project-5796108-concurrent-0

So definitely, the ip of the main container is 172.17.0.6 and it's referenced inside the service but with an other name cc27ba611b73 and it's the container ID. so I cannot find an easy way to fix your issue.

May be you can create a issue in the repo, gitlab is opensource ;)

The chrome is CPU intensive, using it side by side with rails server can make your system test flaky.

Have a good day