Skip to content

Add Docker support and improve Instagram login flow#4

Open
dave-73 wants to merge 1 commit into
kaifcodec:mainfrom
dave-73:main
Open

Add Docker support and improve Instagram login flow#4
dave-73 wants to merge 1 commit into
kaifcodec:mainfrom
dave-73:main

Conversation

@dave-73

@dave-73 dave-73 commented May 20, 2026

Copy link
Copy Markdown

Adds containerized execution with Docker Compose and improves login reliability.

Changes:

  • Add Dockerfile and docker-compose.yml for isolated execution
  • Run container as a non-root user and persist runtime data under ./data
  • Ignore cookies, local data, and generated exports
  • Use instagrapi for current Instagram login and 2FA support
  • Add fallback for importing an authenticated Cookie header
  • Add httpx[http2] dependency because the scraper enables HTTP/2
  • Update README with Docker and authentication notes

Validation:

  • python -m py_compile main.py login.py
  • docker compose config
  • docker compose build

@kaifcodec

Copy link
Copy Markdown
Owner

@dave-73 Thank you for opening this PR, I was little bit busy on my other repositories so I forgot to take a look on this.

I see 280 additions with this PR, can you confirm that the login works as expected when you tested it yourself?

@dave-73

dave-73 commented Jun 9, 2026

Copy link
Copy Markdown
Author

Thanks for taking a look!

Yes, I tested it locally. The Docker setup builds and runs correctly, and authentication works in my testing. Instagram’s 2FA/login flow can change or behave differently depending on the account, so I added the Cookie header fallback as a reliable alternative.

The cookie-based authentication has worked consistently for me, and I’m currently using it without issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants