Hi all,
Here's my problem. I'm using custom docker image based on "php:7.3-apache" in Pipelines. When the pipeline runs I'm getting "Connection refused" when trying to curl / connect to port 80. This does not happen when I use the original "php:7.3-apache" image. What is weird is that the custom image works locally just fine and I'm able connect to port 80. The issue seems to be present only in Pipelines.
Dockerfile
FROM php:7.3-apache
RUN apt-get update && apt-get install -y netcat # Only for debugging purposes
RUN docker-php-ext-install pdo pdo_mysql
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
Pipeline (snippet):
...
- nc -zv 127.0.0.1 80
- echo "TEST" > /var/www/html/test.html
- curl -v http://127.0.0.1/test.html
...
Response to the above
nc: connect to localhost (127.0.0.1) port 80 (tcp) failed: Connection refused
Running the image locally
root@b4325d0e00d1:/var/www/html# nc -zv 127.0.0.1 80
Connection to 127.0.0.1 80 port [tcp/*] succeeded!
Any ideas what is the issue and how to get around this?