![]() To check whether you have successfully installed docker or not, you can run hello-world image: sudo docker run hello-worldĪnd that's it! you have the most recent version of docker installed in Ubuntu.īut have you noticed that it needs sudo access to run docker commands? If you find that annoying, here's what you can do. Now, you can install the most recent version of docker using the given command: sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin Running hello-world image To take effect from the changes you've made till now, you have to update the repository index: sudo apt update To add a docker repository to your package sources in Ubuntu, you can use the given command: echo "deb $(lsb_release -cs) stable" | sudo tee /etc/apt//docker.list > /dev/null Installing Docker in Ubuntu The repository is where the packages are located. First, update the repositories and install the necessary packages. curl -fsSL | sudo gpg -dearmor -o /etc/apt/keyrings/docker.gpg Adding Docker repository 1.To install and always get updated to the latest version, you should connect the repository from the Docker developers. Now, you have to add the GPG key that will ensure the authenticity of the packages coming from the Docker developers. To install Docker Engine, you need the 64-bit version of one of these Ubuntu versions: Ubuntu Lunar 23.04 Ubuntu Kinetic 22.10 Ubuntu Jammy 22.04 (LTS) Ubuntu Focal 20.04 (LTS) Docker Engine for Ubuntu is compatible with x8664 (or amd64), armhf, arm64, s390x, and ppc64le (ppc64el) architectures. Next, use the given command that will create the directory /etc/apt/keyrings if not exist with -p option: sudo mkdir -p /etc/apt/keyrings Adding GPG keys So let's start with installing packages that will let apt use HTTPS over the repository: sudo apt-get install ca-certificates curl gnupg lsb-release Now, if you don't care about using a slightly old docker version, you can use the default repository for docker installation: sudo apt install docker.ioīut if you want to use the most recent docker version, you will have to use the official repository for installation, and here's a detailed guide. docker-ce-cli: A command line tool that lets you. ![]() ![]() This installs the following Docker components: docker-ce: The Docker engine itself. sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin. ![]() Looking for the easiest way to install Docker in Ubuntu? Well, here you have it.īut before proceeding with installation, it is important to remove the old docker package (if you have any): sudo apt-get remove docker docker-engine docker.io containerd runc To install the latest up-to-date Docker release on Ubuntu, run the below command. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |