Exercises and material for a 3-hour workshop for BeCode students.
The link to the slides can be found here.
- Clone the repository. Build the docker image.
Do not forget to add a tag (with the -t option) to avoid randomly generated image names.
-
Run the image you just build.
-
Enter into the running container and delete the targetfile. Look in the Dockerfile to see where it is.
-
Exit the running container and stop the container.
-
Delete the container.
-
Run the container again, and look for the targetfile.
hint: it should be back
-
Exit the container, and try to write a command line that will delete your targetfile without getting into the container.
-
Stop and remove the container. Run it again and map your container to a port through the command line (your docker container when running on port 80).
Surfing to localhost:[ yourport ]/index.php should show you a Dockernight exercises webpage.
-
Stop and remove the container. Run it again but mount the website directory as a volume, over the target directory, and expose a port.
Surfing to localhost:[ yourport ]/index.php should show you a different webpage.