This project is a tutoriel to understand docker image, container and how to make an image accecible in public
Is the host machine that where the client create (docker build
), get (docker pull
) image or create a new container from an image (docker run
).
To see details for the commads you can run:
docker --h
Someone who can run the commands in the host machine (Team partner or owner of image...).
Is the host where your image could be accecible in public.
• image: What is an image? | Docker Docs 3:55min
• container: What is a container? | Docker Docs 3:40min
• Registry : What is a registry? | Docker Docs 2:15min
Create a simple code Html that contain Hello ilias (it’s no more hello world 😉).
To create a simple image you need to create Dockerfile
, you find it in the racine of the project.
docker build -t ilias-image
Try to run the image in the graphical view
docker run -d -p 1717:80 --name ilias-container ilias-image
• Congratulation your container app turn in local server port : 1717
1.Sign in with your docker hub account Sign in.
2.Create a repository where you will push the image to.
3.Log in with your account in the host machine docker login
.
4.Crete a new image that you will push and tag it.
docker tag local-image:tagname new-repo:tagname
5.Push the image
docker push new-repo:tagname