This directory demonstrates several Docker topics:
- The usefulness of volume mechanism in Docker.
- The
docker logs
command.
-
Run without Docker
$ ./io.sh $ ./io.sh $ ./io.sh $ cat /tmp/output
-
Run with Docker, without volume mechanism
$ docker build -t io . $ docker run io $ docker run io $ docker run io $ cat /tmp/output $ docker ps -a $ docker logs <container id>
-
Run with Docker, with volume mechanism
$ docker run -v $(pwd):/tmp io $ docker run -v $(pwd):/tmp io $ docker run -v $(pwd):/tmp io $ cat ./output $ docker ps -a $ docker logs <container id>