Namran Hussin Cloud Computing,SoftwareDevelopment How to setup and use Docker machine on remote server

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!

 

79 thoughts on “How to setup and use Docker machine on remote server”

  1. I like the helpful info you provide in your articles. I will bookmark your blog and check again here frequently. I’m quite certain I’ll learn many new stuff right here! Good luck for the next!

  2. Hi there, just became alert to your blog through Google, and found that it is truly informative. I’m going to watch out for brussels. I will be grateful if you continue this in future. Many people will be benefited from your writing. Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post