Variables

VariableDescription
BASEIMAGETAGThe tag for base image, default:dev
VERSIONTAGThe tag for harbor image, default:dev
DEVFLAGBuild model flag, default: true
GOBUILDIMAGEGolang image to compile harbor go source code.
NOTARYFLAGWhether to enable notary in harbor, default:false
TRIVYFLAGWhether to enable trivy in harbor, default:false
CHARTFLAGWhether to enable chartmuseum in harbor, default:false
HTTPPROXYClarity proxy to build UI.

Targets

TargetDescription
allprepare env, compile binaries, build images and install images
prepareprepare env
compilecompile core and jobservice code
compile_corecompile core binary
compile_jobservicecompile jobservice binary
buildbuild Harbor docker images
build_base_dockerbuild Harbor docker base images
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
cleanallremove binary, Harbor images, specific version docker-compose file, specific version tag and online/offline install package
cleanbinaryremove core and jobservice binary
cleanimageremove Harbor images
cleandockercomposefileremove specific version docker-compose
cleanpackageremove online/offline install package

Examples

Build and run harbor from source code

  1. make install NOTARYFLAG=true

Package offline installer

  1. make package_offline NOTARYFLAG=true

Start harbor with notary

  1. make -e NOTARYFLAG=true start

Stop harbor with notary

  1. make -e NOTARYFLAG=true down