Docker image updates visualized and centralized in Notion.
- Get Images from the Docker Socket and send Updates to Notion
- Exclude Images
- Set a specific sync interval
Via Docker Compose:
version: '3.8'
services:
app:
image: skyfay/docker-to-notion:latest
container_name: docker-to-notion
hostname: your-hostname # Not needed if you use linux and /etc/hostname
environment:
- NOTION_API_KEY=your_notion_api_key
- NOTION_DATABASE_ID=your_database_id
- EXCLUDED_IMAGES=["skyfay/docker-to-notion"] # [] = exclude no images, ["image", "image2"] = exclude multiple images
- SYNC_INTERVAL=3600 # the lowest value is 300 / 5 minutes
# If you have images github container registry (ghcr)
- GITHUB_TOKEN=your_github_token # https://github.com/settings/tokens only need read:packages permission
# If you have images with aws container registry (ecr)
- AWS_ACCESS_KEY=your_aws_access_key
- AWS_SECRET_KEY=your_aws_secret_key
- AWS_REGION='eu-central-1'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/hostname:/etc/hostname:ro # Linux only instead use docker hostname above
restart: unless-stopped
Via Docker CLI:
docker run -it --rm \
--name docker-to-notion \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/hostname:/etc/hostname:ro \
-e NOTION_API_KEY="your_notion_api_key" \
-e NOTION_DATABASE_ID="your_database_id" \
-e CHECK_INTERVAL=3600 \
-e GITHUB_TOKEN="your_github_token" \
-e EXCLUDED_IMAGES='["skyfay/docker-to-notion"]' \
skyfay/docker-to-notion:latest
Create a Notion Database and add the following columns:
Type | Name |
---|---|
Title | Repository |
Text | Server |
Text | Tag |
Text | Registry |
Text | Image ID |
Text | Size |
Text | Update available |
It doesn't matter in which order, but the names and types must match exactly.
I recommend optionally adding “Last edited time” by Notion.
First of all go to your Notion intigrations: https://www.notion.so/profile/integrations
Visit Notion via Web Browser: https://www.notion.so/login