From 61c5658abf17d24cdc1aa46c2ea4fc755036d32f Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Mon, 27 Jan 2014 14:03:51 -0500 Subject: [PATCH] Added a readme for the Docker stuff --- Dockerfile | 5 ++++- utils/docker/README.md | 21 +++++++++++++++++++++ start.sh => utils/docker/start.sh | 4 ++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 utils/docker/README.md rename start.sh => utils/docker/start.sh (91%) diff --git a/Dockerfile b/Dockerfile index cf9c58b33..32cab3e75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,11 +33,14 @@ RUN make RUN make install # Adding the start script -ADD start.sh /tmp/start.sh +ADD utils/docker/start.sh /tmp/start.sh # Make start script executable RUN chmod 755 /tmp/start.sh +# Set the root passwd +RUN echo 'root:root' | chpasswd + # Expose ssh and http ports EXPOSE 80 EXPOSE 22 diff --git a/utils/docker/README.md b/utils/docker/README.md new file mode 100644 index 000000000..310651155 --- /dev/null +++ b/utils/docker/README.md @@ -0,0 +1,21 @@ +# Overview + +Docker allows you to quickly spin up containers. The ZoneMinder dockerfile will spin +up an Ubuntu 12.04 container with mysql, apache, php and then compile and install ZoneMinder (from master). + +Afterwards you can connect to this container over SSH to check out the latest code. + +This is still a bit of a work in progress. + +## How To Use + +1. Pull it +```sudo docker pull ubuntu:precise``` +2. Built it +```sudo docker build -t yourname/zoneminder github.com/ZoneMinder/ZoneMinder``` +3. Run it +```CID=$(sudo docker run -d -p 222:22 -p 8080:80 -name zoneminder yourname/zoneminder)``` +4. Use it -- you can now SSH to port 222 on your host as user root with password root. +You can also browse to your host on port 8080 to access the zoneminder web interface + +## Use Cases diff --git a/start.sh b/utils/docker/start.sh similarity index 91% rename from start.sh rename to utils/docker/start.sh index a86dfbf95..9f9000ce9 100644 --- a/start.sh +++ b/utils/docker/start.sh @@ -18,3 +18,7 @@ service apache2 restart # Start ZoneMinder /usr/local/bin/zmpkg.pl start + +# Start SSHD +mkdir /var/run/sshd +/usr/sbin/sshd -D