Jump to content
Sign in to follow this  
mstdmstdd

php_network_getaddresses: getaddrinfo failed error in Docker's adminer

Recommended Posts

Hello!

I have problem with access to adminer in my docker container with laravel 5/mysql app. I got error :

Quote

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed


In my docker-compose.yml :

version: '3'

services:

    votes_app:
        build:
            context: ./web
            dockerfile: Dockerfile.yml
        
        container_name: votes_app_container
        environment:
            - APACHE_RUN_USER=#1000
        volumes:
            - ${APP_PATH_HOST}:${APP_PTH_CONTAINER}
        ports:
            - 8081:80
        working_dir: ${APP_PTH_CONTAINER}


    db:
        image: mysql:5.6.41
        restart: always
        environment: 
            MYSQL_ROOT_PASSWORD: 1
        volumes:
            - ${DB_PATH_HOST}:/var/lib/mysql


    adminer:
        image: adminer
        restart: always
        ports:
            - 8082:8080
        links:
            - db


    votes_composer:
        image: composer:1.6
        container_name: votes_composer_container
        volumes:
            - ${APP_PATH_HOST}:${APP_PTH_CONTAINER}
        working_dir: ${APP_PTH_CONTAINER}
        command: composer install --ignore-platform-reqs


I rebuilded the app but I failed to login into adminer : https://imgur.com/a/JWVGfBA

I run in console of my OS pointing to other unused 8089 port:

$ docker run -p 8089:8080 -e ADMINER_DEFAULT_SERVER=db adminer
PHP 7.2.11 Development Server started at Thu Nov  1 07:00:46 2018
[Thu Nov  1 07:01:11 2018] ::ffff:172.17.0.1:34048 [200]: /
[Thu Nov  1 07:01:20 2018] ::ffff:172.17.0.1:34052 [302]: /
[Thu Nov  1 07:01:21 2018] ::ffff:172.17.0.1:34060 [403]: /?server=db&username=root

But again error logining to adminer to 8089 port, but the error message was different :

https://imgur.com/a/a8qM4bt

What is wrong ? 

Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.