Docker Community Forums

Share and learn in the Docker community.

Newbie question - application for container


(Greengil) #1

Can I create a container for any application, any software, including any custom application software?

What about data? Can I create a container just to place filesystem files there, and then be able to move to other hosts, bring up the data container, and be able to use it? The reason for this is, we want to be able to make a copy of the data in a container and move it around quickly. Is this the right thing to do? If not, what’s the right way?


(Andy Rothfusz) #2

##Custom Apps
Yes, you can create a container for any software that would run on the host’s kernel plus the root file system you have in the container. We usually run headless services inside containers, but even GUI applications are possible.

##Data
In general, the copy-on-write file systems used in containers are not efficient for managing data that changes a lot. If you’re only working with moderate amounts (<1GB) of static (read-only) data, then it can make sense to include this data within the container.

If you have data that needs to be modified then it would be better to use a separate service, outside of containers, to store it. You could run the database software itself within the container, but the filesystem it stores the data on should be outside the container so that the filesystem isn’t copy-on-write.


(Greengil) #3

Thank you for the quick response!

I will be digging in and learning Docker inside out, but help me understand for now – Is it hard to create a container images for some software application? For example, how hard is it to create a container image to run Websphere, JIRA, an in-house, complex web application? I know many of these (like Oracle, tomcat, etc.) are pre-built already and I just need to download and use it, but just want to get a sense on how easy it is if I am to do it myself. Thanks!


(Andy Rothfusz) #4

If you can install and configure the software on your own machine or network of machines, then it is not much different to install and configure them inside a container. If you don’t know how to install and configure them on your own machine or network, then containers will not make it any easier.