This repository has been archived by the owner on Sep 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
76 lines (54 loc) · 1.68 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
# Docker Parliament triple store
#
# VERSION 0.0.1
FROM ubuntu:14.04
MAINTAINER Alber Sanchez
# Install
RUN apt-get -qq update && apt-get install --fix-missing -y --force-yes \
openssh-server \
sudo \
wget \
gcc \
nano \
dialog \
unzip \
default-jre \
default-jdk \
ssh
# 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
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
RUN env
# Users and passwords
RUN echo 'root:xxxx.xxxx.xxxx' | chpasswd
# Configure SSH
RUN mkdir /var/run/sshd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/22/49701/g' /etc/ssh/sshd_config
#RUN echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config
# Parliament
RUN mkdir /usr/local/ParliamentKB
RUN wget -P /usr/local/ParliamentKB/ semwebcentral.org/frs/download.php/522/ParliamentQuickStart-v2.7.6-gcc-64.zip
RUN unzip /usr/local/ParliamentKB/ParliamentQuickStart-v2.7.6-gcc-64.zip -d /usr/local/ParliamentKB
RUN chown -R root:root /usr/local/ParliamentKB
RUN chmod +x /usr/local/ParliamentKB/StartParliament.sh
RUN chmod +x /usr/local/ParliamentKB/StartParliamentDaemon.sh
# Add files
ADD containerSetup.sh /home/root/containerSetup.sh
ADD jetty.xml /usr/local/ParliamentKB/conf/jetty.xml
ADD ParliamentConfig.txt /usr/local/ParliamentKB/ParliamentConfig.txt
ADD realm.properties /etc/realm.properties
RUN chown root:root \
/home/root/containerSetup.sh \
/usr/local/ParliamentKB/conf/jetty.xml \
/usr/local/ParliamentKB/ParliamentConfig.txt \
/etc/realm.properties
# Restarting services
RUN stop ssh
RUN start ssh
EXPOSE 49701
EXPOSE 49702
CMD ["/usr/sbin/sshd", "-D"]