In this tutorial, we will walk you through the process of using a private GitHub Container Registry (GHCR) with MedStack Control. By following these steps, you will be able to deploy your services using private images from the GitHub Container Registry.
Step 1: Create a Personal Access Token (PAT) in GitHub
To access your private images in the GitHub Container Registry, you need to generate a Personal Access Token (PAT) in GitHub. Please follow the steps below to generate a PAT:
- Login to your GitHub account.
- Click on your profile picture and navigate to 'Settings'.
- From the left sidebar, select 'Developer settings'.
- Click on 'Personal access tokens' and then click on the 'Generate new token' button.
- Provide a name for your token and select the 'read:packages' scope. You can also choose other scopes based on your requirements.
- Click on the 'Generate token' button.
- Copy the generated token and ensure you keep it safe. You will need this token in the following steps.
Step 2: Add a new registry in MedStack Control
To add a new registry in MedStack Control, perform the following steps:
- Login to your MedStack Control dashboard.
- Click on 'Registries' from the left sidebar.
- Click on the 'Add registry' button.
- Enter a name for the registry and select 'Docker Registry' as the registry type.
- In the 'Registry URL' field, enter 'ghcr.io'. This URL represents the GitHub Container Registry.
- In the 'Username' field, enter your GitHub username.
- In the 'Password' field, enter the PAT generated in Step 1.
- Click on the 'Save' button.
Step 3: Add a new service in MedStack Control
To add a new service in MedStack Control, follow these steps:
- Click on 'Services' from the left sidebar.
- Click on the 'Add service' button.
- Enter a name for the service.
- In the 'Image' field, enter the full path to your private image in the GitHub Container Registry. For example, if your image is named 'myapp' and is in the 'myorg' organization, the full path would be 'ghcr.io/myorg/myapp'.
- Click on the 'Save' button.
Congratulations! You have successfully deployed your service using a private image from the GitHub Container Registry in MedStack Control.
If you encounter any issues or require further assistance, please reach out to our support team for guidance.