1

I want to ask, if I have one folder that contains the application server (Axis2, Tomcat, WSO2, mongodb, and jms-consumer) What can be used as a container?

Is Docker as an application installer? Which classifies the entire application so 1 is then used as installer file, for example: server.exe for windows, server.deb for ubuntu

Could help to explain it?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Yuday
  • 4,171
  • 4
  • 16
  • 23

1 Answers1

2

Docker as an application installer?

No, docker is a a platform which manages containers (isolated user/process/disk machines running with the host kernel), around building, shipping and running (Containers as a Service).

The best practice is to isolate each part of your global service in its own container, both because of the PID1 zombie reaping issue (detailed in "Use of Supervisor in docker"), but also in term of ease of management and update.
If each component only represents a Tomcat, a MongoDB, a..., each one is easier to manage/debug, instead of having one giant container.
Also you can stop/update one without necessarily ipacting all the other ones.

The installation-like part is rather the description of your environment (both in term of OS and of applications you want to add to a container) with the Dockerfile: a description of what your environment will need to run.
That helps building an image (sort of archive of all the files you need), from which you docker run a container.

Right now, those containers only runs as Linux machines on Linux kernel hosts (or on Windows, through a Linux VM).
You don't have yet pure Windows images/containers that runs on Windows (it is in progress, with Windows Server 2016).


So can you just take what you have in one giant folder and put it in a docker container?

Not directly. The goal of Dockerfile is to describe how you would install what you need.
Then you docker build, and from the image you get, you docker run.

But in order for docker to manage correctly the lifecycle of that container, it is best if the container is limited to one process (instead of trynig to run everything like a webapp server, a mongodb, and so on in the same container space)

That means:

  • describing in separate Dockerfile (building separate images) for each of the components of your system
  • running those containers in a way they see each others and communicate with each others.

You have an example of a complex multi-component system in my project: b2d.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Dapat membantu saya untuk menjelaskan secara lebih rinci dan mendasar Docker? Penjelasan langsung dari Anda, karena aku benar-benar baru untuk Docker. – Yuday Nov 24 '15 at 08:08
  • @YudiDwiyanto sorry, the goal of Stack Overflow is to avoid direct contact (because they don't scale well) and allow for helping more than just the one asking the question (other readers as well). Don't hesitate to edit your question with more specific points that you want to know about docker. I will complete the answer. – VonC Nov 24 '15 at 08:11
  • @YudiDwiyanto I have added the link to a project of mine which illustrates that multiple-component approach. – VonC Nov 24 '15 at 08:15
  • Okay sir, So here goes, my need is to know more details Docker One of them, such as the question above .. For example, I want to make Container Container 1, contain postgresql as database applications, and Container 2, contains the application server (Axis2, Tomcat, WSO2, MongoDB, and Jms-consumer) Can be given guidance from you? – Yuday Nov 24 '15 at 08:18
  • @YudiDwiyanto I would recommend not putting everything in Container2. Typically, mongodb is in its own container (see this Docker tutorial: https://docs.docker.com/engine/examples/mongodb/). More generally, have *first* a look at the doc (https://docs.docker.com/windows/started/): following that tutorial will give you a more precise idea of what you can actually *do* with docker. – VonC Nov 24 '15 at 08:27