Skip to content

Commit 616c1f0

Browse files
committed
feat: switch from Docker Hub to GitHub Container Registry
🏴 Fighting the power! No more $15/month Docker Hub fees. - Use ghcr.io/basicmachines-co/basic-memory for container images - Native GitHub integration with GITHUB_TOKEN (no external secrets) - Update all documentation and examples to use GHCR - Remove Docker Hub description update step (not needed for GHCR) - Completely free solution for public repositories Docker users can now: docker pull ghcr.io/basicmachines-co/basic-memory:latest
1 parent 74847cc commit 616c1f0

File tree

3 files changed

+18
-36
lines changed

3 files changed

+18
-36
lines changed

.github/workflows/docker.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
workflow_dispatch: # Allow manual triggering for testing
88

99
env:
10-
REGISTRY: docker.io
11-
IMAGE_NAME: basicmachines/basic-memory
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: basicmachines-co/basic-memory
1212

1313
jobs:
1414
docker:
@@ -28,12 +28,12 @@ jobs:
2828
with:
2929
platforms: linux/amd64,linux/arm64
3030

31-
- name: Log in to Docker Hub
31+
- name: Log in to GitHub Container Registry
3232
uses: docker/login-action@v3
3333
with:
3434
registry: ${{ env.REGISTRY }}
35-
username: ${{ secrets.DOCKER_USERNAME }}
36-
password: ${{ secrets.DOCKER_PASSWORD }}
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
3737

3838
- name: Extract metadata
3939
id: meta
@@ -59,10 +59,3 @@ jobs:
5959
cache-from: type=gha
6060
cache-to: type=gha,mode=max
6161

62-
- name: Update Docker Hub description
63-
uses: peter-evans/dockerhub-description@v4
64-
with:
65-
username: ${{ secrets.DOCKER_USERNAME }}
66-
password: ${{ secrets.DOCKER_PASSWORD }}
67-
repository: ${{ env.IMAGE_NAME }}
68-
readme-filepath: ./docs/Docker.md

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: '3.8'
66
services:
77
basic-memory:
88
# Use pre-built image (recommended for most users)
9-
image: basicmachines/basic-memory:latest
9+
image: ghcr.io/basicmachines-co/basic-memory:latest
1010

1111
# Uncomment to build locally instead:
1212
# build: .

docs/Docker.md

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ system. This is particularly useful for integrating with existing Dockerized MCP
77

88
### Option 1: Using Pre-built Images (Recommended)
99

10-
Basic Memory provides pre-built Docker images on Docker Hub that are automatically updated with each release.
10+
Basic Memory provides pre-built Docker images on GitHub Container Registry that are automatically updated with each release.
1111

1212
1. **Use the official image directly:**
1313
```bash
@@ -16,15 +16,15 @@ Basic Memory provides pre-built Docker images on Docker Hub that are automatical
1616
-p 8000:8000 \
1717
-v /path/to/your/obsidian-vault:/app/data:rw \
1818
-v basic-memory-config:/root/.basic-memory:rw \
19-
basicmachines/basic-memory:latest
19+
ghcr.io/basicmachines-co/basic-memory:latest
2020
```
2121

2222
2. **Or use Docker Compose with the pre-built image:**
2323
```yaml
2424
version: '3.8'
2525
services:
2626
basic-memory:
27-
image: basicmachines/basic-memory:latest
27+
image: ghcr.io/basicmachines-co/basic-memory:latest
2828
container_name: basic-memory-server
2929
ports:
3030
- "8000:8000"
@@ -293,11 +293,11 @@ For Docker-specific issues:
293293
For general Basic Memory support, see the main [README](../README.md)
294294
and [documentation](https://memory.basicmachines.co/).
295295

296-
## Docker Hub Images
296+
## GitHub Container Registry Images
297297

298298
### Available Images
299299

300-
Pre-built Docker images are available on Docker Hub at [`basicmachines/basic-memory`](https://hub.docker.com/r/basicmachines/basic-memory).
300+
Pre-built Docker images are available on GitHub Container Registry at [`ghcr.io/basicmachines-co/basic-memory`](https://github.com/basicmachines-co/basic-memory/pkgs/container/basic-memory).
301301

302302
**Supported architectures:**
303303
- `linux/amd64` (Intel/AMD x64)
@@ -314,8 +314,8 @@ Docker images are automatically built and published when new releases are tagged
314314

315315
1. **Release Process:** When a git tag matching `v*` (e.g., `v0.13.8`) is pushed, the CI workflow automatically:
316316
- Builds multi-platform Docker images
317-
- Pushes to Docker Hub with appropriate tags
318-
- Updates the Docker Hub repository description
317+
- Pushes to GitHub Container Registry with appropriate tags
318+
- Uses native GitHub integration for seamless publishing
319319

320320
2. **CI/CD Pipeline:** The Docker workflow includes:
321321
- Multi-platform builds (AMD64 and ARM64)
@@ -325,21 +325,10 @@ Docker images are automatically built and published when new releases are tagged
325325

326326
### Setup Requirements (For Maintainers)
327327

328-
To set up Docker Hub integration for this repository:
328+
GitHub Container Registry integration is automatic for this repository:
329329

330-
1. **Create Docker Hub Repository:**
331-
- Repository name: `basicmachines/basic-memory`
332-
- Set as public repository
330+
1. **No external setup required** - GHCR is natively integrated with GitHub
331+
2. **Automatic permissions** - Uses `GITHUB_TOKEN` with `packages: write` permission
332+
3. **Public by default** - Images are automatically public for public repositories
333333

334-
2. **Configure GitHub Secrets:**
335-
```
336-
DOCKER_USERNAME - Docker Hub username
337-
DOCKER_PASSWORD - Docker Hub access token (not password)
338-
```
339-
340-
3. **Generate Docker Hub Access Token:**
341-
- Go to Docker Hub → Account Settings → Security
342-
- Create new access token with Read/Write permissions
343-
- Use this token as `DOCKER_PASSWORD` secret
344-
345-
The Docker CI workflow (`.github/workflows/docker.yml`) will automatically handle the rest.
334+
The Docker CI workflow (`.github/workflows/docker.yml`) handles everything automatically when version tags are pushed.

0 commit comments

Comments
 (0)