UnixDroid

Foundations · Beginner

Docker tutorial for beginners

Package an app with everything it needs and run it anywhere

Docker screen demo — an illustration with sample data

What is Docker?

Docker runs applications in containers — light, isolated packages that include the program and its libraries. It is widely used by developers, DevOps teams and security learners who want quick, disposable labs.

How Docker works

  1. 1

    Pull an image

    Download a ready-made package from a registry.

  2. 2

    Run a container

    The image becomes a running, isolated app.

  3. 3

    Map ports

    Choose which port on your computer reaches the app.

  4. 4

    Throw it away

    Delete the container; the image stays for next time.

What is a container?

An isolated process that shares the host's kernel but has its own files. It starts in seconds.

Words to know

  • Image: the recipe
  • Container: a running image
  • Dockerfile: instructions to build an image
  • Registry: a library of images, such as Docker Hub

Docker first steps

docker run hello-world

Check that Docker works

docker ps -a

List containers

docker run -p 127.0.0.1:8080:80 nginx

Run a web server only on your own computer

docker stop <id>

Stop a container

docker image ls

List images

Use Docker safely and legally

Use official or trusted images, keep them updated, and bind test apps to 127.0.0.1 so others cannot reach them.

Practise only on your own computer, your own network or a lab that gives you permission. Using security tools on systems that are not yours can be a crime (in India under the IT Act).

Docker — common questions

What is Docker used for?

Docker runs applications in containers — light, isolated packages that include the program and its libraries. It is widely used by developers, DevOps teams and security learners who want quick, disposable labs.

Docker kya hai?

Docker apps ko containers mein chalata hai, jisme app aur uski zaroorat ki sab cheezein ek saath hoti hain.

Container vs virtual machine?

A VM has its own operating system; a container shares the host kernel, so it is much lighter.

Is Docker free?

Docker Engine is free; Docker Desktop is free for personal use and education.

Related topics: docker tutorial · docker kya hai · containers explained · docker for beginners