Docker Community Forums

Share and learn in the Docker community.

How can I execute an imageJ macro using docker on WINDOWS 10

I need to execute a macro which is running on imageJ in docker.
The function of this macro is to convert images to split stack to images and convert to 8bit in terms of dynamic .
I used a docker image available in docker hub tp81/imagej-macro but I got errors once I mount volume to share data between host machine and docker.

here are the steps I followed to run the macro on docker:

  1. Pull docker image called tp81/imagej-macro which is a derivation from the Fiji image which lets you run a basic imageJ macro from the command line
    FROM fiji/fiji:latest
    RUN sudo apt-get update
    RUN sudo apt-get install -y xvfb
    RUN sudo cp jars/ij-.jar ij.jar
    RUN echo "xvfb-run java -jar ij.jar -batch $
    " >
    ENTRYPOINT [“sh”,“”]
    2)second base image
    FROM tp81/imagej-macro:latest
    COPY my_macro .
    ENTRYPOINT [“sh”,”go,sh”, “my_macro.ijm”]
  2. docker build -t macro_conversion
    docker run -it -v “$PWD/test:/fiji/macros” macro_conversion my_macro
    Notice that the batch is a windows batch! and docker desktop is activted on linux containers mode
    If you have suggestions for this topic please let me know !It’s an emergency
    Thank you