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
1717ARG HBASE_VERSION=2.6.0
1818ARG HBASE_DIST="https://archive.apache.org/dist/hbase"
@@ -27,33 +27,27 @@ RUN rm -rf ./docs ./LEGAL ./*.txt ./*/*.cmd
2727COPY ./hbase-site.xml /opt/hbase/conf/hbase-site.xml
2828COPY ./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
3535ENV LOGS_DIR=/data/logs
3636
3737COPY --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
4339WORKDIR /opt/hbase
4440COPY ./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
5952USER hbase
53+ ENTRYPOINT ["/entrypoint.sh" ]
0 commit comments