comparison GalFilter/Dockerfile @ 3:cfd7c4aa5c26 draft default tip

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