-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.ubuntu-blazegraph
More file actions
54 lines (42 loc) · 1.97 KB
/
Copy pathDockerfile.ubuntu-blazegraph
File metadata and controls
54 lines (42 loc) · 1.97 KB
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
ARG PREFIX=llsem-
ARG PARENT_TAG=8
FROM ${PREFIX}ubuntu-maven:${PARENT_TAG} AS build
# install updates and required packages, and cleanup afterward
RUN DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get -y upgrade && \
apt-get -y --no-install-recommends install git && \
rm -rf /var/lib/apt/lists/*
# pin git commit hash along with the version specified in maven
ARG BLAZEGRAPH_GIT_COMMIT_ID=829ce824
ARG BLAZEGRAPH_DISTRO_VERSION=2.1.6-SNAPSHOT
# establish locations for installation and source code
ENV BLAZEGRAPH_HOME=/opt/blazegraph
ENV BLAZEGRAPH_SRC_DIR=/usr/src/build/blazegraph
# clone/checkout from revision control
RUN mkdir -p ${BLAZEGRAPH_SRC_DIR} && \
cd ${BLAZEGRAPH_SRC_DIR} && \
git clone https://github.com/blazegraph/database blazegraph-database
# build/install software, then cleanup
RUN mkdir -p ${BLAZEGRAPH_SRC_DIR} && \
cd ${BLAZEGRAPH_SRC_DIR} && \
cd blazegraph-database && \
git checkout ${BLAZEGRAPH_GIT_COMMIT_ID} && \
mvn clean install -DskipTests=true -N && \
mvn clean install -DskipTests=true && \
mvn clean install -P Deployment -U -DskipTests=true --projects blazegraph-jar,bigdata-jar && \
mkdir -p ${BLAZEGRAPH_HOME} && \
cd ${BLAZEGRAPH_HOME} && \
cp ${BLAZEGRAPH_SRC_DIR}/blazegraph-database/blazegraph-jar/target/blazegraph-jar-${BLAZEGRAPH_DISTRO_VERSION}.jar ./blazegraph.jar && \
rm -Rf /usr/src/build ~/.m2
#############################################################################
FROM ${PREFIX}ubuntu-zulu:${PARENT_TAG} AS runtime
### ARGs do not appear to span build stages so the same ARG needs to be defined here as well
ARG BLAZEGRAPH_DISTRO_VERSION=2.1.6-SNAPSHOT
ENV BLAZEGRAPH_HOME=/opt/blazegraph
WORKDIR "${BLAZEGRAPH_HOME}"
COPY --from=build ${BLAZEGRAPH_HOME}/blazegraph.jar ${BLAZEGRAPH_HOME}/blazegraph.jar
# default blazegraph port
EXPOSE 9999
HEALTHCHECK CMD curl -f http://localhost:9999/ || exit 1
CMD [ "sh", "-c", "java -jar ${BLAZEGRAPH_HOME}/blazegraph.jar" ]