Skip to content

heisenbergili/docker-tuto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

$${\color{orange}Heisenberg \space \space \color{Red}Docker \space \space Image \space \space project}$$

This project is a tutoriel to understand docker image, container and how to make an image accecible in public image

$\textsf{\color{#5bc0de}{• Docker Host:}}$

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

$\textsf{\color{#5bc0de}{• Client:}}$

Someone who can run the commands in the host machine (Team partner or owner of image...).

$\textsf{\color{#5bc0de}{• Registry:}}$

Is the host where your image could be accecible in public.

$\textsf{\color{#ff0000}{Some optinal videos to understand the concept:}}$

• 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

$\large \textsf{\textbf{\color{#3333ff}{Goal:}}}$

Create a simple code Html that contain Hello ilias (it’s no more hello world 😉).

image-2

To create a simple image you need to create Dockerfile, you find it in the racine of the project.

Build an image:

image-3

image-4

$\textbf{\color{#ff0000}{or with command line:}}$

docker build -t ilias-image

Create a container from the image:

Try to run the image in the graphical view
image-5

$\textbf{\color{#ff0000}{or with command line:}}$

docker run -d -p 1717:80 --name ilias-container ilias-image

• Congratulation your container app turn in local server port : 1717
image-6

Push the image to Docker Hub:

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

image-7

About

Docker Tutorial for Beginners – Comprehensive Guide to Containerization

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published