1

I pulled a python image from hub images doing docker pull python:3.9-alpine.

Then i tried to launch the container from this image doing like docker run -p 8888:8888 --name test_container d4d6be1b90ec. The container is never up. with docker ps i didn't find it.

Do you know why please?

Thank you,

1 Answer 1

1

Your container is not launched because there is no server(nginx,apache etc..) to point, there is only python and the necessary dependencies.

In order to run that image you can try the following command:

docker run --name test_python -it [id_image]

And if you open another terminal and use docker ps you will see that the container is up.

Sign up to request clarification or add additional context in comments.

7 Comments

If my answer was helpful could you accept it pls?
Thank you ! will try it .. can you suggest to me an image to run python, java, psycopg2, jupyter, docker etc... pleasE?
@druaedo to use python 3.9 ! have you an idea please?
Could you specify what is the architecture of your application? One of the objective of docker is to modularize the services of and application. Having multiple services in a container(for example: js and mysql in a same container) is an antipatern.
read data from different databases (informix, mysql, postgres) treat this data with pyhon and java then write on postgres databases and then use airflow to manage tasks. Hope that im clear. Thank you
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.