Setup Pannellum generate panorama script in Docker in MacOS


Selasa, 31 Oktober 2023, 9:35 am0

Pannellum ( is the JS library I use to host panoramic images in this blog, tagged under . Before this I generate the multi resolution images on my Thinkpad ⁽¹⁾ or Mac Mini, and it’s been over 2 years since I setup those. I need to setup the generate script in my Macbook Air ⁽²⁾ since it’s my main for blogging.

  1. Install Docker for Mac ( Download the .dmg file, after done, mount it & drag the app into Application folder.
  2. Check docker command in Terminal, which docker, it should exist in /usr/local/bin/docker
  3. By referring documentation at
    • get Dockerfile &, and put them in one folder.
  4. Build docker container
    • using Terminal, go to the folder containing Dockerfile & files.
    • run docker build -t generate-panorama .
  5. Add generate_panorama as alias in ~/.zshrc
    alias generate_panorama='f() { docker run -it -v $PWD:/data generate-panorama --output /data/output /data/$1; cd output; zip -r ../$ *; cd ..; rm -fr output };f'
  6. To use this command:
    • cd folder
    • generate_panorama 01.jpg, this will generate file