-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile.deb
125 lines (105 loc) · 5.99 KB
/
Dockerfile.deb
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
FROM debian:8
ARG TERM=linux
ARG DEBIAN_FRONTEND=noninteractive
ARG SCIDB_NAME=scidb
ENV SCIDB_VER=15.12 \
SCIDB_NAME=$SCIDB_NAME
ENV SCIDB_INSTALL_PATH=/opt/scidb/$SCIDB_VER
ENV PATH=$PATH:$SCIDB_INSTALL_PATH/bin
## Install dependencies
RUN apt-get update \
&& apt-get install --assume-yes --no-install-recommends \
apt-transport-https \
ca-certificates \
libscalapack-openmpi1 \
openssh-server \
pkg-config \
wget \
&& rm -rf /var/lib/apt/lists/*
## Build and install libpqxx3 from wheezy
RUN echo "deb-src http://http.debian.net/debian wheezy main" \
> /etc/apt/sources.list.d/wheezy.list \
&& apt-get update \
&& apt-get build-dep --assume-yes --no-install-recommends \
libpqxx3 \
&& mkdir /usr/local/src/libpqxx3 \
&& cd /usr/local/src/libpqxx3 \
&& apt-get source --build \
libpqxx3 \
&& apt-get purge --assume-yes \
autotools-dev \
bsdmainutils \
build-essential \
bzip2 \
chrpath \
debhelper \
dpkg-dev \
file \
gettext \
gettext-base \
groff-base \
intltool-debian \
libasprintf0c2 \
libcroco3 \
libdpkg-perl \
libgdbm3 \
libmagic1 \
libpipeline1 \
libtimedate-perl \
libtool \
libunistring0 \
man-db \
perl \
perl-modules \
po-debconf \
xz-utils \
&& dpkg --install \
libpqxx-3.1_3.1-1.1_amd64.deb \
libpqxx3-dev_3.1-1.1_amd64.deb \
&& rm -rf \
/etc/apt/sources.list.d/wheezy.list \
/usr/local/src/libpqxx3 \
/var/lib/apt/lists/*
## Add Paradigm4 and Bintray repositories and install SciDB packages
RUN wget --no-verbose --output-document - https://downloads.paradigm4.com/key \
| apt-key add - \
&& echo "deb https://downloads.paradigm4.com/ ubuntu14.04/3rdparty/" \
> /etc/apt/sources.list.d/scidb.list \
&& apt-key adv \
--keyserver hkp://keyserver.ubuntu.com --recv 46BD98A354BA5235 \
&& echo "deb https://dl.bintray.com/rvernica/deb jessie main" \
> /etc/apt/sources.list.d/bintray.list \
&& apt-get update \
&& apt-get install --assume-yes --no-install-recommends \
paradigm4-$SCIDB_VER-all-coord \
shim=$SCIDB_VER \
&& rm -rf /var/lib/apt/lists/*
## Setup SSH
RUN echo 'StrictHostKeyChecking no' \
>> /etc/ssh/ssh_config \
&& ssh-keygen -f /root/.ssh/id_rsa -q -N "" \
&& cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
## Setup SciDB "config.ini"
COPY config.deb.ini $SCIDB_INSTALL_PATH/etc/config.ini
## Setup PostgreSQL and SciDB
RUN echo "127.0.0.1:5432:$SCIDB_NAME:$SCIDB_NAME:` \
date +%s | sha256sum | base64 | head -c 32`" \
> /root/.pgpass \
&& chmod go-r /root/.pgpass \
&& service ssh start \
&& service postgresql start \
&& su --command=" \
$SCIDB_INSTALL_PATH/bin/scidb.py init-syscat $SCIDB_NAME \
--db-password ` \
cut --delimiter : --fields 5 /root/.pgpass`" \
postgres \
&& $SCIDB_INSTALL_PATH/bin/scidb.py init-all --force $SCIDB_NAME \
&& service postgresql stop
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
## Port | App
## -----+-----
## 1239 | SciDB iquery
## 8080 | SciDB Shim (HTTP)
## 8083 | SciDB Shim (HTTPS)
EXPOSE 1239 8080 8083