I'm new to Docker so this question might be silly for someone. But I stucked in executing the host script using Docker image virtual environment. What I have done is:
- pull an existing image
docker pull ubuntu:18.04
- install virtual environment
apt-get install python2.7 virtualenv
virtualenv venv --python=python2.7
- executing a script in the host using image as a container:
docker run --rm ubuntu /venv/bin/python test.py
However it throw the error "test.py: No such file or directory"
test.py:
print("Hello World from the host")
I guess I have to activate the virtual environment but do not know how to. Can someone hep to point out what am I missing?