Skip to content

Commit

Permalink
ADD: Dockerfile: docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
thiago-miller committed Dec 26, 2019
1 parent e8cb1df commit 7cb7097
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ubuntu:18.04

LABEL maintainer="tmiller@mochsl.org.br"

ENV SIDER_ROOT="/sider"

COPY . ${SIDER_ROOT}

RUN apt-get update \
&& apt-get install -y \
ninja-build \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
&& pip3 install meson \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN cd ${SIDER_ROOT} \
&& meson build \
&& ninja -C build \
&& ninja -C build install

ENTRYPOINT ["sider"]
69 changes: 69 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Dockerfile for sideRETRO

A pipeline for detecting Somatic Insertion of DE novo RETROcopies

## Getting Started

These instructions will cover installation and usage information for the docker container.

### Prerequisities

In order to run this container you'll need docker installed.

* [Windows](https://docs.docker.com/windows/started)
* [OS X](https://docs.docker.com/mac/started/)
* [Linux](https://docs.docker.com/linux/started/)

### Acquiring sideRETRO Image

#### Manual Installation

Clone **sideRETRO** repository:

`$ git clone https://github.com/galantelab/sideRETRO.git`

Inside `sideRETRO/` folder:

`$ docker build -t sider -f docker/Dockerfile .`

#### Pulling Image

Pull **sideRETRO** image from [dockerhub](https://hub.docker.com) registry:

`$ docker pull galantelab/sider`

It's possible to pull a specific image version by appending a colon with the required tag.
For example:

`$ docker pull galantelab/sider:dev`

For a complete list of **sideRETRO** versions, please access the dockerhub tag page: <https://hub.docker.com/r/galantelab/sider/tags/>

### Setting

Mac users may need to change the default settings in order to make use
of all CPUs and memory. For a complete tutorial, see: [Get started with Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/#preferences-menu)

### Usage

#### Container Examples

`$ docker run galantelab/sider`

By default **sideRETRO** runs in a container-private folder. You can change this using flags, like user (-u),
current directory, and volumes (-w and -v). E.g. this behaves like an executable standalone and gives you
the power to process files outside the container:

```
$ docker run \
--rm \
-u $(id -u):$(id -g) \
-v $(pwd):$(pwd) \
-w $(pwd) \
galantelab/sider ps -a exon.gff in.bam
```

How to get a shell started in your container:

`$ docker run -ti --entrypoint bash galantelab/sider`

0 comments on commit 7cb7097

Please sign in to comment.