Update docker version linux

How to Upgrade Docker on Ubuntu?

Docker is an open-source platform that provides assistance to create, deploy, and run various applications in containers. A container is a standalone, lightweight, executable package holding all the required things for an application to run, including libraries, code, and system tools.

Having the updated version of Docker is the key to using the Docker services smoothly.

Considering its importance, this guide will instruct how to upgrade Docker on Ubuntu which ensures the security, stability, and performance of the system.

How do I Upgrade Docker on Ubuntu?

Docker provides a manner for developers to build and deploy applications in a stable way. To upgrade Docker on Ubuntu, follow the below steps:

Step 1: Check the Current Version

Before upgrading Docker, it is a good practice to check the current version that is installed on the system. It is possible by running the “docker” command with the “version” option in a terminal:

It displays the version number “19.03.0” of the Docker engine that is currently installed on the existing system.

Step 2: Uninstall the Current Version

To upgrade Docker, first uninstall the current version that is installed on the operating system. For this, execute the following command by using the “apt” package manager with the “remove” option:

$ sudo apt remove docker docker-engine docker.io

It removes the existing Docker packages from the current system.

Читайте также:  Linux firefox временные файлы

Step 3: Verify the Uninstallation

Once the Docker has been removed, verify the removal by running the following command:

Now, it’s time to get the latest Docker.

Step 4: Install Dependencies

Once the old version of Docker has been removed, install the dependent packages by running the following commands:

$ sudo apt install apt-transport-https ca-certificates curl software-properties-common

The output shows that all dependent packages have been installed.

Step 5: Add Docker GPG Key

To add the docker GPG key, utilize the “curl” command with the “fsSL” options to extract data from a server:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

The output shows that a docker GPG key has been added to the system.

Step 6: Add Repository

To add the Docker package repository to the system’s package sources, utilize the “add-apt-repository” command by specifying the repository URL for the Docker package. The “[arch=amd64]” specifies the package architecture to download (in this case, the 64-bit version):

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Step 7: Update the Package Index

To update the local package index with the latest information about available packages from the configured software repositories, execute the below script:

It checks the configured software repositories for updates and downloads the latest package lists.

Step 8: Install the Docker CE Package (Upgrade)

To install the Docker CE (Community Edition) package from the official Docker repository, specify the “docker-ce” package name:

$ sudo apt install docker-ce

It downloads the latest Docker CE package from the official Docker repository and installs it in the system. It includes the Docker runtime, which allows users to create, run, and manage Docker containers on your system.

Читайте также:  Линукс сеть есть интернета нет

Step 9: Verify the Installation

Once the new version of Docker has been installed, verify the installation by running the following command:

It displays the version number “23.0.1” of the new Docker engine that is now installed on the system.

Conclusion

To upgrade Docker to the latest version in Ubuntu, first, uninstall docker’s old version with all dependencies. After that, download the latest Docker CE package from the official Docker repository and install it in the system. It provides the latest features and functionality, while also decreasing the chance of security vulnerabilities and other issues.

This article has explained how to upgrade docker in Ubuntu.

Источник

How to update the docker latest version in Ubuntu OS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

I am trying to update the latest version docker of docker, unfortunately i couldn’t complete this can anyone help me out on this ? i tried my best in google but i am not able to complete this.

1 Answer 1

Upgrade from a recent version like 19.03.13 is easy:

sudo apt-get --only-upgrade install docker-ce docker-ce-cli containerd.io 

If that didn’t work because you don’t have any of the packages, follow the installation guide.

*E: Package ‘docker-ce’ has no installation candidate E: Unable to locate package docker-ce-cli E: Package ‘containerd.io’ has no installation candidate *

Читайте также:  Войти в рут линукс

@Divya run sudo apt-get update , then the command again. If nothing changed, follow the guide I mentioned to reinstall docker.

Err:9 get.docker.com/ubuntu docker InRelease 403 Forbidden [IP: 52.84.6.124 443] Reading package lists. Done E: Failed to fetch get.docker.io/ubuntu/dists/docker/InRelease 403 Forbidden [IP: 52.84.6.124 443] E: The repository ‘get.docker.io/ubuntu docker InRelease’ is not signed. N: Updating from such a repository can’t be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

Источник

Как обновить docker?

docs.docker.com/install/linux/docker-ce/ubuntu либо скачать бинарники download.docker.com/linux/static/stable/x86_64 и заменить в /usr/bin предварительно остановив dockerd (не рекомендую, но помогает в некоторых случаях)

@TotalPusher, не, бинарники — зло: ru.stackoverflow.com/a/907613/191416. Тока через пакетный менеджер, благо на бубунте всё должно взлететь.

1 ответ 1

Логика во всех случаях и вкусах GNU/Linux одна и та же — добавляем официальные репозитории Docker и ставим последнюю версию:

GNU/Linux Debian Stretch+

# apt-get install apt-transport-https dirmngr ca-certificates software-properties-common # echo 'deb https://apt.dockerproject.org/repo debian-stretch main' >> /etc/apt/sources.list.d/docker.list # apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys F76221572C52609D # apt-get update # apt-get install docker-engine 

GNU/Linux Ubuntu 18.0+

# apt-get install apt-transport-https dirmngr ca-certificates software-properties-common # Добавляем GPG ключи # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - # add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" # apt update # apt install docker-ce 

GNU/Linux Fedora 28+

# dnf -y install dnf-plugins-core # source /etc/os-release # cat  
centos/ debian/ fedora/ raspbian/ stalinux/ static/ ubuntu/ 

Можно конечно использовать NixOS, где контейнеры просто не нужны в виду нового подход доставки пакетов.

Источник

Оцените статью
Adblock
detector