I have a Gmail API running in a docker container on raspberry pi. I only access the pi through an SSH session via terminal. It needs to authenticate me as a user. This requires that I go to a webpage and login the first time. How do I open this authenticating session through CLI in a docker container?

All help is appreciated.



1 Answer 1


Assuming you have configured your docker container to share the port. You can use lynx (a text only browser). It can be installed with the following:

sudo apt install lynx

You can then open a web page with:

lynx google.com

There are a number of alternatives to lynx including:

  • w3m
  • links2
  • elinks

There are several other methods of doing this:

  • using a headless browser,
  • programmatically (using curl, or expect)

but overall the text-based browser is likely to be the easiest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.