For those who want to build and run Docker containers in Ubuntu-18.04 – first of all, you need to install Docker itself.
To install the latest version of Docker and be able to update it in the future without any problems, it is recommended to install Docker from the official repository.
In this guide, I will show how to install the free Docker CE (Community Edition) in Ubuntu-18.04 from a stable official repository, how to make sure that it is installed correctly and what usually needs to be done after installation.
Requirements: To install Docker in Ubuntu-18.04, you must have a 64-bit architecture and Linux kernel version 3.10 or higher. By running arch and uname -r, you can check if the system meets these requirements.
Add the official Docker GPG key:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Set up a stable Docker repository:
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Install docker:
$ sudo apt-get update $ sudo apt-get install docker-ce
Run docker:
$ sudo systemctl start docker
Good Tip: Docker installed successfully! It’s time to launch the first Docker container!
Run docker container
Similar Posts:
- Docker: Launching a Container from an Image
- How to install docker on Debian 9 Stretch
- how to Install Docker CE and Docker Compose on Debian 10 / 11
- Install redmine via docker-compose
- How to remove docker image