This Docker container runs MunkiWebAdmin.
The container expects a linked PostgreSQL database container and that your munki repo is mounted
Several options, such as the timezone and admin password are customizable using environment variables.
You must run the PostgreSQL container before running the munkiwebadmin container.
Currently there is support only for PostgreSQL.
I use the stackbrew postgres container from the Docker Hub, but you can use your own. The app container expects the following environment variables to connect to a database:
See this blog post for an example workflow using the postgres container.
The setup_db.sh script in the GitHub repo will create the database tables for you.
The official guide on linking containers is also very helpful.
$ docker pull postgres $ docker run --name="postgres-munkiwebadmin" -d postgres # Edit the setup.db script from the github repo to change the database name, user and password before running it. $ ./setup_db.sh
$ docker build -t="groob/munkiwebadmin" .
#Running the MunkiWebAdmin Container
$ docker run -d --name="munkiwebadmin" \ -p 80:80 \ --link postgres-munkiwebadmin:db \ -v /tmp/munki_repo:/munki_repo \ -e ADMIN_PASS=pass \ -e DB_NAME=munkiwebadmin \ -e DB_USER=admin \ -e DB_PASS=password \ groob/munkiwebadmin
This assumes your Munki repo is mounted at /tmp/munki_repo.
- add support for logging
- add support for sqlite and mysql
- add support for SSL
- add support for git
The app user is part of the munki group, so you can have autopkg or munkiwebadmin or yourself to the same group to allow reading and writing to the repo. I'm not sure this is the best way to handle permissions, but this is what works for me.
I keep data stored in a data container, and use the --volumes-from option to share data between different containers.
The above pattern allows me to have multiple containers share the data and gives some flexibility over mounting a volume from the host.
FYI: The docker hub doesn't notify me when someone posts a comment. I'd probably respond quicker on the github page for this project.
As with the Crypt-server docker, I had to add the following line to the Dockerfile in order to prevent a 500 Internal Server Error:
RUN chown -R app:app /home/app/munkiwebadmin
I'm also not sure how to give the correct permissions to the process in order to be able to write back to the munki_repo, which is mounted to /tmp/munki_repo - that's not a docker issue, but any ideas? :)