X

How to setup and use Docker machine on remote server

In some cases, you may want to run the Docker build using the extra resources.
Instead of hogging the laptop RAM and CPU while it is building the docker images.

With docker machine, you are now able to do it pretty much quickly.

 

Here are the step:

 

  1. Install and run VPN server on the remote machine (optional)
  2. Install and run the docker daemon in the remote machine
  3. Connect to its port using VPN port (allow firewall setting to the VPN server port)
    1. Otherwise, you will have to open the docker port itself and expose on public IP before can connect it
  4. Add docker context with the remote docker machine, and set to use this context
  5. Run docker build and the rest of the build command using the context
  6. Run docker-compose using context to test
  7. Run SSH port forward to local port to access the serving port

 

That’s it!

 

Namran Hussin: a soft spoken guy... with exceptional interest in computers and technology. I love to learn new thing and also love to break thing for the sake of learning.. but I do abide to the self-imposed limitation or certain thing such as social thing in life, thing can be done and thing that must be avoided at whatever cost such as drug,illegal tracking, smoke,illicit activity..etc.muahahaha let's share what we had in this short term of the life.! make it worth of the living.~
Related Post
Leave a Comment