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:
- 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
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 $" >go.sh
2)second base image
COPY my_macro .
ENTRYPOINT [“sh”,”go,sh”, “my_macro.ijm”]
- 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