-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Docker
In this example, we will be spinning up a brand new container with the latest ZoneMinder code. At the end of the example, you'll be able to access the ZoneMinder container via the forwarded ports.
-
Build the ZoneMinder image. This may take a while.
sudo docker build -t='kylejohnson/release-1.27' github.com/ZoneMinder/ZoneMinder
The -t flag allows you to 'tag' your image. In this example, I am building a container for myself, for use with the 1.27 release. -
Run (start) the ZoneMinder container.
CID=$(sudo docker run -P -d -t kylejohnson/release-1.27)
The -P flag forwards any ports that areEXPOSE
'd in the Dockerfile (80 and 22). The -d flag detaches the container and runs it in the background. The -t flag tells docker which container to run. -
Find out which ports your container is listening on.
kjohnson@lxc01:~/$ sudo docker port $CID 22
0.0.0.0:49155
kjohnson@lxc01:~/$ sudo docker port $CID 80
0.0.0.0:49156
You can now access ZoneMinder, via ssh or http, on the ports listed in those last two commands.