PDA

Visualizza la versione completa : Importare database dentro contenitore Wordpress per Docker


astros3
07-07-2018, 11:37
$ cat docker-compose.yml
version: '3.3'

services:
db:
image: mysql:5.7
volumes:
- dbdata:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress

wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress

volumes:
dbdata:


$ docker run -it --rm --volumes-from abc_wordpress_1 --network container:abc_wordpress_1 wordpress:cli db import < resources/wordpress.sql
the input device is not a TTY


Qual' il problema?

Loading