forked from linkeddatacenter/sdaas-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
54 lines (40 loc) · 1.42 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
# Copyright (C) 2019-2020 LinkedData.Center - All Rights Reserved
# Permission to copy and modify is granted under the MIT license
FROM alpine/helm as helm
FROM mikefarah/yq as yq
FROM linkeddatacenter/sdaas-rdfstore:2.1.5
LABEL authors="[email protected]"
USER root
COPY --from=helm /usr/bin/helm /usr/bin/helm
COPY --from=yq /usr/bin/yq /usr/bin/yq
ARG SHACLVER=1.3.2
ARG SHACLROOT=/opt/shacl-${SHACLVER}/bin
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gettext \
bats \
git \
unzip \
jq \
csvtool && \
curl --output /tmp/shacl.zip https://repo1.maven.org/maven2/org/topbraid/shacl/${SHACLVER}/shacl-${SHACLVER}-bin.zip && \
unzip /tmp/shacl.zip -d /opt && \
chmod +x ${SHACLROOT}/*
###### Variables affecting the image building
ENV SDAAS_BIN_DIR=/opt/sdaas
ENV SDAAS_WORKSPACE=/workspace
ENV SDAAS_LOG_DIR="$SDAAS_WORKSPACE"
ENV PATH=${SHACLROOT}:${PATH}
###### Runtime variables
ENV SD_UPLOAD_DIR /var/spool/sdaas
ENV SD_SPARQL_ENDPOINT http://localhost:8080/sdaas/sparql
ENV SD_QUADSTORE kb
COPY scripts "$SDAAS_BIN_DIR"
COPY sdaas-entrypoint.sh /sdaas-entrypoint.sh
RUN mkdir -p "${SDAAS_BIN_DIR}" "${SDAAS_LOG_DIR}" "${SD_UPLOAD_DIR}" "${SDAAS_WORKSPACE}" ; \
chmod -R 0755 "$SDAAS_BIN_DIR" /sdaas-entrypoint.sh; \
chown -R jetty.jetty "${SDAAS_WORKSPACE}" "$SDAAS_LOG_DIR" "$SD_UPLOAD_DIR"
USER jetty
WORKDIR "${SDAAS_WORKSPACE}"
ENTRYPOINT ["/sdaas-entrypoint.sh"]
CMD [""]