Trying out Tripal BLAST with Docker¶
Tripal BLAST comes with a docker file/image to provide a quick and easy way to checkout the module, as well as, to provide an easy way to contribute fixes/functionality.
Requirements
If you don't yet have docker installed on your system there are instructions for installation here in the Official Docker Documentation. If you are using MacOS or Windows, I highly recommend Docker Desktop (as a daily Mac user). The links to Docker desktop are in the official install documentation linked previously.
Tripal BLAST Demo¶
We have already built the docker image for the Tripal BLAST demo and provided it on GitHub. You can run it locally as follows:
- Pull the demo image from Github
- Use the run command to create a local container which will house the entire Tripal site and Tripal BLAST demonstration.
- Go to http://localhost in your browser of choice and login in using the Administrative username and password for the Tripal Docker.
You now have a fully functional Tripal site with Tripal BLAST and NCBI Blast+ command-line utilities installed.
Using Docker to Contribute¶
We would Love to collaborate with you! To use docker to spin up a development environment for Tripal BLAST we recommend building the demonstration image locally and then running a container that mounts your current git clone of our repository inside the container. This allows you to make code changes to the local git clone and see them immediately reflected within the image for testing purposes!
- Using Github, make a fork of our repository by going to the following URL while logged into github: https://github.com/tripal/tripal_blast/fork or by clicking on "Fork" on our repository.
- Clone your fork locally. We will use the main repository URL below but you should substitute the URL of your fork here.
- Create a branch for your contributions. When you eventually make a PR, you can commit to this branch to update the PR based on suggestions. This is why we recommend you not use the main branch of your repository. You can name the branch whatever you want (we used
my-feature-or-fix
in the below example). - Build the docker demonstration image.
- Create a container from the previous image in your current directory. The
--volume
part of this command will mount your current directory to the appropriate place inside the container.
Now you can interact with the Tripal site in your browser in all the same ways you would a regular Tripal site by going to https://localhost and logging in using the Administrative username and password for the Tripal Docker.
You can also edit the files in your local git clone directly with the editor of your choice (e.g. VSCode or vim) and see the changes reflected immediately in the site.