Skip to content

Commit

Permalink
FAB-10435 Update Makefile to support custom DOCKER_NS
Browse files Browse the repository at this point in the history
This patch updates the Makefile to build fabric-ca build artifacts
with custom DOCKER_NS. Existing Makefile "sed" commands are
incompatible when passing DOCKER_NS and BASE_DOCKER_NS with
forward slashes (/) while building docker images.

This helps us to build and publish images to nexus docker repo
with following DOCKER_NS "nexus3.hyperledger.org:10001/hyperledger"

Change-Id: If19de230d4dd32be79d335cace35febae44c91fa
Signed-off-by: rameshthoomu <rameshbabu.thoomu@gmail.com>
  • Loading branch information
rameshthoomu committed May 29, 2018
1 parent db9ecd3 commit adcf66b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ build/image/%/$(DUMMY): Makefile build/image/%/payload
$(eval DOCKER_NAME = $(DOCKER_NS)/$(TARGET))
@echo "Building docker $(TARGET) image"
@cat images/$(TARGET)/Dockerfile.in \
| sed -e 's/_BASE_NS_/$(BASE_DOCKER_NS)/g' \
| sed -e 's/_NS_/$(DOCKER_NS)/g' \
| sed -e 's/_BASE_TAG_/$(BASE_DOCKER_TAG)/g' \
| sed -e 's/_FABRIC_TAG_/$(FABRIC_TAG)/g' \
| sed -e 's/_TAG_/$(DOCKER_TAG)/g' \
| sed -e 's/_PGVER_/$(PGVER)/g' \
| sed -e 's|_BASE_NS_|$(BASE_DOCKER_NS)|g' \
| sed -e 's|_NS_|$(DOCKER_NS)|g' \
| sed -e 's|_BASE_TAG_|$(BASE_DOCKER_TAG)|g' \
| sed -e 's|_FABRIC_TAG_|$(FABRIC_TAG)|g' \
| sed -e 's|_TAG_|$(DOCKER_TAG)|g' \
| sed -e 's|_PGVER_|$(PGVER)|g' \
> $(@D)/Dockerfile
$(DBUILD) -t $(DOCKER_NAME) --build-arg FABRIC_CA_DYNAMIC_LINK=$(FABRIC_CA_DYNAMIC_LINK) $(@D)
docker tag $(DOCKER_NAME) $(DOCKER_NAME):$(DOCKER_TAG)
Expand Down

0 comments on commit adcf66b

Please sign in to comment.