Open surajssd opened 8 years ago
Additional info:
docker version
$ docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:39:21 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:39:21 2016
OS/Arch: linux/amd64
docker-compose version
$ docker-compose version
docker-compose version 1.7.1, build 6c29830
docker-py version: 1.8.1
CPython version: 2.7.11
OpenSSL version: OpenSSL 1.0.2h-fips 3 May 2016
Another example:
Using following docker-compose file:
$ cat docker-compose.yml
version: "2"
services:
mariadb:
image: centos/mariadb
ports:
- "$DB_PORT"
environment:
MYSQL_ROOT_PASSWORD: $ROOT_PASS
MYSQL_DATABASE: $DB_NAME
MYSQL_PASSWORD: $DB_PASS
MYSQL_USER: $DB_USER
wordpress:
image: wordpress
ports:
- "8080:80"
depends_on:
- mariadb
restart: always
environment:
WORDPRESS_DB_HOST: $DB_HOST:$DB_PORT
WORDPRESS_DB_NAME: $DB_NAME
WORDPRESS_DB_PASSWORD: $DB_PASS
WORDPRESS_DB_USER: $DB_USER
and envs file
$ cat envs
DB_HOST=mariadb
ROOT_PASS=wordpress
DB_NAME=wordpress
DB_PASS=wordpress
DB_USER=wordpress
DB_PORT=3306
Using libcompose it fails:
$ export $(cat envs)
$ ./libcompose up
WARN[0000] Note: This is an experimental alternate implementation of the Compose CLI (https://github.com/docker/compose)
INFO[0000] Project [wordpress]: Starting project
INFO[0000] [0/2] [mariadb]: Starting
INFO[0001] [1/2] [mariadb]: Started
INFO[0001] [1/2] [wordpress]: Starting
INFO[0002] [2/2] [wordpress]: Started
INFO[0002] Project [wordpress]: Project started
mariadb_1 | Running mysql_install_db ...
mariadb_1 | Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
mariadb_1 | 160606 14:37:17 [Note] /usr/libexec/mysqld (mysqld 5.5.47-MariaDB) starting as process 31 ...
wordpress_1 | WordPress not found in /var/www/html - copying now...
wordpress_1 | Complete! WordPress has been successfully copied to /var/www/html
mariadb_1 | OK
mariadb_1 | Filling help tables...
mariadb_1 | 160606 14:37:19 [Note] /usr/libexec/mysqld (mysqld 5.5.47-MariaDB) starting as process 38 ...
mariadb_1 | OK
mariadb_1 |
mariadb_1 | To start mysqld at boot time you have to copy
mariadb_1 | support-files/mysql.server to the right place for your system
mariadb_1 |
mariadb_1 | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mariadb_1 | To do so, start the server, then issue the following commands:
mariadb_1 |
mariadb_1 | '/usr/bin/mysqladmin' -u root password 'new-password'
mariadb_1 | '/usr/bin/mysqladmin' -u root -h e99e40733f2d password 'new-password'
mariadb_1 |
mariadb_1 | Alternatively you can run:
mariadb_1 | '/usr/bin/mysql_secure_installation'
mariadb_1 |
mariadb_1 | which will also give you the option of removing the test
mariadb_1 | databases and anonymous user created by default. This is
mariadb_1 | strongly recommended for production servers.
mariadb_1 |
mariadb_1 | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
mariadb_1 | MySQL manual for more instructions.
mariadb_1 |
mariadb_1 | You can start the MariaDB daemon with:
mariadb_1 | cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'
mariadb_1 |
mariadb_1 | You can test the MariaDB daemon with mysql-test-run.pl
mariadb_1 | cd '/usr/mysql-test' ; perl mysql-test-run.pl
mariadb_1 |
mariadb_1 | Please report any problems at http://mariadb.org/jira
mariadb_1 |
mariadb_1 | The latest information about MariaDB is available at http://mariadb.org/.
mariadb_1 | You can find additional information about the MySQL part at:
mariadb_1 | http://dev.mysql.com
mariadb_1 | Support MariaDB development by buying support/new features from MariaDB
mariadb_1 | Corporation Ab. You can contact us about this at sales@mariadb.com.
mariadb_1 | Alternatively consider joining our community based development effort:
mariadb_1 | http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
mariadb_1 |
mariadb_1 | Finished mysql_install_db
mariadb_1 | 160606 14:37:19 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
mariadb_1 | 160606 14:37:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
wordpress_1 |
wordpress_1 | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
wordpress_1 |
wordpress_1 | Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
wordpress_1 |
wordpress_1 | Warning: mysqli::mysqli(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
wordpress_1 |
wordpress_1 | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
wordpress_1 |
wordpress_1 | Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
wordpress_1 |
wordpress_1 | Warning: mysqli::mysqli(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
wordpress_1 |
wordpress_1 | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
wordpress_1 |
wordpress_1 | Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
wordpress_1 |
wordpress_1 | Warning: mysqli::mysqli(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
^C
Gracefully stopping...
ERRO[0009] Failed EventType: 0 wordpress : net/http: request canceled
ERRO[0009] Failed EventType: 0 mariadb : net/http: request canceled
ERRO[0009] Failed to start: mariadb : net/http: request canceled
ERRO[0009] Failed to start: wordpress : net/http: request canceled
Using Docker-compose it works
$ export $(cat envs)
$ docker-compose up
Creating wordpress_mariadb_1
Creating wordpress_wordpress_1
Attaching to wordpress_mariadb_1, wordpress_wordpress_1
mariadb_1 | Running mysql_install_db ...
mariadb_1 | Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
mariadb_1 | 160606 14:38:06 [Note] /usr/libexec/mysqld (mysqld 5.5.47-MariaDB) starting as process 32 ...
wordpress_1 | WordPress not found in /var/www/html - copying now...
wordpress_1 | Complete! WordPress has been successfully copied to /var/www/html
mariadb_1 | OK
mariadb_1 | Filling help tables...
mariadb_1 | 160606 14:38:08 [Note] /usr/libexec/mysqld (mysqld 5.5.47-MariaDB) starting as process 40 ...
mariadb_1 | OK
mariadb_1 |
mariadb_1 | To start mysqld at boot time you have to copy
mariadb_1 | support-files/mysql.server to the right place for your system
mariadb_1 |
mariadb_1 | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mariadb_1 | To do so, start the server, then issue the following commands:
mariadb_1 |
mariadb_1 | '/usr/bin/mysqladmin' -u root password 'new-password'
mariadb_1 | '/usr/bin/mysqladmin' -u root -h 3f79481dfb46 password 'new-password'
mariadb_1 |
mariadb_1 | Alternatively you can run:
mariadb_1 | '/usr/bin/mysql_secure_installation'
mariadb_1 |
mariadb_1 | which will also give you the option of removing the test
mariadb_1 | databases and anonymous user created by default. This is
mariadb_1 | strongly recommended for production servers.
mariadb_1 |
mariadb_1 | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
mariadb_1 | MySQL manual for more instructions.
mariadb_1 |
mariadb_1 | You can start the MariaDB daemon with:
mariadb_1 | cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'
mariadb_1 |
mariadb_1 | You can test the MariaDB daemon with mysql-test-run.pl
mariadb_1 | cd '/usr/mysql-test' ; perl mysql-test-run.pl
mariadb_1 |
mariadb_1 | Please report any problems at http://mariadb.org/jira
mariadb_1 |
mariadb_1 | The latest information about MariaDB is available at http://mariadb.org/.
mariadb_1 | You can find additional information about the MySQL part at:
mariadb_1 | http://dev.mysql.com
mariadb_1 | Support MariaDB development by buying support/new features from MariaDB
mariadb_1 | Corporation Ab. You can contact us about this at sales@mariadb.com.
mariadb_1 | Alternatively consider joining our community based development effort:
mariadb_1 | http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
mariadb_1 |
mariadb_1 | Finished mysql_install_db
mariadb_1 | 160606 14:38:08 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
mariadb_1 | 160606 14:38:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
wordpress_1 |
wordpress_1 | Warning: mysqli::mysqli(): (HY000/2002): Connection refused in - on line 10
wordpress_1 |
wordpress_1 | MySQL Connection Error: (2002) Connection refused
wordpress_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.3. Set the 'ServerName' directive globally to suppress this message
wordpress_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.3. Set the 'ServerName' directive globally to suppress this message
wordpress_1 | [Mon Jun 06 14:38:11.853270 2016] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/5.6.21 configured -- resuming normal operations
wordpress_1 | [Mon Jun 06 14:38:11.853299 2016] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
wordpress_1 | 192.168.121.1 - - [06/Jun/2016:14:38:32 +0000] "GET / HTTP/1.1" 302 413 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36"
wordpress_1 | 192.168.121.1 - - [06/Jun/2016:14:38:32 +0000] "GET /wp-admin/install.php HTTP/1.1" 200 3454 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36"
wordpress_1 | 192.168.121.1 - - [06/Jun/2016:14:38:34 +0000] "GET /favicon.ico HTTP/1.1" 200 239 "http://192.168.121.30:8080/wp-admin/install.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36"
^CGracefully stopping... (press Ctrl+C again to force)
Stopping wordpress_wordpress_1 ... done
Stopping wordpress_mariadb_1 ... done
Docker Compose works but libcompose fails in all apps as
getaddrinfo failed
.I am using following docker-compose file:
and envs file
libcompose version
Using libcompose
Using Docker-compose