Skip to content

Commit bd4191b

Browse files
committed
fix: replace openjdk docker build with eclipse-temurin CTR
Fixes #4880 Discussion: #4880 Signed-off-by: Oleksandr Porunov <[email protected]>
1 parent 00b3eec commit bd4191b

File tree

5 files changed

+20
-26
lines changed

5 files changed

+20
-26
lines changed

TESTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,5 +189,5 @@ System properties to configure HBase test executions:
189189
| Property | Description | Default value |
190190
| -------- | ----------- | ------------- |
191191
| `hbase.docker.version` | HBase version to be used in the docker image. | `2.6.0` |
192-
| `hbase.docker.uid` | Uid used to run inside HBase of the container | 1000 |
193-
| `hbase.docker.gid` | Gid used to run inside HBase of the container | 1000 |
192+
| `hbase.docker.uid` | Uid used to run inside HBase of the container | 999 |
193+
| `hbase.docker.gid` | Gid used to run inside HBase of the container | 999 |

janusgraph-dist/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
ARG BASE_IMAGE=eclipse-temurin:11-jre
1616

17-
FROM debian:bullseye-slim as builder
17+
FROM debian:bullseye-slim AS builder
1818

1919
ARG TARGETARCH
2020
ARG JANUS_VERSION=1.0.0-SNAPSHOT

janusgraph-hbase/docker/Dockerfile

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM debian:bookworm-20240211 as builder
15+
FROM debian:bookworm-20240211 AS builder
1616

1717
ARG HBASE_VERSION=2.6.0
1818
ARG HBASE_DIST="https://archive.apache.org/dist/hbase"
@@ -27,33 +27,27 @@ RUN rm -rf ./docs ./LEGAL ./*.txt ./*/*.cmd
2727
COPY ./hbase-site.xml /opt/hbase/conf/hbase-site.xml
2828
COPY ./hbase-policy.xml /opt/hbase/conf/hbase-policy.xml
2929

30-
FROM openjdk:8-jre-bullseye
30+
FROM eclipse-temurin:8-jre
3131

32-
ARG HBASE_UID=1000
33-
ARG HBASE_GID=1000
32+
ARG HBASE_UID=999
33+
ARG HBASE_GID=999
3434

3535
ENV LOGS_DIR=/data/logs
3636

3737
COPY --from=builder /opt/hbase/ /opt/hbase/
3838

39-
RUN ln -sf /opt/hbase/bin/* /usr/bin/
40-
RUN mkdir -p $LOGS_DIR /data/hbase /data/wal /data/run /opt/hbase/logs
41-
RUN apt-get update && \
42-
DEBIAN_FRONTEND=noninteractive apt-get install -y socat
4339
WORKDIR /opt/hbase
4440
COPY ./entrypoint.sh /entrypoint.sh
4541

46-
EXPOSE 2181
47-
EXPOSE 16000
48-
EXPOSE 16010
49-
EXPOSE 16020
50-
EXPOSE 16030
42+
RUN ln -sf /opt/hbase/bin/* /usr/bin/ \
43+
&& mkdir -p $LOGS_DIR /data/hbase /data/wal /data/run /opt/hbase/logs \
44+
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y socat \
45+
&& groupadd -g ${HBASE_GID} hbase \
46+
&& useradd -s /bin/bash hbase -u ${HBASE_UID} -g ${HBASE_GID} \
47+
&& chmod +x /entrypoint.sh \
48+
&& chown -R ${HBASE_UID}:${HBASE_GID} /data /opt/hbase/logs
5149

52-
ENTRYPOINT ["/entrypoint.sh"]
50+
EXPOSE 2181 16000 16010 16020 16030
5351

54-
RUN groupadd -g ${HBASE_GID} hbase && \
55-
useradd -s /bin/bash hbase -u ${HBASE_UID} -g ${HBASE_GID} && \
56-
chmod +x /entrypoint.sh && \
57-
chown -R ${HBASE_UID}:${HBASE_GID} /data && \
58-
chown -R ${HBASE_UID}:${HBASE_GID} /opt/hbase/logs
5952
USER hbase
53+
ENTRYPOINT ["/entrypoint.sh"]

janusgraph-hbase/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
<properties>
1313
<hadoop.profile>2.0</hadoop.profile>
14-
<hbase.docker.uid>1000</hbase.docker.uid>
15-
<hbase.docker.gid>1000</hbase.docker.gid>
14+
<hbase.docker.uid>999</hbase.docker.uid>
15+
<hbase.docker.gid>999</hbase.docker.gid>
1616
<top.level.basedir>${basedir}/..</top.level.basedir>
1717
<test.hbase.targetdir>${basedir}/target</test.hbase.targetdir>
1818
</properties>

janusgraph-hbase/src/test/java/org/janusgraph/HBaseContainer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public class HBaseContainer extends GenericContainer<HBaseContainer> {
4747
public static final String HBASE_TARGET_DIR = "test.hbase.targetdir";
4848
public static final String HBASE_DOCKER_PATH = "janusgraph-hbase/docker";
4949
private static final String DEFAULT_VERSION = "2.6.0";
50-
private static final String DEFAULT_UID = "1000";
51-
private static final String DEFAULT_GID = "1000";
50+
private static final String DEFAULT_UID = "999";
51+
private static final String DEFAULT_GID = "999";
5252

5353
private static String getVersion() {
5454
String property = System.getProperty("hbase.docker.version");

0 commit comments

Comments
 (0)