Skip to content

Dockerized

Barroqueiro edited this page Jan 10, 2023 · 5 revisions

SecureFASTA Docker

This repository contains a Docker container for the SecureFASTA tool.

Requirements

Building the Container

To build the Docker container, use the following command (Assuming you are in the root of the repository):

$ docker build . -t secure-fasta

Running the Container

To run the SecureFASTA script with the Docker container, use the following command:

$ docker run -v $(pwd):/data secure-fasta [arguments]

This will map the current directory to the /data directory inside the container allowing for shared files.

A script runDocker.sh is present within the repository that will build and run secure-fasta with the arguments passed to it

Replace [arguments] with the appropriate arguments for the main.py script. For example, to encrypt a FASTA file, use the following command:

$ ./runDocker.sh main.py --encrypt --input-file /data/data/input3.fasta --output-file /data/secure_fasta.txt --public-key-file /data/keys/public_key.pem --key-file /data/key.txt
$ ./runDocker.sh main.py --decrypt --input-file /data/secure_fasta.txt --output-file /data/data/output.fasta --private-key-file /data/keys/private_key.pem --key-file /data/key.txt

Remember to always map the current directory to the /data repository inside the container which is what the script sees. The volumes can be altered but for simplification, run the runDocker.sh script from the current directory which shall include the files to encrypt or decrypt and the keys needed, and map those the /data directory.

Testing

To run the unit tests for the main.py script, use the following command:

$ ./runDocker.sh unit_tests.py