Java in QIIME2 Docker images?

Hi,

First of all, if this is not the right category to post this question, I apologize – feel free to move it to the appropriate category for discussion.

I am currently using QIIME2 version 2018.2. When I run java -version in the docker image, I get:

bash: java: command not found

I assume this means that the QIIME2 docker image does not come with java installed or enabled? Is there a way to install Java into the QIIME2 docker image I have right now or are there any intentions of having Java installed in future docker image releases? I would like to use BBMap tools while in the QIIME2 docker image then go right into using QIIME2 commands.

Thanks!

2 Likes

Hi there @ylor! Fortunately for you, this is just what Docker was designed to do!

You can take a look at the Dockerfile FROM directive, and define your own image, based on our official docker image:

# Dockerfile
FROM qiime2/core:2018.4

RUN conda install -c bioconda java-jdk

Note, this code is untested. Then, you can theoretically run something like this:

docker build -t ylor-q2-custom/2018.4 .

Then, once built, you can run using your new ylor-q2-custom/2018.4 image!

Let us know how it goes! :t_rex:

Forgot to respond to this, but I was able to build a docker image with java based on your suggestion! Thanks @thermokarst!

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.