Open MartinaRuocco opened 3 years ago
No that's my fault - it's not worded very well. You don't have to do anything for that line in the documentation.
What that was saying is that it's possible to configure a dockerfile to execute something in a container before the container actually starts. The last line in the Dockerfile does this: ENTRYPOINT ["/usr/local/bin/startup_script.sh"]
This means that when you run the command to run the container and enter the interpreter this script will run (I said "should" because I didn't know Docker very well when I wrote this, so wasn't 100% confident). That script makes the graphical display work.
Alright, thanks @TTitcombe!
ENTRYPOINT ["sh","/usr/local/bin/startup_script.sh"]
The reason is that it gave me this error standard_init_linux.go:219: exec user process caused: no such file or directory
when launching the container (step 2 of your README). /usr/local/bin/startup_script.sh
and not /usr/local/bin/startup_script.py
... am I correct? shutil.rmtree(file_path)
in tests/test_image.pydocker cp tests/test_image.py test_container:/tmp/test_image.py
docker exec -it test_container /usr/local/bin/startup_script.sh "python /tmp/test_image.py"
docker cp test_container:/rec/video ~/Desktop/
It's worth mentioning that at the time I am writing this comment, there is a bug in the video_recording.py script of the gym library that I solved by modifying it.
For future reference, whoever wants to modify an image can follow this guide.
In summary:
docker run -it test_container old-image-name bash
docker commit test_container new-image-name
Hi!
I'm sorry if this might be a silly question (I'm new to Docker) but what do you mean by
? Can you provide an example, please?