Variables

VariableDescription
BASEIMAGEContainer base image, default: photon
DEVFLAGBuild model flag, default: dev
COMPILETAGCompile model flag, default: compile_normal (local golang build)
GOBUILDIMAGEGolang image to compile harbor go source code.
NOTARYFLAGWhether to enable notary in harbor, default:false
HTTPPROXYClarity proxy to build UI.

Targets

TargetDescription
allprepare env, compile binaries, build images and install images
prepareprepare env
compilecompile ui and jobservice code
compile_portalcompile portal code
compile_corecompile core binary
compile_jobservicecompile jobservice binary
buildbuild Harbor docker images (default: using build_photon)
build_photonbuild Harbor docker images from Photon OS base image
installcompile binaries, build images, prepare specific version of compose file and startup Harbor instance
startstartup Harbor instance
downshutdown Harbor instance
package_onlineprepare online install package
package_offlineprepare offline install package
pushimagepush Harbor images to specific registry server
clean allremove binary, Harbor images, specific version docker-compose file, specific version tag and online/offline install package
cleanbinaryremove ui and jobservice binary
cleanimageremove Harbor images
cleandockercomposefileremove specific version docker-compose
cleanversiontagremove specific version tag
cleanpackageremove online/offline install package
versionset harbor version

Examples

Build and run harbor from source code

  1. make install GOBUILDIMAGE=golang:1.14.5 COMPILETAG=compile_golangimage NOTARYFLAG=true

Package offline installer

  1. make package_offline GOBUILDIMAGE=golang:1.14.5 COMPILETAG=compile_golangimage NOTARYFLAG=true

Start harbor with notary

  1. make -e NOTARYFLAG=true start

Stop harbor with notary

  1. make -e NOTARYFLAG=true down