-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
76 lines (57 loc) · 2.06 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
# ---------------------------------------------
# Extracting the GraphDB distribution
# ---------------------------------------------
FROM alpine:3.20 AS ZipExtractor
ARG GDB_VERSION
RUN apk add unzip
COPY "dist/graphdb-${GDB_VERSION}-dist.zip" dist/
RUN unzip -q "./dist/graphdb-${GDB_VERSION}-dist.zip" \
&& mv "graphdb-${GDB_VERSION}" /opt/graphdb \
&& rm -rf dist
# ----------------------------------------------
# Repository/SPARQL Initialization GoCompiler
# ----------------------------------------------
FROM oraclelinux:9 AS GoCompiler
RUN mkdir -p /binaries
RUN yum install go -y \
&& yum clean all \
&& rm -rf /var/cache/yum
# compiles program that initializes GraphDB repositories
COPY graphdb-repository-init /opt/go/app/graphdb-repository-init
WORKDIR /opt/go/app/graphdb-repository-init
RUN go mod vendor \
&& go build \
&& mv graphdb-repository-init /binaries/graphdb-repository-init
# compiles program that pre-queries SPARQL queries
COPY repo-presparql-query /opt/go/app/repo-presparql-query
WORKDIR /opt/go/app/repo-presparql-query
RUN go mod vendor \
&& go build \
&& mv repo-presparql-query /binaries/repo-presparql-query
RUN rm -rf /opt/go/app
# -----------------------------------------------
# Main Image
# -----------------------------------------------
FROM oraclelinux:9
LABEL maintainer="Kevin Haller <[email protected]>"
ENV PATH="$PATH:/opt/graphdb/bin"
VOLUME /opt/graphdb/data
VOLUME /opt/graphdb/log
VOLUME /opt/graphdb/conf
VOLUME /opt/graphdb/work
EXPOSE 7200
EXPOSE 7300
COPY set-ownership.sh /usr/bin/set-ownership
COPY run-graphdb.sh /usr/bin/run-graphdb
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
COPY --from=GoCompiler /binaries/* /usr/bin/
RUN yum install -y java-11-openjdk-devel epel-release \
&& yum install tini \
&& yum clean all \
&& rm -rf /var/cache/yum
ARG DFILE_VERSION
ARG GDB_VERSION
LABEL version="${DFILE_VERSION}-graphdb${GDB_VERSION}"
LABEL description="Fresh new instance of GraphDB ${GDB_VERSION} (free version)."
COPY --from=ZipExtractor /opt/graphdb /opt/graphdb
ENTRYPOINT ["docker-entrypoint.sh"]