annotate GalFilter/Dockerfile @ 3:cfd7c4aa5c26 draft default tip

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