Welcome to the Docker repository! This repository contains basic Docker examples and guides to help you get started with containerization and running lightweight applications.
This repository serves as an introduction to Docker, providing simple examples for creating and managing containers. It is suitable for beginners looking to understand how Docker works.
To begin using Docker with this repository:
-
Install Docker on your machine. Follow the Docker installation guide.
-
Clone this repository:
git clone git@github.com:kumsa-Mergia/Docker.git cd docker-repository -
Explore the example Dockerfiles and use them to build and run containers.
Here are some essential Docker commands to get you started:
-
Check Docker version:
docker --version
-
List all Docker images:
docker images
-
Run a simple container (e.g., an Ubuntu shell):
docker run -it ubuntu /bin/bash
-
List running containers:
docker ps
-
Stop a container:
docker stop container-id
-
Remove a container:
docker rm container-id
This repository includes basic Docker examples such as:
-
A simple Nginx web server:
docker run -d -p 8080:80 nginx
-
Building a custom image using a provided Dockerfile:
docker build -t custom-image-name ./examples/basic-example
-
Running a containerized Python application:
docker run -it python:3.8 python