Category Archives: Docker

Install Docker on Ubuntu 18.04

Posted on by 0 comment

Docker is very popular tool which creates container in the application development, same software, configuration will be packaged and used for testing and production.

In this exercise, we will install docker in a Ubuntu server

Check Ubuntu version

lsb_release -a

No LSB modules are available.
 Distributor ID: Ubuntu
 Description:    Ubuntu 18.04.3 LTS
 Release:        18.04
 Codename:       bionic

Update package

sudo apt-get update 

Remove old version if exists

sudo apt-get remove docker docker-engine

Install Docker

sudo apt install 

Auto start Docker service

sudo systemctl start docker
sudo systemctl enable docker

Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
 Executing: /lib/systemd/systemd-sysv-install enable docker

Check Docker version

docker -v
Docker version 18.09.7, build 2d0083d

Hello world

docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.
Category: Docker

Firebase login in docker toolbox

Posted on by 42 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, 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