Task 01. Run docker locally.
Paul, the CTO in your company is very interested in containers technology. You were asked to play with Docker. So in this task you need to setup custom application in container.
Task
0. Warmup
To learn about docker do following simple tasks:
- Run locally
nginxcontainer with exposed port. Make sure that you can access default nginx page on exposed port. - Run locally
nginxcontainer with exposed port and replace defaultindex.htmlfile with your own. Make sure that you can access your page on exposed port. - Build container
dev-toolsthat would be created fromubuntuimage, and has installedgit,make,build-essentialpackages. - Upload previously created image
dev-toolsto dockerhub. Try to pull it from dockerhub.
1. Repository
Fork repository for task05 and clone forked repo.
2. Build docker image
You need to update Dockerfile that has nginx with php support, copy file index.php to needed folder and make sure nginx and container setup in a way that after starting container you should be able to see rendered php page in your browser by address http://localhost:8080/index.php.
- Upload your docker image to DockerHub: Create free account in DockerHub. Push your recently built docker image to dockerhub.
3. Make your work visible
Create Pull Request with changes on Dockerfile.
Additional tasks if you feel that it was too easy.
- Instead of copying
index.phpto container find a way to be able to edit this file locally and see your changes after refreshing page.
Tips:
- Docker allows you manipulating containers. Containers are more lightweight then VM, so it allows to run more applications on the same hardware.
Recommended soft:
Useful links:
FAQ
- N/A