1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

php_network_getaddresses: getaddrinfo failed error in Docker's adminer

Discussion in 'Site & Server Administration' started by mstdmstd, Nov 1, 2018.

  1. #1
    Hello!

    I have problem with access to adminer in my docker container with laravel 5/mysql app. I got error :
     SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed 
    Code (markup):

    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
    
    Code (markup):
    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:
    SEMrush
    $ 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
    
    Code (markup):
    But again error logining to adminer to 8089 port, but the error message was different :

    https://imgur.com/a/a8qM4bt

    What is wrong ?

    Thanks!
     
    mstdmstd, Nov 1, 2018 IP
    SEMrush