-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
87 lines (66 loc) · 2.73 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
################################################################################
###
### [CONTAINER CORE FUNCTIONS]:
### install "Tool - Generic Filter" Galaxy tool (and required third part softwares, libraries, ...).
### [NOTE]
### please refer to README.md and about_docker.md files for further informations
###
################################################################################
################################################################################
### fix parent containter
FROM ubuntu:16.04
################################################################################
### set author
MAINTAINER Nils Paulhe <[email protected]>
################################################################################
### sets the environment variables
ENV TOOL_VERSION = "release_2016.03.03"
ENV CONTAINER_VERSION = 0.1
LABEL version = "${CONTAINER_VERSION}"
LABEL tool_version = "${TOOL_VERSION}"
################################################################################
### install third part tools
# add debian repo for latest version of R
RUN echo "deb http://cran.univ-paris1.fr/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
# Update and upgrade system
RUN apt-get update && \
apt-get -y upgrade
# install R
RUN apt-get install -y \
r-base \
libcurl4-openssl-dev \
libxml2-dev
# NOTE: add `apt-get install -y git` if required
# init R env. (Docker)
RUN echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile
# install R libs
RUN Rscript -e "install.packages('batch', dep=TRUE)"
################################################################################
### install core scripts
# init. WORKDIR
RUN [ "mkdir", "/scripts" ]
#
# [NOTE] to add scripts, we have two options: get them from GitHub OR copy them from this directory
#
# get scripts using Git (option 1)
# RUN cd /scripts && \
# git clone -b release/${TOOL_VERSION} --recursive https://github.com/workflow4metabolomics/tool-generic_filter.git
# copy scripts files from this directory (option 2)
COPY "." "/scripts/"
## set WORKDIR
# WORKDIR "/scripts"
# set authorizations
RUN ["chmod", "a+x", "/scripts/filter_wrap.R"]
# make tool accessible through PATH
ENV PATH = $PATH:/scripts
################################################################################
### clean
RUN apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /var/tmp/*
# NOTE: run `apt-get remove -y git && \` if required
################################################################################
### Define Entry point script
## ENTRYPOINT ["/scripts/filter_wrap.R"]
### [END]