From 1fb60ca6f3942e1ffdd22ec802da65ab942e9674 Mon Sep 17 00:00:00 2001 From: Andy Bunce Date: Thu, 15 May 2025 11:40:32 +0100 Subject: [PATCH] [mod] update --- DockerFile | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ readme.md | 17 +++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 DockerFile create mode 100644 readme.md diff --git a/DockerFile b/DockerFile new file mode 100644 index 0000000..708556a --- /dev/null +++ b/DockerFile @@ -0,0 +1,55 @@ +# 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}" + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..77e93ad --- /dev/null +++ b/readme.md @@ -0,0 +1,17 @@ +# BaseX development Docker image +A Docker image containing BaseX and a selection of development tools. Intended for CI/CD development use. +See https://github.com/Quodatum/basex-docker for a smaller runtime image. + +* BaseX +* Java JDK +* Maven +* Node +* Docker CLI + +## + +* https://docs.gitea.com/usage/actions/overview +## Features +- +- Supported platforms `linux/amd64`, `linux/arm64`, `linux/arm/v7` +- Images are published to docker hub and github container repositories for each release. \ No newline at end of file