-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (28 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
38 lines (28 loc) · 1.04 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
FROM ubuntu:20.04 as build
LABEL maintainer "likelion@gmail.com"
ENV DEBIAN_FRONTEND=noninteractive
ARG PUBLIC_HOST=localhost
ARG PUBLIC_PORT=3020
ADD config-available /opt/dklare/config-available/
ADD lib /opt/dklare/lib/
ADD rdf /opt/dklare/rdf/
COPY settings.db /opt/dklare/
COPY dklare.ttl /opt/dklare/
COPY run.pl /opt/dklare/
WORKDIR /opt/dklare
RUN apt-get update && \
apt-get -yq --no-install-recommends install tzdata software-properties-common && \
ln -fs /usr/share/zoneinfo/Europe/Stockholm /etc/localtime && \
dpkg-reconfigure tzdata && \
apt-add-repository ppa:swi-prolog/devel && \
apt-get update && \
apt-get -yq --no-install-recommends install swi-prolog && \
apt-get -yq remove --purge software-properties-common && \
apt-get -yq autoremove && \
rm -rf /var/lib/apt/lists/* && \
sed -i 's|%PUBLIC_HOST%|'$PUBLIC_HOST'|g' settings.db && \
sed -i 's/%PUBLIC_PORT%/'$PUBLIC_PORT'/g' settings.db
VOLUME /opt/dklare/knowledge
VOLUME /opt/dklare/RDF-store
EXPOSE ${PUBLIC_PORT}
CMD ["swipl","run.pl"]