Hello Folks.
I’m a linux/python/docker beginner.
I got stucked with reading python variables from keyboard while python script is running in docker.
Example:
python script test.py
print my name
name=input('your name?: ')
print('your name is: ', name)
Dockerfile
FROM python:latest
WORKDIR /home/jaceksiek/PycharmProjects/projekt1/venv
COPY . /home/jaceksiek/PycharmProjects/projekt1/venv
ENTRYPOINT [“python”, “test.py”]
docker image name: test
docker run test outcome:
your name?: Traceback (most recent call last):
File “test.py”, line 3, in
name=input('your name?: ')
EOFError: EOF when reading a line
I tried several methods with no success
I’d appreciate your help.
Thank you in advance
Jacek