Dino Geek, try to help you

How to use Docker on Ubuntu?


Docker is a platform that allows you to develop, test, and deploy applications as portable containers that can run almost anywhere. Here’s a basic guide to install Docker on Ubuntu:

1. Update your existing list of packages:

\`\`\`bash sudo apt update \`\`\`

1. Install a few prerequisite packages which let apt use packages over HTTPS:

\`\`\`bash sudo apt install apt-transport-https ca-certificates curl software-properties-common \`\`\`

1. Add the GPG key for the official Docker repository to your system:

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

1. Add the Docker repository to APT sources:

\`\`\`bash sudo add-apt-repository “deb $(lsb\_release -cs) stable“ \`\`\`

1. Update the package database with the Docker packages from the newly added repo:

\`\`\`bash sudo apt update \`\`\`

1. Make sure you are about to install from the Docker repo instead of the default Ubuntu repo:

\`\`\`bash apt-cache policy docker-ce \`\`\`

1. You’ll see output like this, with the Docker repository as the one that will be installed:

\`\`\`bash Installed: (none) Candidate: 5:20.10.6~3-0~ubuntu-focal Version table: 5:20.10.6~3-0~ubuntu-focal 500 500 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages \`\`\`

1. Finally, install Docker:

\`\`\`bash sudo apt install docker-ce \`\`\`

1. Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running:

\`\`\`bash sudo systemctl status docker \`\`\`

After installed Docker, you can use `docker` command to manage your Docker containers, for example:

- `docker pull ubuntu` to pull a ubuntu Docker image.
- `docker run -it ubuntu` to run a Docker container.
- `docker ps` to list Docker containers.

Before proceeding further, please note that you might need to add your user to the `docker` group in order to execute Docker commands without using `sudo` every time:

```
sudo usermod -aG docker ${USER}
```

You may need to log out and log back in for these changes to take affect.

Remember to replace `${USER}` with your username. Now, you should be able to use Docker without requiring sudo.

For more advanced usage, you might want to consult the official Docker documentation or follow a tutorial specific to your use case.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use