Jump to content

Docker Tutorial: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
<pdf>File:Rr training sesssions docker|frameless|center|Docker Training</pdf>
<pdf>File:Rr training sesssions docker|frameless|center|Docker Training</pdf>
== Commands Quick Reference ==
=== Install ===
On Debian-based systems Docker may be installed via Apt (taken from the [https://docs.docker.com/install/linux/docker-ce/ubuntu/ official documentation]):
<syntaxhighlight lang=bash>
# Uninstall old versions
sudo apt remove docker docker-engine docker.io containerd runc
# Install dependencies
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
# Install GPG Key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Add Docker PPA
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# Finally install
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
</syntaxhighlight>
To run as non-root user:
<syntaxhighlight lang=bash>
# Create the docker group
sudo groupadd docker
# Add yourself to the group
sudo usermod -aG docker $USER
# To avoid re-logging
newgrp docker
# Test proper installation
docker ps
</syntaxhighlight>
Other supported OS:
* [https://hub.docker.com/editions/community/docker-ce-desktop-mac Mac OSX]
* [https://hub.docker.com/editions/community/docker-ce-desktop-windows Windows]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.