forked from BaseXdb/basex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (23 loc) · 859 Bytes
/
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
FROM maven:3-jdk-8-alpine
LABEL maintainer="BaseX Team <[email protected]>"
# Compile BaseX, install
COPY . /usr/src/basex/
# install git as "buildnumber-maven-plugin" requires git:
RUN apk update && apk add --no-cache git && \
cd /usr/src/basex && \
mvn clean install -DskipTests && \
ln -s /usr/src/basex/basex-*/etc/* /usr/local/bin &&\
adduser -h /srv -D -u 1984 basex && \
mkdir -p /srv/.m2 /srv/basex/data /srv/basex/repo /srv/basex/webapp && \
cp -r /usr/src/basex/basex-api/src/main/webapp/WEB-INF /srv/basex/webapp && \
chown -R basex /srv
USER basex
ENV MAVEN_CONFIG=/srv/.m2
# 1984/tcp: API
# 8984/tcp: HTTP
# 8985/tcp: HTTP stop
EXPOSE 1984 8984 8985
VOLUME ["/srv/basex/data", "/srv/basex/repo","/srv/basex/webapp"]
WORKDIR /srv
# Run BaseX HTTP server by default
CMD ["/usr/local/bin/basexhttp"]