Skip to content

Commit 87d70e9

Browse files
committed
Add Docker pull instructions from GHCR to documentation
- Add detailed instructions for pulling images from GitHub Container Registry - Include authentication steps for private repositories - Add examples with actual repository paths and tags - Enhance CI/CD section with image location and pull commands
1 parent e24bec0 commit 87d70e9

File tree

1 file changed

+64
-4
lines changed

1 file changed

+64
-4
lines changed

README.md

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,29 @@ A Python script to sync Microsoft Intune managed devices into Snipe-IT, with the
5252

5353
### Docker Installation
5454

55-
Pull the pre-built image from GitHub Container Registry:
55+
**Pull the pre-built image from GitHub Container Registry:**
5656

5757
```bash
58+
# Pull the latest image
5859
docker pull ghcr.io/yourorg/intune2snipe:latest
5960
```
6061

61-
Or build locally:
62+
**Note:** Replace `yourorg/intune2snipe` with your GitHub organization/username and repository name. The image path format is `ghcr.io/<org-or-username>/<repo-name>:<tag>`.
63+
64+
**For private repositories**, authenticate first:
6265

6366
```bash
67+
# Login to GHCR using your GitHub Personal Access Token
68+
# Create a PAT with 'read:packages' permission at: https://github.com/settings/tokens
69+
docker login ghcr.io -u YOUR_GITHUB_USERNAME
70+
# Enter your GitHub Personal Access Token when prompted
71+
```
72+
73+
**Or build locally:**
74+
75+
```bash
76+
git clone https://github.com/yourorg/intune2snipe.git
77+
cd intune2snipe
6478
docker build -t intune2snipe:latest .
6579
```
6680

@@ -170,7 +184,31 @@ This project includes a `Dockerfile` and Kubernetes manifest (`k8s/cronjob.yaml`
170184

171185
### Docker
172186

187+
**Pull the image from GitHub Container Registry:**
188+
189+
```bash
190+
# Pull the latest image
191+
docker pull ghcr.io/yourorg/intune2snipe:latest
192+
193+
# Or pull a specific tag/version
194+
docker pull ghcr.io/yourorg/intune2snipe:v1.0.0
195+
docker pull ghcr.io/yourorg/intune2snipe:main
196+
```
197+
198+
**Note:** If the image is private, you'll need to authenticate first:
199+
200+
```bash
201+
# Login to GHCR using your GitHub Personal Access Token (PAT)
202+
# Create a PAT with 'read:packages' permission at: https://github.com/settings/tokens
203+
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
204+
205+
# Or login interactively
206+
docker login ghcr.io -u YOUR_GITHUB_USERNAME
207+
# Enter your GitHub Personal Access Token when prompted
208+
```
209+
173210
**Run with pre-built image:**
211+
174212
```bash
175213
docker run --rm \
176214
-e AZURE_TENANT_ID="<your-tenant-id>" \
@@ -184,7 +222,12 @@ docker run --rm \
184222
```
185223

186224
**Build and run locally:**
225+
187226
```bash
227+
# Clone the repository
228+
git clone https://github.com/yourorg/intune2snipe.git
229+
cd intune2snipe
230+
188231
# Build the image
189232
docker build -t intune2snipe:latest .
190233

@@ -281,9 +324,26 @@ After pushing to the repository, your images will be available at:
281324
ghcr.io/<your-github-org>/<your-repo-name>:<tag>
282325
```
283326

327+
For example, if your repository is `github.com/myorg/intune2snipe`, the image would be:
328+
```
329+
ghcr.io/myorg/intune2snipe:latest
330+
ghcr.io/myorg/intune2snipe:main
331+
ghcr.io/myorg/intune2snipe:v1.0.0
332+
```
333+
334+
**Pull the image:**
335+
```bash
336+
# Pull latest
337+
docker pull ghcr.io/<your-github-org>/<your-repo-name>:latest
338+
339+
# Pull specific tag
340+
docker pull ghcr.io/<your-github-org>/<your-repo-name>:v1.0.0
341+
```
342+
284343
**Viewing Images:**
285-
- Go to your repository → **Packages** section
286-
- Or visit: `https://github.com/orgs/<your-org>/packages/container/<your-repo-name>`
344+
- Go to your repository → **Packages** section (right sidebar)
345+
- Or visit: `https://github.com/<your-org>/<your-repo>/pkgs/container/<your-repo-name>`
346+
- View all available tags and pull commands on the package page
287347

288348
### Dependabot
289349

0 commit comments

Comments
 (0)