Update guides/install-docker.md

This commit is contained in:
WarpWing 2023-06-26 14:42:46 +00:00
parent 308d15362b
commit c20ff2744f

@ -60,3 +60,39 @@ Docker version 23.0.6, build ef23cbc
## Finished ## Finished
Congratulations! You have now installed Docker Community Edition on your Ubuntu machine. Docker is ready to be used, allowing you to leverage the power of containerization for your projects and applications. Congratulations! You have now installed Docker Community Edition on your Ubuntu machine. Docker is ready to be used, allowing you to leverage the power of containerization for your projects and applications.
Certainly! Here's the raw Markdown syntax for the rootless part, enclosed in a code block:
# Optional: Running Docker in Rootless Mode
By default, Docker requires root privileges to run. However, Docker also supports running in rootless mode, which allows non-root users to use Docker without needing to escalate their privileges. Keep in mind that rootless mode has some limitations and may not be suitable for all use cases.
Warning: Rootless Mode Implications
Running Docker in rootless mode has the following implications:
Some advanced features, such as accessing privileged resources or running privileged containers, may be restricted.
Network functionality may be limited, and you may encounter issues when trying to bind to privileged ports.
Docker volumes may have reduced functionality or performance.
If you understand these implications and still wish to run Docker in rootless mode, you can follow the steps below:
Install the necessary dependencies for rootless mode by running the following command in the terminal:
```bash
curl -fsSL https://get.docker.com/rootless | sh
```
This command downloads a script specifically for rootless mode and executes it.
After the installation completes, you can initialize your Docker environment by running the following command which starts the rootless Docker service.:
```bash
sudo systemctl --user start docker
```
To verify that Docker is running in rootless mode, use the following command:
```bash
docker version
```
You should be able to run docker commands without the need of sudo privileges!