Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions build-docker.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
: ${DOCKER_REGISTRY:-'gradiant'}
VERSION=2.1.10

VERSION=2.0.1
docker build --build-arg VERSION=$VERSION -t ${DOCKER_REGISTRY}/hbase-base:$VERSION hbase-base
docker build --build-arg VERSION=$VERSION -t ${DOCKER_REGISTRY}/hbase-master:$VERSION hbase-master
docker build --build-arg VERSION=$VERSION -t ${DOCKER_REGISTRY}/hbase-region:$VERSION hbase-region

docker build --build-arg VERSION=$VERSION -t gradiant/hbase-base:$VERSION hbase-base
docker build --build-arg VERSION=$VERSION -t gradiant/hbase-master:$VERSION hbase-master
docker build --build-arg VERSION=$VERSION -t gradiant/hbase-region:$VERSION hbase-region

docker tag gradiant/hbase-base:$VERSION gradiant/hbase-base:latest
docker tag gradiant/hbase-master:$VERSION gradiant/hbase-master:latest
docker tag gradiant/hbase-region:$VERSION gradiant/hbase-region:latest
docker tag ${DOCKER_REGISTRY}/hbase-base:$VERSION ${DOCKER_REGISTRY}/hbase-base:latest
docker tag ${DOCKER_REGISTRY}/hbase-master:$VERSION ${DOCKER_REGISTRY}/hbase-master:latest
docker tag ${DOCKER_REGISTRY}/hbase-region:$VERSION ${DOCKER_REGISTRY}/hbase-region:latest
4 changes: 2 additions & 2 deletions hbase-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM gradiant/hadoop-base:2.7.7 as hadoop
FROM quay.io/kaszpir/dockerized-hadoop:3.1.3 as hadoop

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must not hardcode an external registry in the Dockerfile.
We can use docker build args for that:

ARG hadoop_image="gradiant/hdfs:3.1.2"
FROM $hadoop_image as hadoop
...

Then just set hadoop_image variable in your build environment (for example):

docker build -t quay.io/kaszpir/hbse:2.1.10 --build-arg hadoop_image=quay.io/kaszpir/dockerized-hadoop:3.1.3 .

Also if you need hadoop 3.1.x versions, we have created dockerhub gradiant/hdfs repo with 2.7.7, 2.9.2, 3.1.2 and 3.2.1 images from current gradiant/dockerized-hadoop.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I know, that's why it's WIP/Draft.
I'm experimenting with some other options, but ARG looks the best.
Was trying to avoid any external Makefiles and so on because I wanted to use ofifical quay.io building image feature from Dockerfile.


FROM openjdk:8u171-jre-alpine3.8
LABEL maintainer="cgiraldo@gradiant.org"
LABEL organization="gradiant.org"
ARG VERSION=2.0.1
ARG VERSION=2.1.10
ENV HBASE_VERSION=$VERSION

RUN apk add --no-cache bash perl jruby curl && mkdir /opt && \
Expand Down