-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
114 lines (84 loc) · 2.35 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
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
# SciDB 14.12
#
# VERSION 1.0
#
#
#
#
#
#
#PORT MAPPING
#SERVICE DEFAULT
#ssh 22
#shim 8083s
#Postgresql 5432
#SciDB 1239
FROM ubuntu:12.04
MAINTAINER Alber Sanchez
# install
RUN apt-get -qq update && apt-get install --fix-missing -y --force-yes --allow-unauthenticated \
openssh-server \
sudo \
wget \
curl \
libcurl4-openssl-dev \
libxml2-dev \
gdebi \
nano \
postgresql-8.4 \
sshpass \
git-core \
bzip2 \
apt-transport-https \
net-tools \
imagemagick
# Set environment
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN env
# Configure users
RUN useradd --home /home/scidb --create-home --uid 1005 --group sudo --shell /bin/bash scidb
RUN echo 'root:xxxx.xxxx.xxxx' | chpasswd
RUN echo 'postgres:xxxx.xxxx.xxxx' | chpasswd
RUN echo 'scidb:xxxx.xxxx.xxxx' | chpasswd
RUN echo 'xxxx.xxxx.xxxx' >> /home/scidb/pass.txt
RUN mkdir /var/run/sshd
RUN mkdir /home/scidb/data
# Configure SSH
RUN echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config
# Configure Postgres
RUN echo 'host all all 255.255.0.0/16 md5' >> /etc/postgresql/8.4/main/pg_hba.conf
# Add files
ADD containerSetup.sh /root/containerSetup.sh
ADD conf /root/conf
ADD installR.sh /root/installR.sh
ADD installParallel.sh /root/installParallel.sh
ADD installBoost_1570.sh /root/installBoost_1570.sh
ADD installGribModis2SciDB.sh /root/installGribModis2SciDB.sh
ADD libr_exec.so /root/libr_exec.so
ADD setEnvironment.sh /root/setEnvironment.sh
ADD iquery.conf /home/scidb/.config/scidb/iquery.conf
ADD installPackages.R /home/scidb/installPackages.R
ADD startScidb.sh /home/scidb/startScidb.sh
ADD stopScidb.sh /home/scidb/stopScidb.sh
ADD scidb_docker.ini /home/scidb/scidb_docker.ini
ADD downloaddata.sh /home/scidb/downloaddata.sh
ADD createArray.afl /home/scidb/createArray.afl
ADD removeArrayVersions.sh /home/scidb/removeArrayVersions.sh
ADD setEnvironment.sh /home/scidb/setEnvironment.sh
ADD reprosarefp.R /home/scidb/reprosarefp.R
ADD rexec_sar_efp_f.R /home/scidb/rexec_sar_efp_f.R
RUN chown -R root:root /root/*
RUN chown -R scidb:scidb /home/scidb/*
RUN chmod +x \
/root/*.sh \
/home/scidb/*.sh
# Restarting services
RUN stop ssh
RUN start ssh
RUN /etc/init.d/postgresql restart
EXPOSE 22
EXPOSE 8083
CMD ["/usr/sbin/sshd", "-D"]