Skip to content

Instantly share code, notes, and snippets.

@silencesys
Created January 28, 2023 20:38
Show Gist options
  • Save silencesys/9bdc211f0272684b8f506a05d907e3de to your computer and use it in GitHub Desktop.
Save silencesys/9bdc211f0272684b8f506a05d907e3de to your computer and use it in GitHub Desktop.
Docker file to create BaseX Docker image
FROM maven:3-openjdk-11
# Compile BaseX, install
COPY basex/basex /usr/src/basex/
# install git as "buildnumber-maven-plugin" requires git:
RUN apt-get update && apt-get install git && \
cd /usr/src/basex && \
ln -s /usr/src/basex/bin/* /usr/local/bin
# 1984/tcp: API
# 8984/tcp: HTTP
# 8985/tcp: HTTP stop
EXPOSE 1984 8080 8081
VOLUME ["/usr/src/basex/data"]
WORKDIR /srv
# Run BaseX HTTP server by default
CMD ["/usr/local/bin/basexhttp"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment