One Day workshop on understanding Docker and Git
Machine/VM with Linux, Python3 (3.x) and pip3 installed.
- Install Ubuntu 24.04 LTS from here
- Install Git from your terminal by running following commands:
sudo apt-get update sudo apt-get install git
- Verify the installation was successful by typing:
git --version
-
If you don't have an account on GitHub then create an account on GitHub
-
Configure SSH key by following the below steps:
To list all contents of ssh folder:
ls -al ~/.sshTo install xclip:
sudo apt install xclip
Copy SSH key:
xclip -sel clip < ~/.ssh/id_ed25519.pub
-
Create a new work directory named
WORKSHOPinside the/homedirectory:mkdir -p ~/WORKSHOP -
Fork the current repository
-
Clone your forked repository inside the
WORKSHOPdirectory
Info: You can refer this guide to understand how to fork and clone
-
To install Docker, follow the steps below:
-
Configure Docker to run without sudo:
-
Install Docker Compose plugin (comes with Docker Desktop or as a plugin):
Verify if already installed:
docker compose version
If not installed, install the plugin:
sudo apt-get update sudo apt-get install docker-compose-plugin
You should see output similar to:
Docker Compose version v2.30.3 -
Download the following Docker images to your local machine:
docker pull postgres:16-alpine
Verify the image:
docker run --rm -ti postgres:16-alpine psql -V
Output: psql (PostgreSQL) 16.x
By the end of this workshop you will understand:
- The concept of containerization and why it's required
- How to build and run your own containers
- How to run multiple services with Docker Compose
- How to expose ports, use volume mounts, utilize networks, and limit resources (the 4 features we use regularly)
- You will be introduced to Git
- You will learn Git commands (push, pull, make Pull requests, etc.)
| Time | Topics |
|---|---|
| 09:00 - 09:30 | Introduction |
| 09:30 - 10:00 | Introduction to Git |
| 10:00 - 11:00 | Git Commands (push, pull, make Pull requests, etc.) |
| 11:00 - 11:30 | What is Docker |
| 11:30 - 12:00 | Docker Commands |
| 12:00 - 01:30 | Break |
| 01:30 - 4:00 | Building Custom Containers & Run Multiple Services with Docker Compose |
| 4:00 - 5:00 | Expose Ports, Volume Mounts, Utilizing Networks, Limiting Resources |
| 5:15 - 5:30 | Wrapping Up |