R
R
rd1002021-11-20 15:38:05
Docker
rd100, 2021-11-20 15:38:05

If the project has a docker file, can I run it on any OS?

Tell me, there is a project where its installation requires only a Linux system or severe problems with Windows.
I found a docker file in it
. It turns out that if I have docker installed, then I can run it through docker, where it will install everything and work without problems?
Or what is docker for?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman Mirilaczvili, 2021-11-20
@rd100

Dockerfile can have instructions for building both Linux and Windows containers. To run a container, you need to make sure that the hardware architecture of the container and OS match. It happens that containers are built for many architectures at the same time.
Linux containers can be built and run on Linux, MacOS, Windows. Windows containers, if I'm not mistaken, can only be run on Windows.
So if we are talking about a Linux container, then, as a rule, this is the amd64 architecture. This means that any Linux with an amd64 architecture processor (server/desktop) is suitable for running the container.
Before starting the container, the missing layers are automatically installed. It is customary to run a single process in a container (sometimes a process supervisor).
For example, you need 2 containers: an old PHP 5 application and a Mysql 5.5 server. Then the Dockerfile of the container application describes what image the application is based on (for example, the version of the framework) and then the developer builds the container using Docker and launches it.
Typically, to run multiple containers, you write a script to run in Docker Compose, which describes the various containers needed for the application to work and how they access each other.
And, in general, there are many answers in Habr Q&A and many articles on the Internet.

A
Alexander Karabanov, 2021-11-20
@karabanov

Probably yes.

D
Drno, 2021-11-20
@Drno

Well, for this, in general, the docker was also invented ... if you deploy it on Linux, it should be no problem at all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question