Munkireport-PHP on Docker

In my previous post I delved into getting a munki repo with ssl client-server cert protecting up and running on a docker host. You can read that here.

So the next step I wanted to get up and running next to it was the great tool Munkireport-PHP.  More than likely if you are looking into docker as an option for a munki repo server you have some experience with munkireport-php as a reporting tool for your fleet. I am not endorsing this as the only way or even a preferred way- I just wanted to see what it looked like to get it up and running on a docker host- and it was super easy (in comparison to getting a munki repo configured and up and running).

Sweet, lets get started. You could serve up just a munkireport-php on docker, I however tested both the previous posts setup and munkireport-php containers running on the same docker instance.

Pull the Munkireport-php Container

First thing we need to do is pull the munkireport-php docker container, which you can read abut on the git here. Here is the macadmins dockerhub as well.

docker pull macadmins/munkireport-php

Then the magic happens.

Screen Shot 2016-01-31 at 2.45.35 PM

Wait, magic? I want to know whats actually happening.  So lets take a look at the macadmins/munkireport-php docker file.

 FROM tutum/apache-php:latest
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && \
 apt-get install -y php5-sqlite git


RUN rm -fr /app && git clone /app
RUN mkdir -p /data/munkireport/db && chmod -R 777 /data/munkireport
RUN cp /app/config_default.php /app/config.php && \
 echo "\$auth_config['admin'] = '\$P\$BDnkPOMPV0BMGL7YROrT9ITzwk3ZWz/';" >> /app/config.php


This is really rad when we brake it down- dockerfiles do all the work for you! This pulls from tutum/apache-php the latest version with a debian_frontend, then runs apt-get install php5, sqlite and git. Then making a /data/munkireport for the data to be stored and some congifs/password hashes.  Ending withe exposing port 80 to traffic.


Then it git clones the actual munkireport/munkireport-php which means you’re getting the latest build of munkireport-php.

Then making a /data/munkireport for the data to be stored and some configs/password hashe.  Ending with exposing port 80 to traffic.

Pepijn Bruienne is responsible for this great autobuild repo. I want to explore more configuration of this site, perhaps even tying into LDAP or some authentication method so more than a local user can have access, and the least amount of manual lifting on user maintenance. But I digress.

Running the Container


docker pull macadmins/munkireport-php

*poof* We now have a live munkireport container.
Screen_Shot_2016-01-31_at_3_23_46_PMUnfortunately I didn’t specify a name for the container, so it is now gloomy_visvesvaraya. If you’re not familiar with the naming convention of docker you can read more about it here.


Have website

Lets hit the the ip of the host on port 80. Or the fqdn if you have that setup, or setup via the host file on your testing machine.

Sweet, login looks good. A quick reference to the munkireport-php page shows us the version number is slightly older than the current release, which is 2.7.3 at this time.  I still need to do a little research as to why this isn’t the current version, but rather 2.5.3. But if you’re fine with this version then lets take a look at the dashboard.

Munki Report Dash

Alls well that ends well. I’ve tested enrolling a few machines agains this docker setup, both the munki-repo and the munkireport-php.

Existing Projects Referenced


Here is where I am headed next for this batch of projects, as time allows.

  • More “depth” of this server
    • Logging (report to logging server)
    • SSL configs
    • Automated startup/duplication/multiple locations
    • Use network mounts for repos
  • Munki-report PHP (worked, seems simple enough)
  • Munki-admin
  • Imaging
    • BSDpy
    • Imagr

One thought on “Munkireport-PHP on Docker

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s