Skip to content

Building an ARM docker image

Mike Solin edited this page Jul 13, 2023 · 2 revisions

We should probably build cross platform Docker images. But for now:

  • Get yourself an Apple Silicon Mac
  • Make sure you have Docker Desktop and git installed
  • Download the latest MunkiReport sources
  • Edit Dockerfile with your favourite text editor

Replace

RUN docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \

with

RUN docker-php-ext-configure ldap && \

Docker Run instructions

  • Open Terminal.app
  • cd path/to/munkireport-php
  • run docker build --tag munkireport:local .

This should build you an ARM image (as long as you don't specify the platform, you'll get the current platform)

You can test the image by starting up a container:

docker run -d --name="munkireport" \
  -e "SITENAME=I :heart: MunkiReport" \
  -e "MODULES=applications, ard, bluetooth, certificate, disk_report, displays_info, extensions, filevault_status, fonts, ibridge, installhistory, inventory, localadmin, managedinstalls, munkireport, network, power, printer, profile, security, usb, user_sessions, warranty" \
  -v /Users/Shared/munkireport-db:/var/munkireport/app/db \
  -p 8181:80 \
  munkireport:local

Docker Compose instructions

If you're following the Docker Compose instructions, use this in your docker-compose.yml file:

networks:
  munki:
    name: munki
    driver: bridge

services:

    munkireport:
        container_name: munkireport
        build: /Users/yourusername/Downloads/munkireport-php
        env_file: /Users/Shared/munkireport.env
        volumes:
            - /Users/Shared/munkireport/local:/var/munkireport/local:rw
            - /Users/Shared/munkireport/app/db:/var/munkireport/app/db:rw
        networks:
            - munki
        ports:
            - "8181:80"
        restart: always
Clone this wiki locally