Importare database dentro un contenitore (docker) wordpress

di il
13 risposte

Importare database dentro un contenitore (docker) wordpress


$ 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?

13 Risposte

Devi accedere o registrarti per scrivere nel forum
13 risposte