Run Osintgram Headlessly with Docker
Containerising Osintgram keeps dependencies isolated and easy to schedule.
Build and run
docker build -t osintgram .
docker run --rm -it -v "$PWD/config:/app/config" -v "$PWD/output:/app/output" osintgram targetuser --command info
Multiple commands
docker run --rm osintgram targetuser --command followers,hashtags
Environment variables
docker run --rm -e IG_USERNAME=researcher -e IG_PASSWORD=secret osintgram targetuser --command info
Keep the credentials outside the image.
Diagram
flowchart LR A[Cron job] --> B[Docker run] B --> C[Osintgram CLI] C --> D[Mounted output/]
Use --network host
only when you need local proxies; otherwise the default bridge mode provides isolation.