Can I run docker containers on different machines

0 votes

I've setup several docker containers for my application:

  1. container for mysql
  2. container for application server (tomcat7)
  3. container for nginx
  4. container for python tornado application

On my local machine, using docker-machine, I've tried all these containers and them interactive with each other. I created one virtualbox machine with boot2linux and setup all these containers on it.

Now, for production I am going to run each one of these containers on a separate server. Is there something docker provides to quickly/easily do this? Or should I set up docker on each server, copy relevant images to that server, and then start docker-images manually on all servers?

Oct 17, 2018 in Kubernetes by Nilesh
• 7,060 points
1,719 views

2 answers to this question.

0 votes

Yes, but you should also:

  • create the relevant libnetworks in order for your containers to be registered in them
  • create as first container a KV one (Key-Value: Consul, etcd, Zookeeper, ...) that will monitor each containers in each network(/machine), allowing them to see each others.
    Note: you might want to use a docker 1.10 for adding a network-scoped alias to your containers.
answered Oct 17, 2018 by lina
• 8,220 points
0 votes
Docker defines a format for bundling an application and all its dependencies into a single object called a container. This container can be transferred to any Docker-enabled machine. The container can be executed there with the guarantee that the execution environment exposed to the application is the same in development, testing, and production. LXC implements process sandboxing, which is an important pre-requisite for portable deployment, but is not sufficient for portable deployment. If you sent me a copy of your application installed in a custom LXC configuration, it would almost certainly not run on my machine the way it does on yours. The app you sent me is tied to your machine’s specific configuration: networking, storage, logging, etc. Docker defines an abstraction for these machine-specific settings. The exact same Docker container can run - unchanged - on many different machines, with many different configurations.
answered Aug 26, 2020 by Pistle
• 1,000 points

Related Questions In Kubernetes

0 votes
2 answers

How can I access a service installed on Kubernetes from anywhere?

if u want to directly want to ...READ MORE

answered Jul 26, 2020 in Kubernetes by Akash Gupta
1,318 views
0 votes
2 answers

run private docker images on Google Container Engine

run docker login on minions before starting.  ...READ MORE

answered Aug 30, 2018 in Kubernetes by Nilesh
• 7,060 points
878 views
+1 vote
4 answers

Can I set ulimit for containers in k8s?

You can either modify them via UserData ...READ MORE

answered May 7, 2019 in Kubernetes by Inayat
18,726 views
0 votes
1 answer

How do I run kubernetes on AWS

There are two main ways to use ...READ MORE

answered Oct 26, 2018 in Kubernetes by Kalgi
• 52,350 points
769 views
+2 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

Using REST API I cannot connect SonarQube to JIRA 7

The JIRA Plugin is not compatible with JIRA 7 ...READ MORE

answered Oct 17, 2018 in Kubernetes by lina
• 8,220 points

edited Nov 13 by Khan Sarfaraz 1,254 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP