diff --git a/TESTING.md b/TESTING.md index 5d9c140b06..223cdc64d2 100644 --- a/TESTING.md +++ b/TESTING.md @@ -189,5 +189,5 @@ System properties to configure HBase test executions: | Property | Description | Default value | | -------- | ----------- | ------------- | | `hbase.docker.version` | HBase version to be used in the docker image. | `2.6.0` | -| `hbase.docker.uid` | Uid used to run inside HBase of the container | 1000 | -| `hbase.docker.gid` | Gid used to run inside HBase of the container | 1000 | +| `hbase.docker.uid` | Uid used to run inside HBase of the container | 999 | +| `hbase.docker.gid` | Gid used to run inside HBase of the container | 999 | diff --git a/janusgraph-dist/docker/Dockerfile b/janusgraph-dist/docker/Dockerfile index a279832ecd..b1daf460b3 100644 --- a/janusgraph-dist/docker/Dockerfile +++ b/janusgraph-dist/docker/Dockerfile @@ -14,7 +14,7 @@ ARG BASE_IMAGE=eclipse-temurin:11-jre -FROM debian:bullseye-slim as builder +FROM debian:bullseye-slim AS builder ARG TARGETARCH ARG JANUS_VERSION=1.0.0-SNAPSHOT diff --git a/janusgraph-hbase/docker/Dockerfile b/janusgraph-hbase/docker/Dockerfile index 54ba865a10..ac9b27c8b1 100644 --- a/janusgraph-hbase/docker/Dockerfile +++ b/janusgraph-hbase/docker/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM debian:bookworm-20240211 as builder +FROM debian:bookworm-20240211 AS builder ARG HBASE_VERSION=2.6.0 ARG HBASE_DIST="https://archive.apache.org/dist/hbase" @@ -27,33 +27,27 @@ RUN rm -rf ./docs ./LEGAL ./*.txt ./*/*.cmd COPY ./hbase-site.xml /opt/hbase/conf/hbase-site.xml COPY ./hbase-policy.xml /opt/hbase/conf/hbase-policy.xml -FROM openjdk:8-jre-bullseye +FROM eclipse-temurin:8-jre -ARG HBASE_UID=1000 -ARG HBASE_GID=1000 +ARG HBASE_UID=999 +ARG HBASE_GID=999 ENV LOGS_DIR=/data/logs COPY --from=builder /opt/hbase/ /opt/hbase/ -RUN ln -sf /opt/hbase/bin/* /usr/bin/ -RUN mkdir -p $LOGS_DIR /data/hbase /data/wal /data/run /opt/hbase/logs -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y socat WORKDIR /opt/hbase COPY ./entrypoint.sh /entrypoint.sh -EXPOSE 2181 -EXPOSE 16000 -EXPOSE 16010 -EXPOSE 16020 -EXPOSE 16030 +RUN ln -sf /opt/hbase/bin/* /usr/bin/ \ + && mkdir -p $LOGS_DIR /data/hbase /data/wal /data/run /opt/hbase/logs \ + && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y socat \ + && groupadd -g ${HBASE_GID} hbase \ + && useradd -s /bin/bash hbase -u ${HBASE_UID} -g ${HBASE_GID} \ + && chmod +x /entrypoint.sh \ + && chown -R ${HBASE_UID}:${HBASE_GID} /data /opt/hbase/logs -ENTRYPOINT ["/entrypoint.sh"] +EXPOSE 2181 16000 16010 16020 16030 -RUN groupadd -g ${HBASE_GID} hbase && \ - useradd -s /bin/bash hbase -u ${HBASE_UID} -g ${HBASE_GID} && \ - chmod +x /entrypoint.sh && \ - chown -R ${HBASE_UID}:${HBASE_GID} /data && \ - chown -R ${HBASE_UID}:${HBASE_GID} /opt/hbase/logs USER hbase +ENTRYPOINT ["/entrypoint.sh"] diff --git a/janusgraph-hbase/pom.xml b/janusgraph-hbase/pom.xml index 0106640872..1ccd5c3cc7 100644 --- a/janusgraph-hbase/pom.xml +++ b/janusgraph-hbase/pom.xml @@ -11,8 +11,8 @@ 2.0 - 1000 - 1000 + 999 + 999 ${basedir}/.. ${basedir}/target diff --git a/janusgraph-hbase/src/test/java/org/janusgraph/HBaseContainer.java b/janusgraph-hbase/src/test/java/org/janusgraph/HBaseContainer.java index 26b94a6634..4a88634846 100644 --- a/janusgraph-hbase/src/test/java/org/janusgraph/HBaseContainer.java +++ b/janusgraph-hbase/src/test/java/org/janusgraph/HBaseContainer.java @@ -47,8 +47,8 @@ public class HBaseContainer extends GenericContainer { public static final String HBASE_TARGET_DIR = "test.hbase.targetdir"; public static final String HBASE_DOCKER_PATH = "janusgraph-hbase/docker"; private static final String DEFAULT_VERSION = "2.6.0"; - private static final String DEFAULT_UID = "1000"; - private static final String DEFAULT_GID = "1000"; + private static final String DEFAULT_UID = "999"; + private static final String DEFAULT_GID = "999"; private static String getVersion() { String property = System.getProperty("hbase.docker.version");