2016-10-19 08:32:00 +02:00
|
|
|
# Makefile for a harbor project
|
2019-10-10 09:29:50 +02:00
|
|
|
#
|
2016-10-19 08:32:00 +02:00
|
|
|
# Targets:
|
|
|
|
#
|
2016-10-26 07:46:22 +02:00
|
|
|
# build: build harbor photon images
|
2019-02-22 09:34:26 +01:00
|
|
|
# clean: clean core and jobservice harbor images
|
2016-10-19 08:32:00 +02:00
|
|
|
|
|
|
|
# common
|
|
|
|
SHELL := /bin/bash
|
|
|
|
BUILDPATH=$(CURDIR)
|
2016-10-24 08:06:23 +02:00
|
|
|
MAKEPATH=$(BUILDPATH)/make
|
2016-10-19 08:32:00 +02:00
|
|
|
SRCPATH=./src
|
2018-06-01 08:58:43 +02:00
|
|
|
TOOLSPATH=$(CURDIR)/tools
|
2017-12-09 19:53:12 +01:00
|
|
|
SEDCMD=$(shell which sed)
|
|
|
|
WGET=$(shell which wget)
|
2016-10-19 08:32:00 +02:00
|
|
|
|
|
|
|
# docker parameters
|
|
|
|
DOCKERCMD=$(shell which docker)
|
2019-11-11 11:56:36 +01:00
|
|
|
DOCKERBUILD=$(DOCKERCMD) build
|
2016-10-19 08:32:00 +02:00
|
|
|
DOCKERRMIMAGE=$(DOCKERCMD) rmi
|
|
|
|
DOCKERIMASES=$(DOCKERCMD) images
|
|
|
|
|
2019-02-22 09:34:26 +01:00
|
|
|
# binary
|
2018-09-12 08:38:29 +02:00
|
|
|
CORE_SOURCECODE=$(SRCPATH)/core
|
|
|
|
CORE_BINARYNAME=harbor_core
|
2016-10-19 08:32:00 +02:00
|
|
|
JOBSERVICESOURCECODE=$(SRCPATH)/jobservice
|
|
|
|
JOBSERVICEBINARYNAME=harbor_jobservice
|
|
|
|
|
2016-10-26 07:46:22 +02:00
|
|
|
# photon dockerfile
|
|
|
|
DOCKERFILEPATH=$(MAKEPATH)/photon
|
2017-12-09 19:53:12 +01:00
|
|
|
|
2019-03-18 08:07:19 +01:00
|
|
|
DOCKERFILEPATH_PREPARE=$(DOCKERFILEPATH)/prepare
|
|
|
|
DOCKERFILENAME_PREPARE=Dockerfile
|
|
|
|
DOCKERIMAGENAME_PREPARE=goharbor/prepare
|
|
|
|
|
2018-09-05 09:48:16 +02:00
|
|
|
DOCKERFILEPATH_PORTAL=$(DOCKERFILEPATH)/portal
|
|
|
|
DOCKERFILENAME_PORTAL=Dockerfile
|
|
|
|
DOCKERIMAGENAME_PORTAL=goharbor/harbor-portal
|
|
|
|
|
2018-09-12 08:38:29 +02:00
|
|
|
DOCKERFILEPATH_CORE=$(DOCKERFILEPATH)/core
|
|
|
|
DOCKERFILENAME_CORE=Dockerfile
|
|
|
|
DOCKERIMAGENAME_CORE=goharbor/harbor-core
|
2017-12-09 19:53:12 +01:00
|
|
|
|
2016-10-19 08:32:00 +02:00
|
|
|
DOCKERFILEPATH_JOBSERVICE=$(DOCKERFILEPATH)/jobservice
|
|
|
|
DOCKERFILENAME_JOBSERVICE=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_JOBSERVICE=goharbor/harbor-jobservice
|
2017-12-09 19:53:12 +01:00
|
|
|
|
2016-10-19 08:32:00 +02:00
|
|
|
DOCKERFILEPATH_LOG=$(DOCKERFILEPATH)/log
|
|
|
|
DOCKERFILENAME_LOG=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_LOG=goharbor/harbor-log
|
2016-10-19 08:32:00 +02:00
|
|
|
|
2018-06-01 08:58:43 +02:00
|
|
|
DOCKERFILEPATH_DB=$(DOCKERFILEPATH)/db
|
2017-12-09 19:53:12 +01:00
|
|
|
DOCKERFILENAME_DB=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_DB=goharbor/harbor-db
|
2017-12-09 19:53:12 +01:00
|
|
|
|
|
|
|
DOCKERFILEPATH_POSTGRESQL=$(DOCKERFILEPATH)/postgresql
|
|
|
|
DOCKERFILENAME_POSTGRESQL=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_POSTGRESQL=goharbor/postgresql-photon
|
2017-12-09 19:53:12 +01:00
|
|
|
|
|
|
|
DOCKERFILEPATH_CLAIR=$(DOCKERFILEPATH)/clair
|
|
|
|
DOCKERFILENAME_CLAIR=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_CLAIR=goharbor/clair-photon
|
2017-12-09 19:53:12 +01:00
|
|
|
|
2019-10-17 06:00:51 +02:00
|
|
|
DOCKERFILEPATH_CLAIR_ADAPTER=$(DOCKERFILEPATH)/clair-adapter
|
|
|
|
DOCKERFILENAME_CLAIR_ADAPTER=Dockerfile
|
|
|
|
DOCKERIMAGENAME_CLAIR_ADAPTER=goharbor/clair-adapter-photon
|
|
|
|
|
2017-12-09 19:53:12 +01:00
|
|
|
DOCKERFILEPATH_NGINX=$(DOCKERFILEPATH)/nginx
|
|
|
|
DOCKERFILENAME_NGINX=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_NGINX=goharbor/nginx-photon
|
2017-12-09 19:53:12 +01:00
|
|
|
|
|
|
|
DOCKERFILEPATH_REG=$(DOCKERFILEPATH)/registry
|
|
|
|
DOCKERFILENAME_REG=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_REG=goharbor/registry-photon
|
2017-12-09 19:53:12 +01:00
|
|
|
|
2018-07-16 10:50:28 +02:00
|
|
|
DOCKERFILEPATH_REGISTRYCTL=$(DOCKERFILEPATH)/registryctl
|
|
|
|
DOCKERFILENAME_REGISTRYCTL=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_REGISTRYCTL=goharbor/harbor-registryctl
|
2018-07-16 10:50:28 +02:00
|
|
|
|
2017-12-09 19:53:12 +01:00
|
|
|
DOCKERFILEPATH_NOTARY=$(DOCKERFILEPATH)/notary
|
2019-11-11 11:56:36 +01:00
|
|
|
DOCKERFILEPATH_NOTARYSERVER=$(DOCKERFILEPATH)/notary-server
|
|
|
|
DOCKERFILENAME_NOTARYSIGNER=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_NOTARYSIGNER=goharbor/notary-signer-photon
|
2019-11-11 11:56:36 +01:00
|
|
|
DOCKERFILEPATH_NOTARYSIGNER=$(DOCKERFILEPATH)/notary-signer
|
|
|
|
DOCKERFILENAME_NOTARYSERVER=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_NOTARYSERVER=goharbor/notary-server-photon
|
2017-12-09 19:53:12 +01:00
|
|
|
|
2018-03-30 07:22:10 +02:00
|
|
|
DOCKERFILEPATH_REDIS=$(DOCKERFILEPATH)/redis
|
|
|
|
DOCKERFILENAME_REDIS=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_REDIS=goharbor/redis-photon
|
2018-03-30 07:22:10 +02:00
|
|
|
|
2018-06-01 08:58:43 +02:00
|
|
|
DOCKERFILEPATH_MIGRATOR=$(TOOLSPATH)/migration
|
|
|
|
DOCKERFILENAME_MIGRATOR=Dockerfile
|
2018-08-10 08:41:30 +02:00
|
|
|
DOCKERIMAGENAME_MIGRATOR=goharbor/harbor-migrator
|
2018-06-01 08:58:43 +02:00
|
|
|
|
2018-07-19 10:47:05 +02:00
|
|
|
# for chart server (chartmuseum)
|
|
|
|
DOCKERFILEPATH_CHART_SERVER=$(DOCKERFILEPATH)/chartserver
|
|
|
|
DOCKERFILENAME_CHART_SERVER=Dockerfile
|
2019-10-20 15:10:55 +02:00
|
|
|
CHART_SERVER_CODE_BASE=https://github.com/helm/chartmuseum.git
|
2018-07-19 10:47:05 +02:00
|
|
|
CHART_SERVER_MAIN_PATH=cmd/chartmuseum
|
|
|
|
CHART_SERVER_BIN_NAME=chartm
|
|
|
|
|
2019-03-18 08:07:19 +01:00
|
|
|
_build_prepare:
|
|
|
|
@echo "building prepare container for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_PREPARE)/$(DOCKERFILENAME_PREPARE) -t $(DOCKERIMAGENAME_PREPARE):$(VERSIONTAG) .
|
2019-03-18 08:07:19 +01:00
|
|
|
@echo "Done."
|
|
|
|
|
2018-04-27 11:27:12 +02:00
|
|
|
_build_db:
|
2017-12-09 19:53:12 +01:00
|
|
|
@echo "building db container for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_DB)/$(DOCKERFILENAME_DB) -t $(DOCKERIMAGENAME_DB):$(VERSIONTAG) .
|
2017-12-09 19:53:12 +01:00
|
|
|
@echo "Done."
|
|
|
|
|
2018-09-05 09:48:16 +02:00
|
|
|
_build_portal:
|
|
|
|
@echo "building portal container for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) --build-arg npm_registry=$(NPM_REGISTRY) -f $(DOCKERFILEPATH_PORTAL)/$(DOCKERFILENAME_PORTAL) -t $(DOCKERIMAGENAME_PORTAL):$(VERSIONTAG) .
|
2018-09-05 09:48:16 +02:00
|
|
|
@echo "Done."
|
|
|
|
|
2019-10-10 09:29:50 +02:00
|
|
|
_build_core:
|
2018-09-12 08:38:29 +02:00
|
|
|
@echo "building core container for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_CORE)/$(DOCKERFILENAME_CORE) -t $(DOCKERIMAGENAME_CORE):$(VERSIONTAG) .
|
2016-10-19 08:32:00 +02:00
|
|
|
@echo "Done."
|
2019-10-10 09:29:50 +02:00
|
|
|
|
|
|
|
_build_jobservice:
|
2016-10-26 07:46:22 +02:00
|
|
|
@echo "building jobservice container for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_JOBSERVICE)/$(DOCKERFILENAME_JOBSERVICE) -t $(DOCKERIMAGENAME_JOBSERVICE):$(VERSIONTAG) .
|
2016-10-19 08:32:00 +02:00
|
|
|
@echo "Done."
|
2017-12-09 19:53:12 +01:00
|
|
|
|
2019-10-10 09:29:50 +02:00
|
|
|
_build_log:
|
2016-10-26 07:46:22 +02:00
|
|
|
@echo "building log container for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_LOG)/$(DOCKERFILENAME_LOG) -t $(DOCKERIMAGENAME_LOG):$(VERSIONTAG) .
|
2016-10-19 08:32:00 +02:00
|
|
|
@echo "Done."
|
2017-12-09 19:53:12 +01:00
|
|
|
|
|
|
|
_build_clair:
|
|
|
|
@if [ "$(CLAIRFLAG)" = "true" ] ; then \
|
|
|
|
if [ "$(BUILDBIN)" != "true" ] ; then \
|
|
|
|
rm -rf $(DOCKERFILEPATH_CLAIR)/binary && mkdir -p $(DOCKERFILEPATH_CLAIR)/binary && \
|
2018-08-31 09:59:56 +02:00
|
|
|
$(call _get_binary, https://storage.googleapis.com/harbor-builds/bin/clair/release2.0-$(CLAIRVERSION)/clair, $(DOCKERFILEPATH_CLAIR)/binary/clair); \
|
2017-12-09 19:53:12 +01:00
|
|
|
else \
|
2018-09-03 11:40:26 +02:00
|
|
|
cd $(DOCKERFILEPATH_CLAIR) && $(DOCKERFILEPATH_CLAIR)/builder $(CLAIRVERSION) && cd - ; \
|
2017-12-09 19:53:12 +01:00
|
|
|
fi ; \
|
|
|
|
echo "building clair container for photon..." ; \
|
2019-11-12 04:20:54 +01:00
|
|
|
$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_CLAIR)/$(DOCKERFILENAME_CLAIR) -t $(DOCKERIMAGENAME_CLAIR):$(CLAIRVERSION)-$(VERSIONTAG) . ; \
|
2017-12-09 19:53:12 +01:00
|
|
|
rm -rf $(DOCKERFILEPATH_CLAIR)/binary; \
|
|
|
|
echo "Done." ; \
|
|
|
|
fi
|
2018-07-19 10:47:05 +02:00
|
|
|
|
2019-10-17 06:00:51 +02:00
|
|
|
_build_clair_adapter:
|
|
|
|
@if [ "$(CLAIRFLAG)" = "true" ] ; then \
|
2019-10-26 19:25:36 +02:00
|
|
|
if [ "$(BUILDBIN)" != "true" ] ; then \
|
|
|
|
rm -rf $(DOCKERFILEPATH_CLAIR_ADAPTER)/binary && mkdir -p $(DOCKERFILEPATH_CLAIR_ADAPTER)/binary && \
|
|
|
|
$(call _extract_archive, https://github.com/goharbor/harbor-scanner-clair/releases/download/$(CLAIRADAPTERVERSION)/harbor-scanner-clair_$(CLAIRADAPTERVERSION:v%=%)_Linux_x86_64.tar.gz, $(DOCKERFILEPATH_CLAIR_ADAPTER)/binary/) && \
|
|
|
|
mv $(DOCKERFILEPATH_CLAIR_ADAPTER)/binary/scanner-clair $(DOCKERFILEPATH_CLAIR_ADAPTER)/binary/harbor-scanner-clair; \
|
|
|
|
else \
|
|
|
|
cd $(DOCKERFILEPATH_CLAIR_ADAPTER) && $(DOCKERFILEPATH_CLAIR_ADAPTER)/builder $(CLAIRADAPTERVERSION) && cd - ; \
|
|
|
|
fi ; \
|
2019-10-17 06:00:51 +02:00
|
|
|
echo "building clair adapter container for photon..." ; \
|
2019-11-12 04:20:54 +01:00
|
|
|
$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_CLAIR_ADAPTER)/$(DOCKERFILENAME_CLAIR_ADAPTER) -t $(DOCKERIMAGENAME_CLAIR_ADAPTER):$(CLAIRADAPTERVERSION)-$(VERSIONTAG) . ; \
|
2019-10-17 06:00:51 +02:00
|
|
|
rm -rf $(DOCKERFILEPATH_CLAIR_ADAPTER)/binary; \
|
|
|
|
echo "Done." ; \
|
|
|
|
fi
|
|
|
|
|
2018-07-19 10:47:05 +02:00
|
|
|
_build_chart_server:
|
|
|
|
@if [ "$(CHARTFLAG)" = "true" ] ; then \
|
|
|
|
if [ "$(BUILDBIN)" != "true" ] ; then \
|
|
|
|
rm -rf $(DOCKERFILEPATH_CHART_SERVER)/binary && mkdir -p $(DOCKERFILEPATH_CHART_SERVER)/binary && \
|
2019-02-14 11:06:01 +01:00
|
|
|
$(call _get_binary, https://storage.googleapis.com/harbor-builds/bin/chartmuseum/release-$(CHARTMUSEUMVERSION)/chartm, $(DOCKERFILEPATH_CHART_SERVER)/binary/chartm); \
|
2018-07-19 10:47:05 +02:00
|
|
|
else \
|
2018-09-03 11:40:26 +02:00
|
|
|
cd $(DOCKERFILEPATH_CHART_SERVER) && $(DOCKERFILEPATH_CHART_SERVER)/builder $(GOBUILDIMAGE) $(CHART_SERVER_CODE_BASE) $(CHARTMUSEUMVERSION) $(CHART_SERVER_MAIN_PATH) $(CHART_SERVER_BIN_NAME) && cd - ; \
|
2018-07-19 10:47:05 +02:00
|
|
|
fi ; \
|
|
|
|
echo "building chartmuseum container for photon..." ; \
|
2019-11-12 04:20:54 +01:00
|
|
|
$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_CHART_SERVER)/$(DOCKERFILENAME_CHART_SERVER) -t $(DOCKERIMAGENAME_CHART_SERVER):$(CHARTMUSEUMVERSION)-$(VERSIONTAG) . ; \
|
2018-07-19 10:47:05 +02:00
|
|
|
rm -rf $(DOCKERFILEPATH_CHART_SERVER)/binary; \
|
|
|
|
echo "Done." ; \
|
|
|
|
fi
|
2019-10-10 09:29:50 +02:00
|
|
|
|
2017-12-09 19:53:12 +01:00
|
|
|
_build_nginx:
|
|
|
|
@echo "building nginx container for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_NGINX)/$(DOCKERFILENAME_NGINX) -t $(DOCKERIMAGENAME_NGINX):$(NGINXVERSION) .
|
2017-12-09 19:53:12 +01:00
|
|
|
@echo "Done."
|
|
|
|
|
|
|
|
_build_notary:
|
|
|
|
@if [ "$(NOTARYFLAG)" = "true" ] ; then \
|
|
|
|
if [ "$(BUILDBIN)" != "true" ] ; then \
|
|
|
|
rm -rf $(DOCKERFILEPATH_NOTARY)/binary && mkdir -p $(DOCKERFILEPATH_NOTARY)/binary && \
|
2019-02-19 05:51:37 +01:00
|
|
|
$(call _get_binary, https://storage.googleapis.com/harbor-builds/bin/notary/release-$(NOTARYVERSION)/binary-bundle.tgz, $(DOCKERFILEPATH_NOTARY)/binary-bundle.tgz); \
|
|
|
|
cd $(DOCKERFILEPATH_NOTARY) && tar -zvxf binary-bundle.tgz && cd - ; \
|
2017-12-09 19:53:12 +01:00
|
|
|
else \
|
2019-02-19 05:51:37 +01:00
|
|
|
cd $(DOCKERFILEPATH_NOTARY) && $(DOCKERFILEPATH_NOTARY)/builder $(NOTARYVERSION) $(NOTARYMIGRATEVERSION) && cd - ; \
|
2017-12-09 19:53:12 +01:00
|
|
|
fi ; \
|
|
|
|
echo "building notary container for photon..."; \
|
2019-11-12 04:20:54 +01:00
|
|
|
chmod 655 $(DOCKERFILEPATH_NOTARY)/binary/notary-signer && $(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_NOTARYSIGNER)/$(DOCKERFILENAME_NOTARYSIGNER) -t $(DOCKERIMAGENAME_NOTARYSIGNER):$(NOTARYVERSION)-$(VERSIONTAG) . ; \
|
|
|
|
chmod 655 $(DOCKERFILEPATH_NOTARY)/binary/notary-server && $(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_NOTARYSERVER)/$(DOCKERFILENAME_NOTARYSERVER) -t $(DOCKERIMAGENAME_NOTARYSERVER):$(NOTARYVERSION)-$(VERSIONTAG) . ; \
|
2017-12-09 19:53:12 +01:00
|
|
|
rm -rf $(DOCKERFILEPATH_NOTARY)/binary; \
|
|
|
|
echo "Done."; \
|
|
|
|
fi
|
2019-10-10 09:29:50 +02:00
|
|
|
|
2017-12-09 19:53:12 +01:00
|
|
|
_build_registry:
|
|
|
|
@if [ "$(BUILDBIN)" != "true" ] ; then \
|
|
|
|
rm -rf $(DOCKERFILEPATH_REG)/binary && mkdir -p $(DOCKERFILEPATH_REG)/binary && \
|
2018-12-21 02:21:22 +01:00
|
|
|
$(call _get_binary, https://storage.googleapis.com/harbor-builds/bin/registry/release-$(REGISTRYVERSION)/registry, $(DOCKERFILEPATH_REG)/binary/registry); \
|
2017-12-09 19:53:12 +01:00
|
|
|
else \
|
2019-10-20 15:10:55 +02:00
|
|
|
cd $(DOCKERFILEPATH_REG) && $(DOCKERFILEPATH_REG)/builder $(REGISTRY_SRC_TAG) && cd - ; \
|
2017-12-09 19:53:12 +01:00
|
|
|
fi
|
|
|
|
@echo "building registry container for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
@chmod 655 $(DOCKERFILEPATH_REG)/binary/registry && $(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_REG)/$(DOCKERFILENAME_REG) -t $(DOCKERIMAGENAME_REG):$(REGISTRYVERSION)-$(VERSIONTAG) .
|
2018-07-16 10:50:28 +02:00
|
|
|
@echo "Done."
|
|
|
|
|
2019-10-10 09:29:50 +02:00
|
|
|
_build_registryctl:
|
2018-07-16 10:50:28 +02:00
|
|
|
@echo "building registry controller for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_REGISTRYCTL)/$(DOCKERFILENAME_REGISTRYCTL) -t $(DOCKERIMAGENAME_REGISTRYCTL):$(VERSIONTAG) .
|
2017-12-09 19:53:12 +01:00
|
|
|
@rm -rf $(DOCKERFILEPATH_REG)/binary
|
|
|
|
@echo "Done."
|
|
|
|
|
2018-03-30 07:22:10 +02:00
|
|
|
_build_redis:
|
|
|
|
@echo "building redis container for photon..."
|
2019-11-12 04:20:54 +01:00
|
|
|
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_REDIS)/$(DOCKERFILENAME_REDIS) -t $(DOCKERIMAGENAME_REDIS):$(REDISVERSION) .
|
2018-03-30 07:22:10 +02:00
|
|
|
@echo "Done."
|
|
|
|
|
2018-06-01 08:58:43 +02:00
|
|
|
_build_migrator:
|
2019-02-13 03:54:32 +01:00
|
|
|
@if [ "$(MIGRATORFLAG)" = "true" ] ; then \
|
|
|
|
echo "building db migrator container for photon..."; \
|
2019-11-12 04:20:54 +01:00
|
|
|
cd $(DOCKERFILEPATH_MIGRATOR) && $(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_MIGRATOR)/$(DOCKERFILENAME_MIGRATOR) -t $(DOCKERIMAGENAME_MIGRATOR):$(MIGRATORVERSION) . ; \
|
2019-02-13 03:54:32 +01:00
|
|
|
echo "Done."; \
|
|
|
|
fi
|
2018-06-01 08:58:43 +02:00
|
|
|
|
2019-10-26 19:25:36 +02:00
|
|
|
define _extract_archive
|
|
|
|
$(WGET) --timeout 30 --no-check-certificate -O- $1 | tar xvz -C $2
|
|
|
|
endef
|
|
|
|
|
2017-12-09 19:53:12 +01:00
|
|
|
define _get_binary
|
2019-12-04 09:32:23 +01:00
|
|
|
$(WGET) --timeout 30 --no-check-certificate $1 -O $2 || exit 1
|
2017-12-09 19:53:12 +01:00
|
|
|
endef
|
|
|
|
|
2019-11-12 04:20:54 +01:00
|
|
|
build: _build_prepare _build_db _build_portal _build_core _build_jobservice _build_log _build_nginx _build_registry _build_registryctl _build_notary _build_clair _build_clair_adapter _build_redis _build_migrator _build_chart_server
|
2017-12-09 19:53:12 +01:00
|
|
|
|
2016-10-19 08:32:00 +02:00
|
|
|
cleanimage:
|
2016-10-26 07:46:22 +02:00
|
|
|
@echo "cleaning image for photon..."
|
2018-09-05 09:48:16 +02:00
|
|
|
- $(DOCKERRMIMAGE) -f $(DOCKERIMAGENAME_PORTAL):$(VERSIONTAG)
|
2018-09-12 08:38:29 +02:00
|
|
|
- $(DOCKERRMIMAGE) -f $(DOCKERIMAGENAME_CORE):$(VERSIONTAG)
|
2016-10-19 08:32:00 +02:00
|
|
|
- $(DOCKERRMIMAGE) -f $(DOCKERIMAGENAME_JOBSERVICE):$(VERSIONTAG)
|
|
|
|
- $(DOCKERRMIMAGE) -f $(DOCKERIMAGENAME_LOG):$(VERSIONTAG)
|
2019-10-10 09:29:50 +02:00
|
|
|
|
2016-10-19 08:32:00 +02:00
|
|
|
.PHONY: clean
|
|
|
|
clean: cleanimage
|
|
|
|
|