Answer the question
In order to leave comments, you need to log in
How to work with multiple Dockerfiles in one project?
In continuation to my previous question .
1) I installed Docker and roughly understood how to work with it, but since my project should be able to execute code in different languages => I should have several images.
I'm guessing it should look something like this: The temp
folder will store scripts submitted by users.
Is this structure correct?
2) In theory, to run a script in any language, I only need one image that describes the execution of the script in this language, but in order to execute the file I need every time, when I start the container, I need to somehow transfer the file name there , how to do it?
3) To work with
Docker from Python , I found the docker library , is it worth using it or is it better to run containers in some other way, and if so, which one?
Answer the question
In order to leave comments, you need to log in
Dockerfile for each container is optional. Dockerfile - mostly for specific cases. For example, 80 percent of my containers just use some kind of python: 3.9, and all libraries are mounted into a virtual environment directly at startup.
But if necessary, then put it where it is convenient for you, and connect the directory in the context for the image build.
but in order for the file I need to be executed every time, when I start the container, I need to somehow transfer the file name there, how can I do this?
3) To work with Docker from Python, I found the docker library, is it worth using
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question