Try to restore Wordpress container
Page content
docker 버전이 업데이트되고, 몇 가지 변경사항이 있은 후 ghost, wordpress/mysql 조합의 container들이 접속이 되질 않는다. 한참을 두고 보다 ghost는 새 버전(1.x)이 나온 걸 계기로 새로 설치를 했는데(당연히 이전 설치에서 데이터를 container 내부가 아니라 local machine에 두도록 해서 데이터는 그대로 보존) wordpress는 그러질 못했다.
이것 역시 참다참다 못해 https://docs.docker.com/compose/wordpress/#define-the-project 에 나와있는 docker swarm을 이용해서 복구해 보려고 삽을 들었다.
위 페이지에 있는 대로 설정 파일을 만들고
version: '3'
services:
db:
image: mysql:5.7
volumes:
- /Users/cychong/Dropbox/Apps/wordpress/:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: xxx
MYSQL_DATABASE: xxx
MYSQL_USER: xxx
MYSQL_PASSWORD: xxx
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- /Users/cychong/Documents/wordpress/:/var/www/html
- /Users/cychong/Documents/wordpress/php_uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: xxx
WORDPRESS_DB_PASSWORD: xxx
volumes:
db_data:
문서에 있는 대로 docker compose 명령을 실행했는데
cychong:~/work/my_wordpress cychong$ docker-compose up -d
Creating network "mywordpress_default" with the default driver
Creating volume "mywordpress_db_data" with default driver
Pulling db (mysql:5.7)...
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 68, in main
File "compose/cli/main.py", line 118, in perform_command
File "compose/cli/main.py", line 928, in up
File "compose/project.py", line 427, in up
File "compose/service.py", line 311, in ensure_image_exists
File "compose/service.py", line 1016, in pull
File "site-packages/docker/api/image.py", line 358, in pull
File "site-packages/docker/auth.py", line 50, in get_config_header
File "site-packages/docker/auth.py", line 97, in resolve_authconfig
File "site-packages/docker/auth.py", line 142, in _resolve_authconfig_credstore
docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-osxkeychain exited with "User interaction is not allowed.".',)
Failed to execute script docker-compose
쩝.. 아직 갈길이 멀구나.