Error installing mysql container using docker-compose under centos7.4 could not find dynamic link library

docker-compose.yml

version: "3.6"
services:

    db:
        image: mysql:5.7
        restart: always
        environment:
            MYSQL_ROOT_PASSWORD: 123456
            MYSQL_DATABASE: reader
            MYSQL_USER: reader
            MYSQL_PASSWORD: 123456
        ports:
            - "3306:3306"

after executing docker-compose up, prompt:

db_1 | / bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
mysql7_db_1 exited with code 127
db_1 | / bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
db_1 | / bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
db_1 | / bin/bash: error while loading shared libraries: libtinfo.so. 5: cannot open shared object file: No such file or directory
db_1 | / bin/bash: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

Why do you prompt this? the container in question is a set of containers that can run normally in a completely isolated environment (containers), and the environment in which the software runs does not depend on the host machine. The same docker-compose.yml is perfectly normal on mac. Whether the understanding of the container is wrong.

Mar.06,2021

also encountered.


Oh, my God, I have the same problem. No matter how good I am, it is useless to reinstall docker. I have a terrible headache


.

sign up to answer this question, which can be solved by installing docker-ce.

yum install -y yum-utils device-mapper-persistent-data lvm2 -y
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io -y
Menu