-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
76 lines (65 loc) · 2.9 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
# SeqWare
#
# VERSION 1.1.0-alpha.6
#
# Setup prerequities to run seqware-bag in order to setup a full SeqWare stack
FROM ubuntu:14.04
MAINTAINER Denis Yuen <denis.yuen@oicr.on.ca>
# use ansible to create our dockerfile, see http://www.ansible.com/2014/02/12/installing-and-building-docker-with-ansible
RUN apt-get -y update ;\
apt-get install -y curl python-yaml python-jinja2 git wget sudo;\
git clone http://github.com/ansible/ansible.git /tmp/ansible
WORKDIR /tmp/ansible
# get a specific version of ansible , add sudo to seqware, create a working directory
RUN git checkout v1.6.10 ;
RUN git submodule update --init --recursive
ENV PATH /tmp/ansible/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV ANSIBLE_LIBRARY /tmp/ansible/library
ENV PYTHONPATH /tmp/ansible/lib:$PYTHON_PATH
# setup seqware
WORKDIR /root
RUN git clone https://github.com/SeqWare/seqware-bag.git
COPY inventory /etc/ansible/hosts
WORKDIR /root/seqware-bag
RUN git checkout feature/side-effect
ENV HOSTNAME master
# why is this required with Java 8 and local ansible connections??
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# hurray! this seems to satisfy gridengine-master's hostname lookup
RUN echo "127.0.0.1 master" > /tmp/tmpfile && cat /etc/hosts >> /tmp/tmpfile
RUN cat /tmp/tmpfile > /etc/hosts && ansible-playbook seqware-install.yml -c local --extra-vars "seqware_version=1.2.0-alpha.0 docker=yes test_environment=yes seqware_provider=git"
# at this point, seqware has been fully setup
ENV HOME /home/seqware
USER seqware
WORKDIR /home/seqware
RUN git clone https://github.com/SeqWare/seqware-bag.git
# setup an ansible script to startup our required services when the container starts
RUN cd seqware-bag && git checkout feature/side-effect
COPY ./scripts/start.sh /start.sh
RUN sudo chmod a+x /start.sh
COPY ./scripts/test-start.sh /test-start.sh
RUN sudo chmod a+x /test-start.sh
# setup docker in docker functionality assuming socket binding, inspired by https://github.com/jpetazzo/dind and https://github.com/docker/docker/issues/7285
# example command: docker run --privileged -h master --rm -t -i -v /var/run/docker.sock:/var/run/docker.sock seqware/seqware_whitestar
#USER root
#RUN apt-get update -qq && apt-get install -qqy \
# apt-transport-https \
# ca-certificates \
# curl \
# lxc \
# iptables
# Install Docker from Docker Inc. repositories.
#RUN curl -sSL https://get.docker.com/ | sh
# Add non-root access to docker
#RUN sudo gpasswd -a seqware docker
USER root
RUN apt-get -y remove maven
# install Maven 3.3.9, should use ansible
ENV MAVEN_VERSION 3.3.9
RUN mkdir -p /usr/share/maven \
&& curl -fsSL http://apache.osuosl.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz \
| tar -xzC /usr/share/maven --strip-components=1 \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
ENV MAVEN_HOME /usr/share/maven
USER seqware
CMD ["/bin/bash", "/start.sh"]