55 lines
1.9 KiB
Text
55 lines
1.9 KiB
Text
# includes node 20
|
|
FROM gitea/runner-images:ubuntu-22.04-slim
|
|
|
|
# Install Java 17 and maven
|
|
RUN apt update && \
|
|
apt install openjdk-17-jdk maven curl ca-certificates -y --no-install-recommends && \
|
|
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set the BaseX version
|
|
ENV BASEX_VERSION 10.7
|
|
|
|
# Download and install BaseX
|
|
RUN cd /usr/local && curl https://files.basex.org/releases/10.7/BaseX107.zip | jar xv && \
|
|
chmod +x /usr/local/basex/bin/*
|
|
ENV PATH=$PATH:/usr/local/basex/bin
|
|
|
|
# Install Docker CLI
|
|
|
|
|
|
# Add Docker's official GPG key:
|
|
|
|
RUN install -m 0755 -d /etc/apt/keyrings && \
|
|
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \
|
|
chmod a+r /etc/apt/keyrings/docker.asc && \
|
|
echo \
|
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
|
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
|
apt-get update && apt-get install docker-ce-cli -y && \
|
|
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# JVM options e.g "-Xmx2048m "
|
|
ENV BASEX_JVM=""
|
|
|
|
# ${SERVER_OPTS} eg https://docs.basex.org/main/Command-Line_Options#http_server
|
|
ENV SERVER_OPTS=""
|
|
|
|
# 1984/tcp: API
|
|
# 8080/tcp: HTTP
|
|
# 8081/tcp: HTTP stop
|
|
EXPOSE 1984 8080 8081
|
|
|
|
# no VOLUMEs defined
|
|
WORKDIR /srv
|
|
|
|
# Run BaseX HTTP server with options by default
|
|
CMD basexhttp ${SERVER_OPTS}
|
|
|
|
|
|
LABEL org.opencontainers.image.description="BaseX (basex.org) docker image with dev tools."
|
|
LABEL org.opencontainers.image.source="https://github.com/Quodatum/basexdev-docker"
|
|
LABEL org.opencontainers.image.vendor="Quodatum Ltd"
|
|
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
LABEL com.quodatum.basex-docker.basex="${BASEX_VER}"
|
|
LABEL com.quodatum.basex-docker.jdk="${JDK_IMAGE}"
|
|
|