OneBite.Dev - Coding blog in a bite size

update docker

Simple docker step by step how to update docker with explanation

Docker is an essential tool in modern application development. This article provides a simple guide to follow when updating Docker.

Understanding Docker

Docker is a platform that simplifies software deployment using containerization, making it easy to run your applications in different environments. Therefore, staying updated with the latest version retains the software’s efficiency and your system’s security.

Step By Step Guide to Update Docker

This guide will walk you through a detailed process on how to update Docker on multiple operating systems.

For Windows:

  1. Start by opening Docker Desktop.

  2. Navigate to the “Settings” area.

  3. Within “Settings,” look for the “General” tab.

  4. Inside the “General” tab, check the box labeled “Automatically check for updates.”

  5. Lastly, apply and save the changes. Docker will automatically check and install updates when available.

For macOS:

  1. Start with Docker Desktop running.

  2. At the top of the screen, click on the Docker icon.

  3. In the dropdown menu, visit “Preferences.”

  4. Under “General,” tick the box labeled “Automatically update Docker Desktop.”

  5. Finally, press “Apply & Restart.” The Docker will check for updates and install them automatically when available.

For Ubuntu:

Docker doesn’t have automatic update features for Linux distributions. You have to use terminal commands to do manual upgrades.

  1. First, update the package database with the command: sudo apt-get update.

  2. After that, uninstall old versions with the command: sudo apt-get remove docker docker-engine docker.io.

  3. Next, update the apt package index, and allow apt to use a repository over HTTPS using the following commands:

    sudo apt-get update
    
    sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
  4. Add Docker’s official GPG key:

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

  5. Install the docker engine with the command:

    sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io

  6. Finally, verify that the Docker Engine is installed correctly by running Hello World as:

    sudo docker run hello-world

This detailed guide shows how to update Docker on different platforms. Always ensure to stay updated to protect your system and maintain Docker’s speed and efficiency. Enjoy using Docker!

docker