Category Archives: Docker

Firebase login in docker toolbox

Posted on by 4 comments

The exercise is trying to resolve the Firebase login callback issue in docker; my system setup is VirtualBox with Docker toolbox.
Let’s start with the login command:

Then I copy the long URL, and paste it to a browser window in host machine, allow the FirebaseCLI access, the authentication is working fine, but failed at callback. That is due to the setup is docker with VirtualBox, so localhost is not same as the docker machine, which in my case is 192.168.99.100, and HTTP://localhost:9005 is not accessible. If I try to modified the URL with replacing the localhost with docker machine IP, a 400 OAuth2 error will be returned.

After some trying, and managed to get it working with steps below,

  • Copy the long URL and paste it to a browser window in host machine
  • Follow the steps to complete the authentication
  • The callback failed with URL HTTP://localhost:9005?state=…..
  • Replace localhost with the docker machine IP in the URL and click enter

Now you will receive a successful message in the browser window and docker terminal.

Category: Docker