First, create a local directory to share with the Docker container where BDIP Tools will store configuration files:
mkdir /home/<username>/.bdip_tools
Where <username> is your actual username.
The general command is:
PATH_TO_DOCKERFILES_PROJECT="/path/to/dockerfiles"
docker run --rm -it --group-add $(getent group docker | cut -d: -f3) --user $(id -u):$(id -g) -v /var/run/docker.sock:/var/run/docker.sock -v "/home/<username>/.bdip_tools:/home/bdip-user/.config/bdip-tools" -v "${PATH_TO_DOCKERFILES_PROJECT}:${PATH_TO_DOCKERFILES_PROJECT}" -w "${PATH_TO_DOCKERFILES_PROJECT}" pegi3s/bdip-tools
Where you must:
PATH_TO_DOCKERFILES_PROJECT to the local path in your computer where you have the pegi3S Dockerfiles project./home/<username>/.bdip_tools to the local path in which store BDIP Tools settings (created in the previous step).For convenience, you can set an alias:
alias bdip-docker='docker run --rm -it --group-add $(getent group docker | cut -d: -f3) --user $(id -u):$(id -g) -v /var/run/docker.sock:/var/run/docker.sock -v "/home/<username>/.bdip_tools:/home/bdip-user/.config/bdip-tools" -v "/path/to/dockerfiles:/path/to/dockerfiles" -w "/path/to/dockerfiles" pegi3s/bdip-tools'
Obtaining command help is therefore straightforward with bdip-docker <command> -h, for instance:
bdip-docker settings -h
bdip-docker test-images -h
Note: some commands may have parameters that refer to input or output paths (e.g.
--credentials <path>or--output <path>). In this case, you must take into account that you must add the corresponding mounts to thedocker runcommand or work within the project directory.
This step is important because it allows configuring the GitHub API Key (for operations using the GitHub API) and the path to the pegi3S BDIP project, so that there is no need to specify it in every command invocation.
Run the following command to stablish the general settings:
bdip-docker settings
If you want to skip a specific setting and leave it with the default value or not configured, just press Enter and continue.
bdip-docker add-missing-copyrights --dry-run
bdip-docker check-broken-links
bdip hadolint --image seqkit # check all seqkit Dockerfiles
bdip hadolint --path seqkit/2.x/Dockerfile 3 checks a specific Dockerfile
First, create a temporary folder and update the alias to use this folder as working directory inside the Docker container:
mkdir /tmp/test-bdip-tools && cd /tmp/test-bdip-tools
alias bdip-docker='docker run --rm -it --group-add $(getent group docker | cut -d: -f3) --user $(id -u):$(id -g) -v /var/run/docker.sock:/var/run/docker.sock -v "/home/<username>/.bdip_tools:/home/bdip-user/.config/bdip-tools" -v "/path/to/dockerfiles:/path/to/dockerfiles" -v "/tmp/test-bdip-tools:/tmp/test-bdip-tools" -w "/tmp/test-bdip-tools" pegi3s/bdip-tools'
And now test these commands (add --host <host> --username <username> if not configured using bdip settings):
bdip-docker download-test-data --list
cat test_data_list.txt | head -2 > filter.txt
bdip-docker download-test-data --dry-run --filter filter.txt
bdip-docker download-test-data --filter filter.txt
bdip-docker download-test-data --filter filter.txt
bdip-docker download-test-data --filter filter.txt --force
Content type
Image
Digest
sha256:286678409…
Size
138.4 MB
Last updated
about 2 months ago
docker pull pegi3s/bdip-tools