Coder Social home page Coder Social logo

docker-wordpress-nginx's Introduction

docker-wordpress-nginx

A Dockerfile that installs the latest wordpress, nginx, php-apc and php-fpm.

NB: A big thanks to jbfink who did most of the hard work on the wordpress parts!

You can check out his Apache version here.

Installation

The easiest way to get this docker image installed is to pull the latest version from the Docker registry:

$ docker pull eugeneware/docker-wordpress-nginx

If you'd like to build the image yourself then:

$ git clone https://github.com/eugeneware/docker-wordpress-nginx.git
$ cd docker-wordpress-nginx
$ sudo docker build -t="eugeneware/docker-wordpress-nginx" .

Usage

To spawn a new instance of wordpress on port 80. The -p 80:80 maps the internal docker port 80 to the outside port 80 of the host machine.

$ sudo docker run -p 80:80 --name docker-wordpress-nginx -d eugeneware/docker-wordpress-nginx

Start your newly created docker.

$ sudo docker start docker-wordpress-nginx

After starting the docker-wordpress-nginx check to see if it started and the port mapping is correct. This will also report the port mapping between the docker container and the host machine.

$ sudo docker ps

0.0.0.0:80 -> 80/tcp docker-wordpress-nginx

You can the visit the following URL in a browser on your host machine to get started:

http://127.0.0.1:80

docker-wordpress-nginx's People

Contributors

aried3r avatar chrisantaki avatar ekalinin avatar ericandrewlewis avatar eugeneware avatar hamiltont avatar joahua avatar joelchen avatar manuelmeurer avatar mrtimuk avatar taylormonacelli avatar vegasbrianc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-wordpress-nginx's Issues

start.sh problem with curl execution

fcoutinho@jarvis:~/git/docker-wordpress-nginx$ docker logs ff905aebb831
161118 12:20:53 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
161118 12:20:53 mysqld_safe Logging to '/var/log/mysql/error.log'.
161118 12:20:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
mysql root password: een4MaeK8aer
wordpress password: nahs5yiereiN
**curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
unzip: cannot find or open nginx-helper..zip, nginx-helper..zip.zip or nginx-helper.*.zip.ZIP.

No zipfiles found.
chown: cannot access '/usr/share/nginx/www/wp-content/plugins/nginx-helper': No such file or directory**

Error after vagrant up - Vagrant attempted to execute the capability 'configure_networks'

On OSX i get error after issuing vagrant up-command

