-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
81 lines (67 loc) · 2.4 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
### 1. Get Linux
FROM monarchinitiative/ubergraph:1.1
ARG ROBOT=1.9.3
ARG JENA=4.7.0
ARG BGR=1.7
ARG CTD=0.3.0
ARG MAT=0.1
# Configuration options:
# - ${USERNAME} is the name of the non-root user to create.
ARG USERNAME=nru
# - ${USERID} is the UID of the non-root user.
ARG USERID=1001
# - ${DATA} is where the writeable data volume should be mounted.
ARG DATA=/data
# - ${TOOLS} is where the writeable tools volume should be mounted.
ARG TOOLS=/tools
### 2. Get Java and all required system libraries
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get upgrade -y --no-install-recommends
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
software-properties-common \
build-essential \
openjdk-11-jdk-headless \
git \
make \
curl \
tar \
vim \
screen \
rsync \
locales
RUN locale-gen "en_US.UTF-8"
###### SCALA-CLI ######
RUN curl -fLo scala-cli.deb https://github.com/Virtuslab/scala-cli/releases/latest/download/scala-cli-x86_64-pc-linux.deb \
&& dpkg -i scala-cli.deb
### 3. Set up the $DATA and $TOOLS directory.
RUN mkdir -p ${DATA}
RUN mkdir -p ${TOOLS}
### 4. Set up a non-root user.
RUN useradd --uid ${USERID} -m ${USERNAME}
RUN chown ${USERNAME} ${DATA}
RUN chown ${USERNAME} ${TOOLS}
USER ${USERNAME}
### 5. Install custom tools
WORKDIR $TOOLS
###### JENA ######
RUN curl -O -L http://archive.apache.org/dist/jena/binaries/apache-jena-$JENA.tar.gz \
&& tar -zxf apache-jena-$JENA.tar.gz
ENV PATH "$TOOLS/apache-jena-$JENA/bin:$PATH"
###### BLAZEGRAPH-RUNNER ######
RUN curl -O -L https://github.com/balhoff/blazegraph-runner/releases/download/v$BGR/blazegraph-runner-$BGR.tgz \
&& tar -zxf blazegraph-runner-$BGR.tgz \
&& chmod +x /tools/blazegraph-runner-$BGR
ENV PATH "$TOOLS/blazegraph-runner-$BGR/bin:$PATH"
###### MATERIALIZER ######
RUN curl -O -L https://github.com/balhoff/materializer/releases/download/v$MAT/materializer-$MAT.tgz \
&& tar -zxf materializer-$MAT.tgz \
&& chmod +x /tools/materializer-$MAT
ENV PATH "$TOOLS/materializer-$MAT/bin:$PATH"
###### CTD-TO-OWL ######
RUN curl -O -L https://github.com/balhoff/ctd-to-owl/releases/download/v$CTD/ctd-to-owl-$CTD.tgz \
&& tar -zxf ctd-to-owl-$CTD.tgz \
&& chmod +x /tools/ctd-to-owl-$CTD
ENV PATH "$TOOLS/ctd-to-owl-$CTD/bin:$PATH"
### 6. Start in the $DATA directory.
WORKDIR $DATA