PROPS GO TO RAZORGIRL WHO THIS WAS FORKED FROM https://github.com/razorgirl/nzedb-docker
This has been customised for personal use and may not be relevant for anyone else
A Dockerfile to create a full nZEDb install in one go. It's intended to make setting up and testing nZEDb quick and painless.
- Ubuntu Server 14.04 LTS
- MariaDB 10.0
- PHP 5.6
All extras get installed, including
ffmpeg (the real one, not avconv),
You need to have Docker installed. If you don't or are not familiar with Docker, please take a look at their web site. They do a really good job of getting you up and running.
docker build --tag nzedb/master .
docker run -d -p 8800:8800 --name nZEDb nzedb/master
In a new terminal run
docker ps. The output will be similar to this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f2653e243825 nzedb/master:latest /bin/sh -c '/usr/sbi 6 hours ago Up 6 hours 0.0.0.0:8800->8800/tcp romantic_goldstine nZEDb
Note the ports.
0.0.0.0:8800->8800/tcp means that port 8800 from inside the container forwards to the same on your host. Thus, you can connect to the nZEDb interface via port 8800. Assuming you're running Docker on the same machine you're working on, open your browser with the URL
For more options on running and managing Docker containers, please consult the Docker User Guide.
There is a pre-generated SSH public key, update the id_rsa.pub with your own key
docker inspect $(docker ps -aq nZEDb) | grep IPAddress to get the container's IP address. The output:
Then log in:
ssh -i id_rsa email@example.com
Have nZEDb folder outside of container, for.. you know.. development
docker run -d -p 8800:8800 --name nZEDb -v <LOCAL_NZEDB_FOLDER>:/var/www/nZEDb nzedb/master
This will map the local folder to respective folder inside of the image. Feel free to experiment!
Most importantly, MariaDB contains just a
root user -- no password.
Inside the Dockerfile, you should probably change your timezone. To do that, find
ENV TZ Europe/London
and replace. Also find
RUN sed -ri 's/;(date.timezone =)/\1 Europe\/London/' /etc/php5/cli/php.ini
as well as
RUN sed -ri 's/;(date.timezone =)/\1 Europe\/London/' /etc/php5/fpm/php.ini
and change the regex accordingly. You need to escape the forward slash with
As Docker is 64-bit only, you need to have current hardware.