From 423e02ee3a8095ae55d8565e5825a930e765f16a Mon Sep 17 00:00:00 2001 From: Gari Singh Date: Sat, 31 Mar 2018 08:26:02 -0400 Subject: [PATCH] [FAB-9264] Remove javaenv from fabric build Java CC has been moved to its own repo. We should no longer be maintaining and building the javaenv Docker image within the fabric repo Change-Id: I47cbcfa273ccb542feaf4a866fdbfd21a6924505 Signed-off-by: Gari Singh --- Makefile | 13 ++++--------- images/javaenv/Dockerfile.in | 22 ---------------------- sampleconfig/core.yaml | 2 +- 3 files changed, 5 insertions(+), 32 deletions(-) delete mode 100644 images/javaenv/Dockerfile.in diff --git a/Makefile b/Makefile index 296e5476aa5..243187cb257 100755 --- a/Makefile +++ b/Makefile @@ -104,7 +104,7 @@ PROJECT_FILES = $(shell git ls-files | grep -v ^test | grep -v ^unit-test | \ grep -v ^.git | grep -v ^examples | grep -v ^devenv | grep -v .png$ | \ grep -v ^LICENSE | grep -v ^vendor ) RELEASE_TEMPLATES = $(shell git ls-files | grep "release/templates") -IMAGES = peer orderer ccenv javaenv buildenv testenv tools +IMAGES = peer orderer ccenv buildenv testenv tools RELEASE_PLATFORMS = windows-amd64 darwin-amd64 linux-amd64 linux-ppc64le linux-s390x RELEASE_PKGS = configtxgen cryptogen configtxlator peer orderer @@ -173,8 +173,6 @@ cryptogen: $(BUILD_DIR)/bin/cryptogen tools-docker: $(BUILD_DIR)/image/tools/$(DUMMY) -javaenv: $(BUILD_DIR)/image/javaenv/$(DUMMY) - buildenv: $(BUILD_DIR)/image/buildenv/$(DUMMY) $(BUILD_DIR)/image/testenv/$(DUMMY): $(BUILD_DIR)/image/buildenv/$(DUMMY) @@ -254,9 +252,9 @@ $(BUILD_DIR)/docker/gotools: gotools.mk $(BASE_DOCKER_NS)/fabric-baseimage:$(BASE_DOCKER_TAG) \ make -f gotools.mk GOTOOLS_BINDIR=/opt/gotools/bin GOTOOLS_GOPATH=/opt/gotools/obj -# Both peer and peer-docker depend on ccenv and javaenv (all docker env images it supports). -$(BUILD_DIR)/bin/peer: $(BUILD_DIR)/image/ccenv/$(DUMMY) $(BUILD_DIR)/image/javaenv/$(DUMMY) -$(BUILD_DIR)/image/peer/$(DUMMY): $(BUILD_DIR)/image/ccenv/$(DUMMY) $(BUILD_DIR)/image/javaenv/$(DUMMY) +# Both peer and peer-docker depend on ccenv (all docker env images it supports). +$(BUILD_DIR)/bin/peer: $(BUILD_DIR)/image/ccenv/$(DUMMY) +$(BUILD_DIR)/image/peer/$(DUMMY): $(BUILD_DIR)/image/ccenv/$(DUMMY) $(BUILD_DIR)/bin/%: $(PROJECT_FILES) @mkdir -p $(@D) @@ -269,9 +267,6 @@ $(BUILD_DIR)/bin/%: $(PROJECT_FILES) $(BUILD_DIR)/image/ccenv/payload: $(BUILD_DIR)/docker/gotools/bin/protoc-gen-go \ $(BUILD_DIR)/bin/chaintool \ $(BUILD_DIR)/goshim.tar.bz2 -$(BUILD_DIR)/image/javaenv/payload: $(BUILD_DIR)/javashim.tar.bz2 \ - $(BUILD_DIR)/protos.tar.bz2 \ - settings.gradle $(BUILD_DIR)/image/peer/payload: $(BUILD_DIR)/docker/bin/peer \ $(BUILD_DIR)/sampleconfig.tar.bz2 $(BUILD_DIR)/image/orderer/payload: $(BUILD_DIR)/docker/bin/orderer \ diff --git a/images/javaenv/Dockerfile.in b/images/javaenv/Dockerfile.in deleted file mode 100644 index 1c673ebb945..00000000000 --- a/images/javaenv/Dockerfile.in +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright Greg Haskins All Rights Reserved -# -# SPDX-License-Identifier: Apache-2.0 -# -FROM _BASE_NS_/fabric-baseimage:_BASE_TAG_ -RUN curl -sSL https://services.gradle.org/distributions/gradle-4.4.1-bin.zip > /tmp/gradle-4.4.1-bin.zip -RUN unzip -qo /tmp/gradle-4.4.1-bin.zip -d /opt && rm /tmp/gradle-4.4.1-bin.zip -RUN ln -s /opt/gradle-4.4.1/bin/gradle /usr/bin -ENV MAVEN_VERSION=3.3.9 -ENV USER_HOME_DIR="/root" -RUN mkdir -p /usr/share/maven /usr/share/maven/ref \ - && curl -fsSL https://nexus.hyperledger.org/content/repositories/hosted_installers/apache-maven/apache-maven/$MAVEN_VERSION/apache-maven-$MAVEN_VERSION-bin.tar.gz \ - | tar -xzC /usr/share/maven --strip-components=1 \ - && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn -ENV MAVEN_HOME /usr/share/maven -ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" -ADD payload/javashim.tar.bz2 /root -ADD payload/protos.tar.bz2 /root -ADD payload/settings.gradle /root -WORKDIR /root -# Build java shim after copying proto files from fabric/proto -RUN core/chaincode/shim/java/javabuild.sh diff --git a/sampleconfig/core.yaml b/sampleconfig/core.yaml index 8b7ef932d5a..9e39bd3bdc9 100644 --- a/sampleconfig/core.yaml +++ b/sampleconfig/core.yaml @@ -482,7 +482,7 @@ chaincode: # This image is packed with shim layer libraries that are necessary # for Java chaincode runtime. Dockerfile: | - from $(DOCKER_NS)/fabric-javaenv:$(ARCH)-$(PROJECT_VERSION) + from $(DOCKER_NS)/fabric-javaenv:$(ARCH)-1.1.0 node: # need node.js engine at runtime, currently available in baseimage