Installing q2-galaxy on AWS

I am attempting to set up q2-galaxy which runs through a Docker image. I am having trouble setting up Docker on AWS.

First, I followed these instructions to install Docker.

I downloaded the q2-galaxy image:

docker pull quay.io/qiime2/q2galaxy

Then I followed the Docker Galaxy instructions for creating a volume container and mounting it to the image.

docker create -v /export \
    --name galaxy-store \
    quay.io/qiime2/q2galaxy \
    /bin/true

docker run -d -p 8080:80 \
    --volumes-from galaxy-store \
    quay.io/qiime2/q2galaxy

docker run -d -p 8080:80 -p 8021:21 -p 8022:22 -v /home/ec2-user/q2galaxy_data/:/export/ quay.io/qiime2/q2galaxy

The error I receive after running the previous:

docker: Error response from daemon: driver failed programming external connectivity on endpoint sad_keldysh (559b6048a9999248ee06ea7823a0c158c903bc209f5499e40f2b8d50455f8c86): Bind for 0.0.0.0:8080 failed: port is already allocated.

When setting up the EC2 instance, do I need to add another port?

EDITED:
Using some tutorials online, I set up new inbound ports (?) to include port 80 for HTTP (oh gosh I'm sorry if I'm not using words properly).


And then ran the following:

docker run -d -p 80:80 \
    -v /home/ec2-user/q2galaxy_data/:/export/ \
    quay.io/qiime2/q2galaxy

It appears to have worked, but when I navigate to the public DNS, I am unable to load Galaxy, and my browser just shows this:

Hi @April_Oliver!

Good work getting the ports set up (and even for using the correct words)!

I suspect there may be an issue with either the docker daemon not listening on the correct interface, or more likely, I have Galaxy bound to localhost inside the container, which means that you would need a reverse-proxy like NGINX to route the traffic to a local port within the ec2 instance.

While not an impossible task, that is a bit involved (and can be pretty intimidating if you haven't worked in backend web development).

I think I need to take a look at the image and possibly update it (I hadn't originally imagined using the docker container for an internet-facing deployment). There are Galaxy tutorials for getting a server running, but these also use techniques that are a bit involved.

We're about to have a release, so that will be a good time for me to comb through and get this sorted out. Thank you for the report! I'll follow up with what I learn next week.

1 Like

Thanks for your reply, Evan! I don't have an web dev experience (though I would like to!), so I'll just install Docker natively for now.

This whole project was to help my supervisor use Galaxy on an EC2 instance with more computing power than our individual computers. He's not completely comfortable with using Qiime 2 using cli, but he really liked using Galaxy during the FAES seminar.

Thanks so much for developing this tool. It is really making Qiime 2 more accessible for new users.

1 Like