Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
In Harbor, un progetto funge da unità logica per organizzare e gestire una raccolta di immagini container. Fornisce un modo per raggruppare gli artefatti correlati
e applicare policy, controlli dell'accesso e regole di replica specifici
all'intera raccolta. Le immagini non possono essere inviate o estratte in Harbor prima della creazione di un progetto.
Prima di iniziare
Per creare progetti Harbor, devi disporre dei ruoli di identità e accesso necessari:
Autore progetto Harbor: ha accesso alla gestione della risorsa HarborInstanceProject nel proprio progetto. Chiedi all'amministratore IAM dell'organizzazione di concederti il ruolo
Creatore progetto Harbor (harbor-project-creator).
Prima di creare progetti Harbor, devi accedere all'interfaccia utente di Harbor per consentire a Harbor di riconoscere la tua identità. Se questo passaggio viene omesso, la creazione del progetto Harbor potrebbe bloccarsi con un falso positivo nella console GDC.
Crea un progetto Harbor
Crea un progetto Harbor utilizzando la console GDC o gcloud CLI.
Console
Nella console GDC, segui questi passaggi:
Fai clic sul link Harbor Container Registry nella sezione CI/CD del menu di navigazione.
Fai clic su Crea un progetto Harbor.
Inserisci il nome del progetto.
(Facoltativo) L'analisi delle vulnerabilità è attivata per impostazione predefinita. Per disattivare l'analisi automatica delle vulnerabilità per i progetti Harbor, fai clic sul pulsante di attivazione/disattivazione Attiva l'analisi delle vulnerabilità per il progetto. Per ulteriori informazioni, consulta la sezione Eseguire la scansione per rilevare vulnerabilità.
Fai clic su Crea.
Viene visualizzato un messaggio di conferma che indica che il progetto è stato creato correttamente.
Dopo aver creato il progetto Harbor, accedi alla relativa UI per verificare di poterlo visualizzare.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eHarbor projects are essential for organizing and managing container images, as they group related artifacts and allow for the application of specific policies and access controls.\u003c/p\u003e\n"],["\u003cp\u003eTo create Harbor projects, users must have the Harbor Project Creator role (\u003ccode\u003eharbor-project-creator\u003c/code\u003e) and sign in to the Harbor UI beforehand to ensure proper identity recognition.\u003c/p\u003e\n"],["\u003cp\u003eHarbor projects can be created using either the GDC console, where users can navigate to the Harbor Container Registry and create projects, or the \u003ccode\u003egdcloud\u003c/code\u003e CLI with the \u003ccode\u003egdcloud harbor harbor-projects create\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eVulnerability scanning is enabled by default when creating a project, however, it can be disabled by clicking the appropriate toggle in the GDC console, or left on if you desire to scan for vulnerabilities.\u003c/p\u003e\n"],["\u003cp\u003eAfter a Harbor Project is created it is recommended to sign in to the Harbor UI to confirm that the project can be viewed.\u003c/p\u003e\n"]]],[],null,["# Create Harbor projects\n\nIn Harbor, a project serves as a logical unit for organizing and managing a\ncollection of container images. It provides a way to group related artifacts\ntogether and apply specific policies, access controls, and replication rules to\nthe entire collection. Images cannot be pushed or pulled to Harbor before a\nproject is created.\n\nBefore you begin\n----------------\n\nTo create Harbor projects, you must have the necessary identity and access\nroles:\n\n- Harbor Project Creator: has access to manage the `HarborInstanceProject` resource in their project. Ask your Organization IAM Admin to grant you the Harbor Project Creator (`harbor-project-creator`) role.\n- Before creating Harbor projects, you must sign in to the Harbor UI first for Harbor to recognize your identity. If this step is missed, the Harbor project creation might be stuck with a false positive in the GDC console.\n\nCreate a Harbor project\n-----------------------\n\nCreate a Harbor project using the GDC console or the gdcloud CLI. \n\n### Console\n\nIn the GDC console, follow these steps:\n\n1. Click the **Harbor Container Registry** link in the **CI/CD** section in the navigation menu.\n2. Click **Create a Harbor project**.\n3. Enter the name of the project.\n4. Optional: Vulnerability scanning is enabled by default. To disable automatic vulnerability scanning for Harbor projects, click the **Enable vulnerability scanning for the project** toggle. For more information, see [Scan for vulnerabilities](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/scan-vulnerabilities).\n5. Click **Create**.\n6. A confirmation message appears stating your project is created successfully.\n7. After your Harbor project is created, sign in to the Harbor UI to confirm that you can view the Harbor project.\n\n### CLI\n\nCreate the Harbor project: \n\n gdcloud harbor harbor-projects create \u003cvar translate=\"no\"\u003eHARBOR_PROJECT\u003c/var\u003e \\\n --project=\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e \\\n --instance=\u003cvar translate=\"no\"\u003eINSTANCE\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eHARBOR_PROJECT\u003c/var\u003e: the name of the Harbor project to create.\n- \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e: the name of the GDC project.\n- \u003cvar translate=\"no\"\u003eINSTANCE\u003c/var\u003e: the name of the instance."]]