Vagrant attempted to execute the capability 'configure_networks'
on the detect guest OS 'linux', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.```

You should lock down the version of FROM=ubuntu

I have noticed that because you have not specified the version of the ubuntu base image you use, docker pulls all versions available. This takes more time than necessary and makes a mess in your image repository.

If I understand things correctly you have now moved to 14.04 (nice!). Thus you should change "FROM=ubuntu" to "FROM=ubuntu:14.04".

Yes I know I can change this myself before building, but since other versions than the intended one often fail to build there is no point in not locking it to your recommended version.

Thanks in advance, and thanks for the recent quick fix.

Add a license

Could you add a license for your project? jbfink/docker-wordpress is licensed under Unlincense but this project seems to lack a license. Having an Unlicense, or a BSD or MIT or similar type of license would be great.

The docker image has not any SMTP server

when wordpress tries to use the php mail function the mail is not sent because there is not any SMTP server on the container.

How would you suggest to handle this functionality?

MySQL Crash Loop

I'm running into a problem that occurs both when using the Docker Hub image and building the image myself (using the latest revision at this time: acdab6f).

I've tested this on Windows with boot2docker under VirtualBox and in a fully-contained Ubuntu 15.10 virtual machine and had the same results (it's reproducible).

mysql appears to silently fail immediately after starting and supervisor restarts it over and over.
mysql is able to write database files ibdata1 ib_logfile0 and ib_logfile1 before failing.

I wasn't able to find much help on this anywhere else, so any help would be appreciated! I think this might be a bug.

Docker version
$ docker --version
Docker version 1.9.1, build a34a1d5
Volume host path info
$ ls -la /var/lib/mysql
total 28680
drwxrwxrwx  2 root            root                4096 Jan  4 04:54 .
drwxr-xr-x 73 root            root                4096 Jan  4 04:29 ..
-rw-rw----  1 systemd-resolve systemd-resolve 18874368 Jan  4 04:54 ibdata1
-rw-rw----  1 systemd-resolve systemd-resolve  5242880 Jan  4 04:54 ib_logfile0
-rw-rw----  1 systemd-resolve systemd-resolve  5242880 Jan  4 04:52 ib_logfile1
Building the image
$ docker build -t dwpn-dev .
Sending build context to Docker daemon 99.33 kB
Step 1 : FROM ubuntu:14.04
 ---> 89d5d8e8bafb
Step 2 : MAINTAINER Eugene Ware <[email protected]>
 ---> Using cache
 ---> ff2167886988
Step 3 : RUN dpkg-divert --local --rename --add /sbin/initctl
 ---> Using cache
 ---> a90ff2634e51
Step 4 : RUN ln -sf /bin/true /sbin/initctl
 ---> Using cache
 ---> c9f980ea43f3
Step 5 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> 153481f4aac3
Step 6 : RUN apt-get update
 ---> Using cache
 ---> 12cb9f4b9456
Step 7 : RUN apt-get -y upgrade
 ---> Using cache
 ---> 0aa7fee3c1f1
Step 8 : RUN apt-get -y install mysql-server mysql-client nginx php5-fpm php5-mysql php-apc pwgen python-setuptools curl git unzip
 ---> Using cache
 ---> 5fe54110a43b
Step 9 : RUN apt-get -y install php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-sqlite php5-tidy php5-xmlrpc php5-xsl
 ---> Using cache
 ---> e762c71e4d88
Step 10 : RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
 ---> Using cache
 ---> 7a539f4ac600
Step 11 : RUN sed -i -e"s/keepalive_timeout\s*65/keepalive_timeout 2/" /etc/nginx/nginx.conf
 ---> Using cache
 ---> dd02c507274d
Step 12 : RUN sed -i -e"s/keepalive_timeout 2/keepalive_timeout 2;\n\tclient_max_body_size 100m/" /etc/nginx/nginx.conf
 ---> Using cache
 ---> 2b0ba48364aa
Step 13 : RUN echo "daemon off;" >> /etc/nginx/nginx.conf
 ---> Using cache
 ---> 314ac241b573
Step 14 : RUN sed -i -e "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g" /etc/php5/fpm/php.ini
 ---> Using cache
 ---> 72e10038eb41
Step 15 : RUN sed -i -e "s/upload_max_filesize\s*=\s*2M/upload_max_filesize = 100M/g" /etc/php5/fpm/php.ini
 ---> Using cache
 ---> 9c35554cc4b8
Step 16 : RUN sed -i -e "s/post_max_size\s*=\s*8M/post_max_size = 100M/g" /etc/php5/fpm/php.ini
 ---> Using cache
 ---> ff0bd95b3ce0
Step 17 : RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf
 ---> Using cache
 ---> e5b71fa656bc
Step 18 : RUN sed -i -e "s/;catch_workers_output\s*=\s*yes/catch_workers_output = yes/g" /etc/php5/fpm/pool.d/www.conf
 ---> Using cache
 ---> c9b593c8916d
Step 19 : RUN find /etc/php5/cli/conf.d/ -name "*.ini" -exec sed -i -re 's/^(\s*)#(.*)/\1;\2/g' {} \;
 ---> Using cache
 ---> b1f4821b6a60
Step 20 : ADD ./nginx-site.conf /etc/nginx/sites-available/default
 ---> Using cache
 ---> a54fdc5672fe
Step 21 : RUN /usr/bin/easy_install supervisor
 ---> Using cache
 ---> ab5f651dde02
Step 22 : RUN /usr/bin/easy_install supervisor-stdout
 ---> Using cache
 ---> d5a95ad2a72e
Step 23 : ADD ./supervisord.conf /etc/supervisord.conf
 ---> Using cache
 ---> 97689be9c5cb
Step 24 : ADD https://wordpress.org/latest.tar.gz /usr/share/nginx/latest.tar.gz
Downloading 7.079 MB/7.079 MB
 ---> Using cache
 ---> c67539578854
Step 25 : RUN cd /usr/share/nginx/ && tar xvf latest.tar.gz && rm latest.tar.gz
 ---> Using cache
 ---> 9070a0fc5512
Step 26 : RUN mv /usr/share/nginx/html/5* /usr/share/nginx/wordpress
 ---> Using cache
 ---> db638615a59c
Step 27 : RUN rm -rf /usr/share/nginx/www
 ---> Using cache
 ---> 0c5068135a8f
Step 28 : RUN mv /usr/share/nginx/wordpress /usr/share/nginx/www
 ---> Using cache
 ---> 6dca56ad32e4
Step 29 : RUN chown -R www-data:www-data /usr/share/nginx/www
 ---> Using cache
 ---> 9354b6f52dca
Step 30 : ADD ./start.sh /start.sh
 ---> Using cache
 ---> bb665433d861
Step 31 : RUN chmod 755 /start.sh
 ---> Using cache
 ---> b4c7390c2ab5
Step 32 : EXPOSE 3306
 ---> Using cache
 ---> 23ccb658ce04
Step 33 : EXPOSE 80
 ---> Using cache
 ---> 05c00a52e48c
Step 34 : VOLUME /var/lib/mysql /usr/share/nginx/www
 ---> Using cache
 ---> 6b23efffff88
Step 35 : CMD /bin/bash /start.sh
 ---> Using cache
 ---> ef52a9160c4f
Successfully built ef52a9160c4f
Running a container
$ docker run --rm -ti -v /var/lib/mysql:/var/lib/mysql --name bun -p 8080:80 dwpn-dev
160104 12:38:12 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
160104 12:38:12 mysqld_safe Logging to '/var/log/mysql/error.log'.
160104 12:38:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160104 12:38:13 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
mysql root password: Piibiequee3O
wordpress password: thoo9OXairoh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  135k  100  135k    0     0   368k      0 --:--:-- --:--:-- --:--:--  367k
Archive:  nginx-helper.1.9.6.zip
nginx-helper.1.9.6 packaged
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/nginx-helper.php  
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/lib/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/lib/nginx-sidebar.php  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/lib/nginx-support.php  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/lib/nginx-general.php  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/admin.php  
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/rtp-social-icons-32-32.png  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/style.css  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx.js  
 extracting: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-icon-32x32.png  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/logo.png  
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/css/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/css/nginx-fontello.css  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/config.json  
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/nginx-fontello.ttf  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/nginx-fontello.eot  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/nginx-fontello.woff  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/nginx-fontello.svg  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/install.php  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/purger.php  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/wercker.yml  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/composer.json  
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/languages/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/languages/nginx-helper.po  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/languages/nginx-helper.mo  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/redis-purger.php  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/readme.txt  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/compatibility.php  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/wp-cli.php  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/composer.lock  
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/includes/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/includes/predis.php  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/includes/redis-delete.php  
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/res/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/res/constants.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/package.json  
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/src/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/src/purge-method-get-request-post-test.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/src/purge-method-unlink-files-post-test.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/src/purge-method-unlink-files-page-test.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/src/purge-method-get-request-page-test.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/nightwatch.json  
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/custom-commands/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/custom-commands/wplogout.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/custom-commands/nginxSettings.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/custom-commands/goToAddNewPost.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/custom-commands/goToAddNewPage.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/custom-commands/enableAllPurgeCheckbox.js  
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/tests/functional/custom-commands/wplogin.js  
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
mysqld: no process found
/usr/local/lib/python2.7/dist-packages/supervisor-3.2.0-py2.7.egg/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2016-01-04 12:38:23,274 CRIT Supervisor running as root (no user in config file)
2016-01-04 12:38:23,284 INFO RPC interface 'supervisor' initialized
2016-01-04 12:38:23,290 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-01-04 12:38:23,291 INFO supervisord started with pid 400
2016-01-04 12:38:24,294 INFO spawned: 'stdout' with pid 403
2016-01-04 12:38:24,297 INFO spawned: 'php5-fpm-log' with pid 404
2016-01-04 12:38:24,299 INFO spawned: 'nginx' with pid 405
2016-01-04 12:38:24,302 INFO spawned: 'mysqld' with pid 406
2016-01-04 12:38:24,302 INFO spawned: 'php5-fpm' with pid 407
2016-01-04 12:38:24,328 INFO exited: php5-fpm-log (exit status 1; not expected)
2016-01-04 12:38:25,425 INFO success: stdout entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:25,426 INFO spawned: 'php5-fpm-log' with pid 431
2016-01-04 12:38:25,426 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:25,426 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:25,426 INFO success: php5-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php5-fpm-log stderr | tail: cannot open '/var/log/php5-fpm.log' for reading: No such file or directory
mysqld stderr | 160104 12:38:24 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160104 12:38:24 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 406 ...
php5-fpm-log stdout | [04-Jan-2016 12:38:24] NOTICE: fpm is running, pid 407
[04-Jan-2016 12:38:24] NOTICE: ready to handle connections
[04-Jan-2016 12:38:24] NOTICE: systemd monitor interval set to 10000ms
2016-01-04 12:38:25,462 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:26,465 INFO success: php5-fpm-log entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:26,466 INFO spawned: 'mysqld' with pid 433
mysqld stderr | 160104 12:38:26 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:26 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 433 ...
2016-01-04 12:38:27,482 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:27,565 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:28,568 INFO spawned: 'mysqld' with pid 451
mysqld stderr | 160104 12:38:28 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:28 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 451 ...
2016-01-04 12:38:29,583 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:30,154 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:31,156 INFO spawned: 'mysqld' with pid 469
mysqld stderr | 160104 12:38:31 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:31 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 469 ...
2016-01-04 12:38:32,169 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:32,281 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:33,285 INFO spawned: 'mysqld' with pid 487
mysqld stderr | 160104 12:38:33 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:33 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 487 ...
2016-01-04 12:38:34,300 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:34,412 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:35,415 INFO spawned: 'mysqld' with pid 505
mysqld stderr | 160104 12:38:35 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160104 12:38:35 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 505 ...
2016-01-04 12:38:36,430 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:37,016 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:38,019 INFO spawned: 'mysqld' with pid 523
mysqld stderr | 160104 12:38:38 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:38 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 523 ...
2016-01-04 12:38:39,039 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:39,118 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:40,121 INFO spawned: 'mysqld' with pid 541
mysqld stderr | 160104 12:38:40 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:40 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 541 ...
2016-01-04 12:38:41,137 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:41,713 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:42,718 INFO spawned: 'mysqld' with pid 559
mysqld stderr | 160104 12:38:42 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:42 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 559 ...
2016-01-04 12:38:43,740 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:43,813 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:44,817 INFO spawned: 'mysqld' with pid 577
mysqld stderr | 160104 12:38:44 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:44 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 577 ...
2016-01-04 12:38:45,834 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:45,932 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:46,936 INFO spawned: 'mysqld' with pid 595
mysqld stderr | 160104 12:38:46 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:46 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 595 ...
2016-01-04 12:38:47,952 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:48,551 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:49,554 INFO spawned: 'mysqld' with pid 613
mysqld stderr | 160104 12:38:49 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:49 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 613 ...
2016-01-04 12:38:50,571 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:51,150 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:52,153 INFO spawned: 'mysqld' with pid 631
mysqld stderr | 160104 12:38:52 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:52 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 631 ...
2016-01-04 12:38:53,170 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:53,266 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:54,275 INFO spawned: 'mysqld' with pid 649
mysqld stderr | 160104 12:38:54 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:54 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 649 ...
2016-01-04 12:38:55,291 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:55,377 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:56,380 INFO spawned: 'mysqld' with pid 667
mysqld stderr | 160104 12:38:56 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:56 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 667 ...
2016-01-04 12:38:57,394 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:57,481 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:38:58,485 INFO spawned: 'mysqld' with pid 685
mysqld stderr | 160104 12:38:58 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:38:58 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 685 ...
2016-01-04 12:38:59,500 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:38:59,591 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:39:00,594 INFO spawned: 'mysqld' with pid 703
mysqld stderr | 160104 12:39:00 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160104 12:39:00 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 703 ...
2016-01-04 12:39:01,609 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:39:02,222 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:39:03,226 INFO spawned: 'mysqld' with pid 721
mysqld stderr | 160104 12:39:03 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:39:03 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 721 ...
2016-01-04 12:39:04,243 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:39:04,362 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:39:05,365 INFO spawned: 'mysqld' with pid 739
mysqld stderr | 160104 12:39:05 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:39:05 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 739 ...
2016-01-04 12:39:06,395 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:39:06,968 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:39:07,972 INFO spawned: 'mysqld' with pid 757
mysqld stderr | 160104 12:39:07 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:39:07 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 757 ...
2016-01-04 12:39:08,990 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-04 12:39:09,070 INFO exited: mysqld (exit status 1; not expected)
2016-01-04 12:39:10,074 INFO spawned: 'mysqld' with pid 775
mysqld stderr | 160104 12:39:10 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 160104 12:39:10 [Note] /usr/sbin/mysqld (mysqld 5.5.46-0ubuntu0.14.04.2) starting as process 775 ...
^C2016-01-04 12:39:10,328 WARN received SIGINT indicating exit request
2016-01-04 12:39:10,329 INFO waiting for php5-fpm-log, nginx, mysqld, php5-fpm, stdout to die
2016-01-04 12:39:10,338 INFO stopped: php5-fpm (exit status 0)
php5-fpm-log stdout | [04-Jan-2016 12:39:10] NOTICE: Terminating ...
[04-Jan-2016 12:39:10] NOTICE: exiting, bye-bye!
2016-01-04 12:39:11,683 INFO stopped: mysqld (exit status 1)
2016-01-04 12:39:11,685 INFO stopped: nginx (exit status 0)
2016-01-04 12:39:11,686 INFO stopped: php5-fpm-log (terminated by SIGTERM)
2016-01-04 12:39:11,687 INFO stopped: stdout (terminated by SIGTERM)

Ubuntu 16.04LTS support

It would be nice if the Dockerfile gets updated to the latest Ubuntu 16.04 LTS version.
Some packages also seems obsolete:
E: Package 'php5-fpm' has no installation candidate
E: Package 'php5-mysql' has no installation candidate
E: Package 'php-apc' has no installation candidate

I think they should be replaced by "php-fpm", "php-mysql", and "php-apcu".

edit files inside docker

hi, I'm new to this,
How do I edit the config file in the docker in terminal?
I ran into login loop due to domain name issue, so I would like to edit the config file.

also how do I access the php database to disable plugin?

I know a similar question has been asked, but I don't seem to be able to do this.

thank you

mcrypt

Hi,

is it possible to add PHP Mcrypt module onto the docker?
I'm looking for an idea on how to achieve that, not a correction.

cheers

Wordpress tar.gz file is already unzipped

On my Ubuntu machine, the line
RUN tar xvzf /wordpress.tar.gz -C /usr/share/nginx
fails with exit code 2.

On closer inspection, /wordpress.tar.gz is a directory. It seems like
ADD http://wordpress.org/latest.tar.gz /wordpress.tar.gz
has already unzipped it when it downloaded the file.

It would be good to put in check for this to skip the tar step if necessary. Just commenting out the tar command and changing the path for the ADD step fixes this on my machine.

To clarify, this works for me (but probably breaks for someone else!):

# Install Wordpress
ADD http://wordpress.org/latest.tar.gz /usr/share/nginx
RUN rm -rf /usr/share/nginx/www
RUN mv /usr/share/nginx/wordpress /usr/share/nginx/www
RUN chown -R www-data:www-data /usr/share/nginx/www

After committing changes, mysqld fails.

This might not be the intended use of this image, but it still seems like a bug...

Steps to reproduce:

  • Run the image
  • Complete wordpress setup
  • Stop container
  • Commit changes
  • Run new image

The new image's mysqld fails for me. It appears that mysqld doesn't have write access to /tmp and /var/run/mysqld/mysqld.sock

This only happens when committing the changes of an already setup container to a new image. Restarting a container works as expected.

How to check the version of LAMP that is installed in the Docker-wordpress-nginx

Hi guys, i'm absolutely new to Docker so I have one question.
I followed the tutorial and successfully installed Wordpress on myIP:8080.
The point is i don't know what's the name of Mysql Database that WP using. Is there any way to do that? BTW, when i was trying to use command mysql_secure_installation to log in to Mysql to create more databases i couldn't. How should i do?

Error pulling image

10017231f3f2: Download complete 
Pulling repository docker.io/eugeneware/docker-wordpress-nginx
646f4c9df70a: Error pulling image (latest) from docker.io/eugeneware/docker-wordpress-nginx, mkdir /mnt/sda1/var/lib/docker/graph/_tmp/58b11236ac499064370e20da5ce0f968e949929326b3d14f59f64dace49f2501: read-only file system d14f59f64dace49f2501: read-only file system 
Error pulling image (latest) from docker.io/eugeneware/docker-wordpress-nginx, mkdir /mnt/sda1/var/lib/docker/graph/_tmp/58b11236ac499064370e20da5ce0f968e949929326b3d14f59f64dace49f2501: read-only file system

The start.sh won't function when installing wordpress

Hi i used your repository to install wordpress, everything works fine, The only thing is that the start.sh that suppose to initialize the wordpress does not function, as in after installing the wordpress It will still show the first page ( The installation page), How can I fix this?

Step 8: Unmet dependencies

Ubuntu Server 14.04 LTS running in a DigitalOcean droplet.

Step 8 : RUN apt-get -y install mysql-server mysql-client nginx php5-fpm php5-mysql php-apc pwgen python-setuptools curl git unzip
 ---> Running in 3137ce8cbfdc
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mysql-client : Depends: mysql-client-5.5 but it is not going to be installed
 mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
2014/04/22 20:41:31 The command [/bin/sh -c apt-get -y install mysql-server mysql-client nginx php5-fpm php5-mysql php-apc pwgen python-setuptools curl git unzip] returned a non-zero code: 100

Problem with mysql

150304 10:53:07 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
150304 10:53:07 mysqld_safe Logging to '/var/log/mysql/error.log'.
150304 10:53:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
mysql root password: Iexo1aM9zohm
wordpress password: eisaevoeFee9
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 58685  100 58685    0     0  21089      0  0:00:02  0:00:02 --:--:-- 21086
Archive:  nginx-helper.1.8.4.zip
nginx-helper.1.8.4 packaged
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/readme.txt
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/install.php
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/config.json
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/nginx-fontello.eot
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/nginx-fontello.svg
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/nginx-fontello.ttf
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/font/nginx-fontello.woff
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/css/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-helper-icons/css/nginx-fontello.css
 extracting: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx-icon-32x32.png
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/style.css
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/logo.png
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/nginx.js
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/assets/rtp-social-icons-32-32.png
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/admin.php
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/lib/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/lib/nginx-support.php
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/lib/nginx-general.php
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/admin/lib/nginx-sidebar.php
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/nginx-helper.php
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/purger.php
   creating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/languages/
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/languages/nginx-helper.po
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/languages/nginx-helper.mo
  inflating: /usr/share/nginx/www/wp-content/plugins/nginx-helper/compatibility.php
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
/usr/local/lib/python2.7/dist-packages/supervisor-3.1.3-py2.7.egg/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2015-03-04 10:53:23,017 CRIT Supervisor running as root (no user in config file)
2015-03-04 10:53:23,041 INFO RPC interface 'supervisor' initialized
2015-03-04 10:53:23,041 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2015-03-04 10:53:23,042 INFO supervisord started with pid 391
2015-03-04 10:53:24,046 INFO spawned: 'stdout' with pid 394
2015-03-04 10:53:24,053 INFO spawned: 'php5-fpm-log' with pid 395
2015-03-04 10:53:24,062 INFO spawned: 'nginx' with pid 396
2015-03-04 10:53:24,074 INFO spawned: 'mysqld' with pid 397
2015-03-04 10:53:24,084 INFO spawned: 'php5-fpm' with pid 398
2015-03-04 10:53:24,109 INFO exited: php5-fpm-log (exit status 1; not expected)
2015-03-04 10:53:24,226 INFO exited: php5-fpm (exit status 254; not expected)
2015-03-04 10:53:25,227 INFO success: stdout entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-03-04 10:53:25,232 INFO spawned: 'php5-fpm-log' with pid 415
2015-03-04 10:53:25,234 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-03-04 10:53:25,234 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-03-04 10:53:25,239 INFO spawned: 'php5-fpm' with pid 416
php5-fpm-log stderr | tail: cannot open '/var/log/php5-fpm.log' for reading: No such file or directory
mysqld stderr | 150304 10:53:24 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
php5-fpm stderr | Wed Mar  4 10:53:24 2015 (398): Fatal Error Unable to allocate shared memory segment of 67108864 bytes: mmap: Cannot allocate memory (12)
php5-fpm-log stderr | tail: cannot open '/var/log/php5-fpm.log' for reading php5-fpm-log stderr | : No such file or directory
2015-03-04 10:53:25,274 INFO exited: php5-fpm-log (exit status 1; not expected)
php5-fpm stderr | Wed Mar  4 10:53:25 2015 (416): Fatal Error Unable to allocate shared memory segment of 67108864 bytes: mmap: Cannot allocate memory (12)
2015-03-04 10:53:25,344 INFO exited: php5-fpm (exit status 254; not expected)
2015-03-04 10:53:27,352 INFO spawned: 'php5-fpm-log' with pid 418
2015-03-04 10:53:27,358 INFO spawned: 'php5-fpm' with pid 419
php5-fpm-log stderr | tail: cannot open '/var/log/php5-fpm.log' for reading: No such file or directory
2015-03-04 10:53:27,389 INFO exited: php5-fpm-log (exit status 1; not expected)
php5-fpm stderr | Wed Mar  4 10:53:27 2015 (419): Fatal Error Unable to allocate shared memory segment of 67108864 bytes: mmap: Cannot allocate memory (12)
2015-03-04 10:53:27,467 INFO exited: php5-fpm (exit status 254; not expected)
2015-03-04 10:53:30,476 INFO spawned: 'php5-fpm-log' with pid 421
2015-03-04 10:53:30,485 INFO spawned: 'php5-fpm' with pid 422
php5-fpm-log stderr | tail: cannot open '/var/log/php5-fpm.log' for reading: No such file or directory
2015-03-04 10:53:30,513 INFO exited: php5-fpm-log (exit status 1; not expected)
2015-03-04 10:53:30,595 INFO gave up: php5-fpm-log entered FATAL state, too many start retries too quickly
php5-fpm stderr | Wed Mar  4 10:53:30 2015 (422): Fatal Error Unable to allocate shared memory segment of 67108864 bytes: mmap: Cannot allocate memory (12)
2015-03-04 10:53:30,602 INFO exited: php5-fpm (exit status 254; not expected)
2015-03-04 10:53:31,603 INFO gave up: php5-fpm entered FATAL state, too many start retries too quickly
150304 10:54:31 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Mysqld entered FATAL state, too many start retries too quickly

I was able to run a Docker container with Wordpress with the default settings.

Then I aded shared volumes on the host machine:

-v ~/workspace/mysql:/var/lib/mysql

-v ~/workspace/www:/usr/share/nginx/www

Those statements cause supervisord to exit running mysql process without many info:

2017-03-08 06:49:59,081 INFO exited: mysqld (exit status 1; not
expected)
2017-03-08 06:50:00,082 INFO gave up: mysqld entered FATAL
state, too many start retries too quickly

The mysql log files are empty using these commands:

$ docker exec CONTAINER_ID cat /var/log/mysql.log
$ docker exec CONTAINER_ID cat /var/log/mysql.err

Console:

$ sudo docker run -p 8082:80 -v ~/workspace/mysql:/var/lib/mysql -v ~/workspace/www:/usr/share/nginx/www --name docker-wordpress-nginx eugeneware/docker-wordpress-nginx
/usr/local/lib/python2.7/dist-packages/supervisor-3.1.3-py2.7.egg/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2017-03-08 06:49:51,793 CRIT Supervisor running as root (no user in config file)
2017-03-08 06:49:51,801 INFO RPC interface 'supervisor' initialized
2017-03-08 06:49:51,801 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2017-03-08 06:49:51,801 INFO supervisord started with pid 5
2017-03-08 06:49:52,803 INFO spawned: 'stdout' with pid 8
2017-03-08 06:49:52,805 INFO spawned: 'php5-fpm-log' with pid 9
2017-03-08 06:49:52,806 INFO spawned: 'nginx' with pid 10
2017-03-08 06:49:52,808 INFO spawned: 'mysqld' with pid 11
2017-03-08 06:49:52,814 INFO spawned: 'php5-fpm' with pid 12
2017-03-08 06:49:52,822 INFO exited: php5-fpm-log (exit status 1; not expected)
2017-03-08 06:49:52,933 INFO exited: mysqld (exit status 1; not expected)
2017-03-08 06:49:53,934 INFO success: stdout entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-03-08 06:49:53,935 INFO spawned: 'php5-fpm-log' with pid 31
2017-03-08 06:49:53,936 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-03-08 06:49:53,937 INFO spawned: 'mysqld' with pid 32
2017-03-08 06:49:53,938 INFO success: php5-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php5-fpm-log stderr | tail: cannot open '/var/log/php5-fpm.log' for reading: No such file or directory
mysqld stderr | 170308  6:49:52 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 170308  6:49:52 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 11 ...
php5-fpm-log stdout | [08-Mar-2017 06:49:52] NOTICE: fpm is running, pid 12
[08-Mar-2017 06:49:52] NOTICE: ready to handle connections
[08-Mar-2017 06:49:52] NOTICE: systemd monitor interval set to 10000ms
mysqld stderr | 170308  6:49:53 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 170308  6:49:53 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 32 ...
2017-03-08 06:49:53,985 INFO exited: mysqld (exit status 1; not expected)
2017-03-08 06:49:54,987 INFO success: php5-fpm-log entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-03-08 06:49:55,989 INFO spawned: 'mysqld' with pid 44
mysqld stderr | 170308  6:49:55 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
170308  6:49:55 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 44 ...
2017-03-08 06:49:56,033 INFO exited: mysqld (exit status 1; not expected)
2017-03-08 06:49:59,038 INFO spawned: 'mysqld' with pid 56
mysqld stderr | 170308  6:49:59 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
170308  6:49:59 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 56 ...
2017-03-08 06:49:59,081 INFO exited: mysqld (exit status 1; not expected)
2017-03-08 06:50:00,082 INFO gave up: mysqld entered FATAL state, too many start retries too quickly

Using the latest version of the Dockerfile (GitHub link) commit 3517aec2533d526f0a7b600e79390516f37c6123.

MySQL User not created for existing WP install

If I have a volume mounted with an existing WP project (that contains a wp-config.php file). The start.sh file does not generate or output a MySQL user or password.

Additionally, if the start.sh script is run before MySQL service has fully initiated, the user and password cannot be created. Consider using the "link" function built into docker in order to handle db connections in conjunction with the existing mysql docker image.

Unable to see mysql root password

After I start the container with sudo docker run -d -p 8080:80 -p 3306:3306 eugeneware/wordpress, I do sudo docker logs and it shows the following:

150423 19:41:15 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
150423 19:41:15 mysqld_safe Logging to '/var/log/mysql/error.log'.
150423 19:41:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

it will be nice if you can assign mysql_password to the container.

phpmyadmin

hi,

If you can, Could you add a phpmyadmin instance in the docker files ?
Thx by advance

Pulled from legacy registry

After the process of download, docker gave a warning:

Status: Downloaded newer image for eugeneware/docker-wordpress-nginx:latest
docker.io/eugeneware/docker-wordpress-nginx: this image was pulled from a legacy registry.  Important: This registry version will not be supported in future versions of docker.

The command [/bin/sh -c ln -s /bin/true /sbin/initctl] returned a non-zero code: 1

Thank you for this project. Appreciate your help. I am on a mac using http://fnichol.github.io/dvm/

This line https://github.com/eugeneware/docker-wordpress-nginx/blob/master/Dockerfile#L9 returned a non-zero code: 1

โžœ  docker-wordpress-nginx git:(master) docker build -t="docker-wordpress-nginx" .
Uploading context 117.2 kB
Uploading context 
Step 0 : FROM ubuntu
 ---> 9cd978db300e
Step 1 : MAINTAINER Eugene Ware <[email protected]>
 ---> Running in 3243a614d326
 ---> 6be51a3abeb7
Step 2 : RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
 ---> Running in 376dd78c5932
 ---> 28eb4f6cf4b7
Step 3 : RUN apt-get update
 ---> Running in 3cd9f52f3ec0
Ign http://archive.ubuntu.com precise InRelease
Hit http://archive.ubuntu.com precise Release.gpg
Hit http://archive.ubuntu.com precise Release
Hit http://archive.ubuntu.com precise/main amd64 Packages
Hit http://archive.ubuntu.com precise/universe amd64 Packages
Hit http://archive.ubuntu.com precise/main i386 Packages
Hit http://archive.ubuntu.com precise/universe i386 Packages

 ---> a580f59e4621
Step 4 : RUN apt-get -y upgrade
 ---> Running in 16e66b5569a7


0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 ---> 36af37dfaef0
Step 5 : RUN dpkg-divert --local --rename --add /sbin/initctl
 ---> Running in 8172da0c86fb
Leaving 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
 ---> f22c55bcb991
Step 6 : RUN ln -s /bin/true /sbin/initctl
 ---> Running in e62338b86191

2014/02/14 07:40:34 build: The command [/bin/sh -c ln -s /bin/true /sbin/initctl] returned a non-zero code: 1

Wordpress installation reacheable with the docker machine ip instead of the container ip

I'm experiencing a problem with the container after I started it.
I'm able to get to the docker machine ip and reach the Wordpress Installation menu but I'm not able to get the container ip. When I reach the container ip page I get the Apache(?) page "It works!"
I'm running just this container inside a --virtualbox docker machine.
No additional setup has been made on the virtualbox side.

What I'm not getting?

ssh container

Hi, is it possible create a ssh connection with the docker container? I need edit wp-config file.

How do I access the in the docker

Sorry I am new to this and I am just wondering if there is a way to map the WordPress folder to the one that is on the docker?

Also are people using this in production? So far it was super easy to set up, thank you.

Running this two times (to create two individual WordPress Dockers on a host machine) will lead to a conflicting database (due to the static volume and DB name)?

I noticed that you are mounting the mysql volume and always creating a DB named "wordpress" when this DockerFile is runned. What if I decide to run multiple WordPress installations with separate Dockers on a same host?

They will confluct due to the same DB name in my opinion - "wordpress".

The easiest solution would be to randomize the DB name based on a timestamp or some other mechanism to avoid conflicting names.

install as simple bash script

Would it be possible to have this installation not only as a docker file but additionally as a simple bash script for debian?

That would be great!

Easier install

Instead of

$ git clone https://github.com/eugeneware/docker-wordpress-nginx.git
$ cd docker-wordpress-nginx
$ sudo docker build -t="docker-wordpress-nginx" .

Use

docker pull eugeneware/docker-wordpress-nginx.

Also the

$ sudo docker run -p 80:80 --name docker-wordpress-nginx -d docker-wordpress-nginx

should be changed to:

sudo docker run -p 81:80 -d eugeneware/docker-wordpress-nginx

Nginx supervisord problem

I created nginx container by using your instructions. The container is working fine there is no issue If I am in interactive mode but when I try to start nginx service with supervisord, It is failing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.