Skip to content

Latest commit

 

History

History
92 lines (65 loc) · 3.21 KB

README_PREP.md

File metadata and controls

92 lines (65 loc) · 3.21 KB

Preparation Material for Session 02

Version Control with Git

In case you did not configure your Git installation already, do so as described in First-Time Git Setup

In particular, configure your username, email address, and command line editor:

$ git config --global user.name "<Your Name>"
$ git config --global user.email <yourname>@itu.dk

In case you are not into using VI as editor, you might want to choose nano

$ git config --global core.editor nano

Setup Docker and Docker Compose

Install Docker and Docker Compose to your computer.

The below is adapted from the official documentation for Ubuntu (updated for 2025): https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

Docker

Uninstall old versions

for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done

Install the docker repository for automatic updates

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
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
sudo apt-get update

Install the following tools for docker

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Check if the Docker engine is up and running:

sudo systemctl status docker

or

sudo docker run hello-world

To be able to run docker commands as your current user, it has to be added to the respective group. (notice some versions of the guide writes ${USER}, try this if the following doesn't work.)

sudo usermod -aG docker $USER

With the following, double check that your user is in the docker group.

su - $USER
id -nG
exit