Do you need python installed to build a Docker image?

Asked

Viewed 30 times

0

On the Docker website, examples of build with Python, Java, Go, Node.js(javascript) are given and they are indicated to have previously installed them.

What do I see, I have to have the language installed in order to create the image by Dockerfile? The objective would not be to clean up the environment with these types of facilities?

  • 1

    You can consider Docker as a "lightweight virtual machine". It is lighter than a conventional VM because it makes use of the host kernel, and usually runs a single process per container. Outside the kernel, the container image needs to have the full environment installed: base libraries, programming language Runtime and frameworks.

  • "they shall be indicated that they have been installed in advance", could point out where this is said?

  • On the site is shown to complete the tutorial that you need to install Python, Docker and a Text Editor. And in Dockerfile there are Pip commands for example. https://docs.docker.com/language/python/build-images/#Overview

  • If I understand correctly, the local installation is just for testing the application before putting it on the Docker, to make sure it’s working first, otherwise not working on the Docker, you would not know if it is problem with the configuration used in the container or if it is error in the application itself.

  • @Woss my understanding is also this, the entire development cycle is done in the local environment (outside of the Docker), so the steps of compiling, developing, debugging and testing are done outside the Docker. After the whole cycle would enter the Docker. Perhaps what you mean by depollution would be for example to mock external dependencies like a relational or non-relational database, messaging services, redis, aws (with localstack), proxy/proxy reverse services etc.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.