Install docker and docker compose
Script để cài đặt docker và docker compose:
Trong đó tags
v2.2.1là version củadocker-compose. Khi sử dụng bạn nên sửa lại version tại releases page cho phù hợp với nhu cầu.
Docker no Sudo
To create the docker group and add your user:
- Create the
dockergroup.sudo groupadd docker - Add your user to the docker group.
sudo usermod -aG docker $USER
Configure Docker to start on boot with systemd
Many modern Linux distributions use systemd to manage which services start when the system boots. On Debian and Ubuntu, the Docker service starts on boot by default. To automatically start Docker and containerd on boot for other Linux distributions using systemd, run the following commands:
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
To stop this behavior, use disable instead.
sudo systemctl disable docker.service
sudo systemctl disable containerd.service