DEV Community

Cover image for Installing the trio basic tools of DevOps: Git, Curl, and Docker.
Berenice Enikanoselu
Berenice Enikanoselu

Posted on

Installing the trio basic tools of DevOps: Git, Curl, and Docker.

Git, curl, and Docker are three essential tools used in software development to track code changes, transfer data across networks, and run applications consistently. They solve different problems but are frequently used together in modern DevOps pipelines to build and deploy software.

πŸ“Œ What is Git?

Git is a distributed version control system designed to track modifications in source code files over time.It helps developers collaborate on code without overwriting each other's work. It allows you to revert to older versions, create branches for new features, and merge changes smoothly.Example: When you use git commit, you save a snapshot of your project's current state.

πŸ“Œ What is curl?⁠

Curl stands for "Client URL" and is a command-line tool used to transfer data to or from a network server.It is used to download files, test APIs, and check server responses directly from the terminal.It supports a wide variety of internet protocols, including HTTP, HTTPS, FTP, and SFTP.Example: Running curl https://api.github.com fetches information from GitHub's server right into your command prompt.

πŸ“Œ What is Docker?

⁠Docker is a containerization platform that packages an application and all its dependencies into an isolated unit called a container.It ensures that software runs the exact same way on any computer, eliminating the "it doesn't work on my machine while it works on yours" problem.Containers share the host system's OS kernel, making them lightweight, fast, and resource-efficient compared to traditional Virtual Machines.Example: You can create a ⁠Docker image that bundles Python, your code, and your database settings so anyone can run your app instantly.

Let's install the trio basic tools of DevOps: Git, Curl, and Docker! But beore that we have to make our system new! The codes are written for LINUSX, WINDOWS and MAC OS. Choose the code that correspond to your OS. I stick with WINDOWS!

Step 1: This refreshes your computer's package list and upgrades installed software to their latest upgraded versions.

Windows:
winget upgrade –all
 You will receive propmts on your desktop to allow the program run, select YES.

Linux:
sudo apt update && sudo apt upgrade -y
Mac :
brew update && brew upgrade
Installs or manages a package using Homebrew (macOS/Linux package manager).

Step2: Install Git, Curl, and Docker
Installs Git (your code time-machine), Curl (for downloading stuff), and Docker (for running apps in isolated boxes).
These three tools are the absolute foundation of modern technology. They are the everyday companion.
Windows:
i. winget install -e --id Git.Git
ii. winget install -e --id Docker.DockerDesktop
iii. winget install -e --id curl.curl
 .....my code did not give me the expected response so I resaerched it in google, click this link to see my research https://www.google.com/search?q=what+is++this+PS+C%3A%5CUsers%5CHP%5CDesktop%5CAZURE+CLI+lessons%3E+winget+install+-e+--id+curl.curl%0D%0ANo+package+found+matching+input+criteria. select AI mode.

iv. docker --version (Prints the installed Docker version to verify it's set up.)

see the full view of the codes here

Linux:
i. sudo apt-get update
ii. sudo apt-get install -y git ca-certificates curl
iii. sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
iv. sudo chmod a+r /etc/apt/keyrings/docker.asc
v. echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo ${UBUNTU_CODENAME:-$VERSION_CODENAME}) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

(This prints text to the terminal β€” also used to write to files with > or >>.)

vi. sudo apt-get update
vii. sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
viii. docker --version

Mac:
i. brew install git curl
ii. brew install --cask docker
iii. docker --version

Step 3: Git configuration.
We just installed Git, it needs to know who is doing what for security and audit purposes. To be able to save (commit) your work, this step is very important. The codes or the 3 OS are the same here
Windows, Linux, Mac:
i. git config --global user.name "Your Name"
Example : git config --global user.name "Bukola"
ii. git config --global user.email "you@example.com"
Example : git config --global user.email "Bukolasarah@yahoo.com"
iii. git config --list
Without this, you can't save (commit) your work

Step 4: Create a GitHub Repository
This is like a remote home for your code on GitHub β€” think of it as your project's cloud backup and portfolio piece.
In real DevOps, code lives in a remote repository so the whole team can collaborate, CI/CD pipelines can trigger, and nothing is lost if your laptop catches fire!

  1. Go to https://github.com and sign in (or create an account if you don't have one)

  2. Click the '+' icon in the top-right corner β†’ 'New repository'

  3. Name it: devops-lab

  4. Leave it PUBLIC, do NOT add a README (we'll push our own code)

  5. Click 'Create repository'

  6. Check the HTTPS URL β€” it will look like: https://github.com/YOUR-USERNAME/devops-lab.git

Top comments (0)