Home:ALL Converter>Running a simple Python Container on Ubuntu

Running a simple Python Container on Ubuntu

Ask Time:2022-09-04T05:41:10         Author:edge selcuk

Json Formatter

So I have a directory that just includes a Dockerfile. I want to experiment with the poetry package in python. So I do not want any python files to be inside it initially because I want to create a poetry project from scratch inside the directory. So ı went ahead and built the image called local:python3.10ubuntu for it. When I ran the container for it with the command docker run --name py3.10ubuntu local:python3.10ubuntu I can see that the docker container was not running why is that and how would I be able to run it. when I try to see the docker logs for the container it wouldnt show anything as well. Besides starting the container how would I be able to run the command shell within the container and run python files?

Directory Structure:

.
└── Dockerfile

Dockerfile contents

FROM python:3.10-slim
RUN pip install --no-cache-dir poetry

Author:edge selcuk,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/73595564/running-a-simple-python-container-on-ubuntu
linux_beginner :

ughhhh?\ndocker run -ti <your_image>\n\nor if you want see more than python itself:\ndocker run -ti --entrypoint /bin/bash <your_image>\n",
2022-09-04T00:03:37
yy