diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..331d387 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2b20547 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM ubuntu:20.04 AS builder + +RUN apt update && apt install -y --no-install-recommends \ + ca-certificates \ + libgsl-dev \ + libhts-dev \ + libbigwig-dev \ + libcurl4-openssl-dev \ + gcc \ + python \ + make + +WORKDIR /WiggleTools + +COPY . . + +RUN make LIBS='-lwiggletools -lBigWig -lcurl -lhts -lgsl -lgslcblas -lz -lpthread -lm -llzma' \ + && make test + +FROM ubuntu:20.04 + +RUN apt update && apt install -y --no-install-recommends \ + ca-certificates \ + libbigwig0 \ + libcurl4 \ + libgsl23 \ + libhts3 + +COPY --from=builder /WiggleTools/bin/wiggletools /usr/local/bin diff --git a/README.md b/README.md index 430f382..44c0ea5 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,19 @@ Brew Installation brew install brewsci/bio/wiggletools ``` +Docker Installation +----------------- + +Build a WiggleTools Docker image: +``` +docker build -t wiggletools . +``` + +Run the resulting wiggletools executable, bind-mounting the current working directory into the container: +``` +docker run -v $PWD:/mnt -w /mnt --rm wiggletools wiggletools [...arguments...] +``` + Pre-requisites --------------