Docker Community Forums

Share and learn in the Docker community.

Very Newbe question


#1

Hi,
As I’m new to Docker technology, I have a basic question:
Let’s say I need the docker to run my app and several heavy pre-requisities, such as Office, ESRI/ArcGIS, Matlab, etc.
I assume I should write the pre-requisites in the docker file.
The questions are:

  1. After building it, does the new image contains these apps?
  2. Should the pre-requisites be installed on the destination machine prior to running the container?

10x


#2

A container (the runtime instance of the image) is not a vm. The intention of a container is to encapsulate a service (~=an application) and its depencies. It is not the docker way to put all your services in a single image.

Your Dockerfile needs to cover how the application and its depencies are installed and configured. Also you need to take care of poviding an entrypoint script that deals with pre-application-start tasks during the container start.

An entrypoint script typicaly takes care of fixing permissions (if you use a supervisor like supervisord, s6-overlay, tiny or any other), modifiying configuration files based on passed environment variables or wait for services outside the container (e.g. databases in other containers or as a standalone service) to become accessible.

There is no need to install anything else than the docker engine. Though, getting aquainted with the documentation on how to write a Dockerfile helps a lot :slight_smile: It is neither complicated, nor does it takes a long time to read it.

Docker is a good fit for services that do not require a Desktop UI. If i see your list of pre-reqs i am affraid that you actualy are trying to dockerize Desktop applications… I am not saying that it is impossible to dockerize those, but they are pretty restricted on where and how they can be operated. I dockerized some Linux Applications that required a X-Server myself… trust me, it is not the easiest take on learning how to dockerize applications .

If your application is a headless service or a webapplication then things should be quite straigt forward.


#3

Thank you for the answer.

  1. Those pre-reqs i’ve stated were a bad example… but if I do need an heavy server app, should it be pre-installed on the destination machine or should it be included in the image?
  2. How could they say that containers solve the phrase “It works on my machine”?
    who says the destination OS on custumers labs is the same as mine?
    I believe that each one of us has at least a diffenernt set of OS updates.
    thanks.

#4

How about learning about docker basics first? see: https://container.training/intro-selfpaced.yml.html


#5

Sure :slight_smile:
Thank you