From 21188188d44a73057082899eff1ba703340782c4 Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Wed, 19 May 2021 13:22:49 +0200 Subject: [PATCH] Makefile / Dockerfile of components: - pass tag/version of hadoop-base image forward to Docker builds of components (namenode, etc.) so that all newly built component images are based on the same hadoop-base image --- Makefile | 13 +++++++------ datanode/Dockerfile | 3 ++- historyserver/Dockerfile | 3 ++- namenode/Dockerfile | 3 ++- nodemanager/Dockerfile | 3 ++- resourcemanager/Dockerfile | 3 ++- submit/Dockerfile | 3 ++- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index da7cb7d9..1d360ddb 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,15 @@ DOCKER_NETWORK = docker-hadoop_default ENV_FILE = hadoop.env current_branch := $(shell git rev-parse --abbrev-ref HEAD) +base_version := --build-arg HADOOP_BASE_VERSION=$(current_branch) build: docker build -t bde2020/hadoop-base:$(current_branch) ./base - docker build -t bde2020/hadoop-namenode:$(current_branch) ./namenode - docker build -t bde2020/hadoop-datanode:$(current_branch) ./datanode - docker build -t bde2020/hadoop-resourcemanager:$(current_branch) ./resourcemanager - docker build -t bde2020/hadoop-nodemanager:$(current_branch) ./nodemanager - docker build -t bde2020/hadoop-historyserver:$(current_branch) ./historyserver - docker build -t bde2020/hadoop-submit:$(current_branch) ./submit + docker build -t bde2020/hadoop-namenode:$(current_branch) $(base_version) ./namenode + docker build -t bde2020/hadoop-datanode:$(current_branch) $(base_version) ./datanode + docker build -t bde2020/hadoop-resourcemanager:$(current_branch) $(base_version) ./resourcemanager + docker build -t bde2020/hadoop-nodemanager:$(current_branch) $(base_version) ./nodemanager + docker build -t bde2020/hadoop-historyserver:$(current_branch) $(base_version) ./historyserver + docker build -t bde2020/hadoop-submit:$(current_branch) $(base_version) ./submit wordcount: docker build -t hadoop-wordcount ./submit diff --git a/datanode/Dockerfile b/datanode/Dockerfile index 55be14a7..045b2a47 100644 --- a/datanode/Dockerfile +++ b/datanode/Dockerfile @@ -1,4 +1,5 @@ -FROM bde2020/hadoop-base:2.0.0-hadoop3.2.1-java8 +ARG HADOOP_BASE_VERSION=2.0.0-hadoop3.2.1-java8 +FROM bde2020/hadoop-base:$HADOOP_BASE_VERSION MAINTAINER Ivan Ermilov diff --git a/historyserver/Dockerfile b/historyserver/Dockerfile index 6ad934e2..5c19a593 100644 --- a/historyserver/Dockerfile +++ b/historyserver/Dockerfile @@ -1,4 +1,5 @@ -FROM bde2020/hadoop-base:2.0.0-hadoop3.2.1-java8 +ARG HADOOP_BASE_VERSION=2.0.0-hadoop3.2.1-java8 +FROM bde2020/hadoop-base:$HADOOP_BASE_VERSION MAINTAINER Ivan Ermilov diff --git a/namenode/Dockerfile b/namenode/Dockerfile index f5725ddf..96daf0ef 100644 --- a/namenode/Dockerfile +++ b/namenode/Dockerfile @@ -1,4 +1,5 @@ -FROM bde2020/hadoop-base:2.0.0-hadoop3.2.1-java8 +ARG HADOOP_BASE_VERSION=2.0.0-hadoop3.2.1-java8 +FROM bde2020/hadoop-base:$HADOOP_BASE_VERSION MAINTAINER Ivan Ermilov diff --git a/nodemanager/Dockerfile b/nodemanager/Dockerfile index 966167cf..ec4d395c 100644 --- a/nodemanager/Dockerfile +++ b/nodemanager/Dockerfile @@ -1,4 +1,5 @@ -FROM bde2020/hadoop-base:2.0.0-hadoop3.2.1-java8 +ARG HADOOP_BASE_VERSION=2.0.0-hadoop3.2.1-java8 +FROM bde2020/hadoop-base:$HADOOP_BASE_VERSION MAINTAINER Ivan Ermilov diff --git a/resourcemanager/Dockerfile b/resourcemanager/Dockerfile index cec9d132..f448d080 100644 --- a/resourcemanager/Dockerfile +++ b/resourcemanager/Dockerfile @@ -1,4 +1,5 @@ -FROM bde2020/hadoop-base:2.0.0-hadoop3.2.1-java8 +ARG HADOOP_BASE_VERSION=2.0.0-hadoop3.2.1-java8 +FROM bde2020/hadoop-base:$HADOOP_BASE_VERSION MAINTAINER Ivan Ermilov diff --git a/submit/Dockerfile b/submit/Dockerfile index 6eba11d0..7e2f9c75 100644 --- a/submit/Dockerfile +++ b/submit/Dockerfile @@ -1,4 +1,5 @@ -FROM bde2020/hadoop-base:2.0.0-hadoop3.2.1-java8 +ARG HADOOP_BASE_VERSION=2.0.0-hadoop3.2.1-java8 +FROM bde2020/hadoop-base:$HADOOP_BASE_VERSION MAINTAINER Ivan Ermilov