Difference between revisions of "Docker Basics"
Jump to navigation
Jump to search
| Line 3: | Line 3: | ||
=Installation= | =Installation= | ||
| + | Login to your server, create a file called docker_install.sh. Copy and paste the script below into the file. | ||
| + | |||
| + | #!/bin/bash | ||
| + | sudo apt-get -y install curl | ||
| + | curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | ||
| + | sudo apt-get -y install software-properties-common | ||
| + | sudo apt-get -y install apt-transport-https | ||
| + | sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | ||
| + | sudo apt-get update | ||
| + | apt-cache policy docker-ce | ||
| + | sudo apt-get install -y docker-ce | ||
| + | |||
| + | Save the file and make the file executable and run the script. | ||
| + | |||
| + | sudo chmod +X docker_install.sh | ||
| + | sudo ./docker_install.sh | ||
| + | |||
=References= | =References= | ||
=Conclusion= | =Conclusion= | ||
Revision as of 23:47, 25 November 2018
Prerequisites
For the purpose of this tutorial, I am using a virtual machine running on EXSI 5.5 host. The VM has 2GB of memory, 1 CPU and 60GB of disk. I named the VM Docker2001.The VM is in a DHCP and DNS environment with a docker2001.dfw.ppnet as the FQDN. If you have a bare metal, you can use that also. The VM has Debian Stretch installed on it.
Installation
Login to your server, create a file called docker_install.sh. Copy and paste the script below into the file.
#!/bin/bash sudo apt-get -y install curl curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - sudo apt-get -y install software-properties-common sudo apt-get -y install apt-transport-https sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" sudo apt-get update apt-cache policy docker-ce sudo apt-get install -y docker-ce
Save the file and make the file executable and run the script.
sudo chmod +X docker_install.sh sudo ./docker_install.sh