나는 centos를 서버로 사용하고 다음과 같이 docker-compose를 사용합니다.
mysql:
build: ./DockerFiles/Mysql
ports:
- ${LOCAL_PHP_IP}:${MYSQL_PORT}:3306
privileged: true
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- /opt/mysql_data:/var/lib/mysql
내가 달릴 때
도커-작성 -d
컨테이너가 중지되고 로그를 확인하면 다음 오류가 발생합니다.
mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
ERROR: mysqld failed while attempting to check config
command was: "mysqld --verbose --help"
내 MySQL Dockerfile은 다음과 같습니다.
FROM percona
MAINTAINER Alireza Rahmani Khalili "[email protected]"
ENV TERM xterm
RUN mkdir /etc/mysql/mysql.conf.d
RUN chmod 755 /etc/mysql/mysql.conf.d
RUN chown -R mysql:mysql /etc/mysql/mysql.conf.d
COPY my.cnf /etc/mysql/my.cnf
Centos 서버에서만 이 오류가 반환되는 것을 고려하십시오. 로컬에서 시도했는데 제대로 작동합니다. 또한 저는 이것을 실행하기 위해 gitlab-runner를 사용합니다.