vaijosh commented on code in PR #3021: URL: https://github.com/apache/hugegraph/pull/3021#discussion_r3247890001
########## docker/hbase/Dockerfile: ########## @@ -0,0 +1,101 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Standalone HBase 2.6.5 image for HugeGraph HBase backend testing. +# Exposes ZooKeeper on 2181 with znode /hbase (matching hugegraph.properties defaults). + +FROM eclipse-temurin:11-jre-jammy + +ARG HBASE_VERSION=2.6.5 +ARG HBASE_PRIMARY_URL=https://downloads.apache.org/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz +ARG HBASE_FALLBACK_URL=https://archive.apache.org/dist/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz +ARG ALLOW_UNVERIFIED_DOWNLOAD=false + +ENV HBASE_VERSION=${HBASE_VERSION} +ENV HBASE_HOME=/opt/hbase +ENV PATH=${HBASE_HOME}/bin:${PATH} + +RUN apt-get update && apt-get install -y --no-install-recommends \ + curl \ + netcat-openbsd \ + && rm -rf /var/lib/apt/lists/* + +RUN set -eux; \ + download_ok=0; \ + for url in "${HBASE_PRIMARY_URL}" "${HBASE_FALLBACK_URL}"; do \ + [ -n "${url}" ] || continue; \ + echo "Downloading HBase from ${url}"; \ + if curl -fL --retry 8 --retry-delay 5 --retry-all-errors \ + --connect-timeout 30 --max-time 1800 "${url}" -o /tmp/hbase.tar.gz; then \ + download_ok=1; \ + break; \ + fi; \ + echo "Download failed for ${url}, trying next source..."; \ + rm -f /tmp/hbase.tar.gz; \ + done; \ + if [ "${download_ok}" -ne 1 ]; then \ + echo "Unable to download HBase ${HBASE_VERSION} tarball from configured sources"; \ + exit 1; \ + fi; \ + if curl -fL --retry 5 --retry-delay 3 --retry-all-errors \ + --connect-timeout 30 "${HBASE_PRIMARY_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null || \ + curl -fL --retry 5 --retry-delay 3 --retry-all-errors \ + --connect-timeout 30 "${HBASE_FALLBACK_URL}.sha512" -o /tmp/hbase.tar.gz.sha512 2>/dev/null; then \ + echo "Verifying SHA512 checksum..."; \ Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
