Skip to content

Commit 67b2c9b

Browse files
committed
Docker image creation for bpwrapper
1 parent 01f4e0d commit 67b2c9b

File tree

4 files changed

+52
-2
lines changed

4 files changed

+52
-2
lines changed

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ after_failure:
1212

1313
install:
1414
# Prerequisites
15-
# libdb-dev (Berkeley DB headers) seems to be needed by BioPerl
1615
# By running cpanm this way without testing rather than using ./Build,
17-
# we save *a lot* of time
16+
# we save *a lot* of time.
1817
- "cpanm --notest --force $PREREQS"
1918

2019
script:

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu:bionic
2+
3+
LABEL name bpwrapper
4+
LABEL src "https://github.com/bioperl/p5-bpwrapper"
5+
LABEL creator rocky
6+
LABEL desc "command-line utilites for Bio::Perl"
7+
8+
RUN apt update \
9+
&& apt upgrade -y \
10+
&& apt install -y git perl cpanminus make gcc libexpat1-dev
11+
12+
RUN cpanm --notest Module::Build rlib XML::Parser XML::DOM::XPath Test::More Bio::Restriction::Analysis
13+
14+
RUN git clone --depth=10 https://github.com/bioperl/p5-bpwrapper.git p5-bpwrapper \
15+
&& cd p5-bpwrapper && perl ./Build.PL && ./Build && make install
16+
ENV PATH="/usr/local/bin:${PATH}"
17+
CMD /bin/bash

GNUmakefile

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ BASH ?= bash
66
all: Build
77
$(PERL) Build --makefile_env_macros 1
88

9+
#: make Build program
910
Build:
1011
$(PERL) Build.PL || $(PERL) Makefile.PL
1112

@@ -20,6 +21,10 @@ clean: Build
2021
lib/Bio/BPWrapper*.check \
2122
lib/Bio/BPWrapper/*.check || /bin/true
2223

24+
#: Create a docker image
25+
docker:
26+
docker build -t rockyb/bpwrapper .
27+
2328
code: Build
2429
$(PERL) Build --makefile_env_macros 1 code
2530

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,35 @@ The git code generally has the newest code. If git is not your thing, you can al
5858
5959
```
6060

61+
# Install and run from docker
62+
63+
Use the bpwrapper docker image. It includes `bioaln`, `biodb`, `biopop`, `bioseq`, and `biotree`.
64+
65+
To download the image so that docker recognizes it:
66+
67+
```console
68+
docker pull rockyb/bpwrapper
69+
```
70+
71+
For things other than getting help, you'll often need to pass a data in file to the program. Do that by sharing the
72+
directory that the file is in on the `docker` invocation.
73+
74+
You'll need to pay attention to the permissions on the data file its
75+
directory. The docker container runs as as a user that may not have
76+
access to data. I've found however that if you put the data in `/tmp`
77+
files will be seen inside the running docker container.
78+
79+
For example:
80+
81+
```console
82+
$ cp test-data/cds.fas /tmp/cds.fas
83+
$ docker run -it -v /tmp:/test-files rockyb/bpwrapper bioseq -l /test-files/cds.fas
84+
DK2 120
85+
W70332 120
86+
M1608 108
87+
F2
88+
```
89+
6190
# Developers, Contact, Citation
6291
* Yözen Hernández
6392
* Pedro Pagan

0 commit comments

Comments
 (0)