Docker installation steps for
-
Follow the link to download docker (community version) for windows:
NOTE: While installing, docker might restart your system. Make sure to save all your changes before proceeding.
-
Double-click Docker for Windows Installer.exe to run the installer.
-
Follow the install wizard to accept the license, authorize the installer, and proceed with the install.
-
Click on the finish button to finish installation
-
Installation succeeded message will appear on the screen. Click on close and log out.
-
Click Ok. The system will restart.
-
If you just installed the app, you will get a popup success message with suggested next steps, and a link to this documentation.
- To start docker, search for Docker, select the app in the search results, and click it (or hit Return).
- Open command prompt or Windows PowerShell
Type the command
docker run hello-world
If the above message appear, then you have successfully installed docker on your window system.
So far, we've downloaded and installed docker on windows. It's time to configure it.
-
On successful installation, open docker settings by left click on docker tray icon
-
If you want to access Docker using a tcp connection or you want to use docker with Java, you need to expose the Docker Dameon using the following steps:
-
If you're behind a proxy, add proxies in docker settings as well.
-
If you want to use your internal repositories, then you can add them as well
- Go to Daemon and add insecure-registries
- Click Advanced, add url of internal repositories and click on apply.
{
"registry-mirrors": [],
"insecure-registries": [
*url:port*
],
"debug": true,
"experimental": true
}
- Update the Operating System
sudo yum update -y
- Uninstall old versions (If any)
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
- Install required packages:
- yum-utils provides the yum-config-manager utility
- device-mapper-persistent-data and lvm2 are required by the devicemapper storage driver
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
- Use the following command to set up the stable repository.
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
- Install the latest version of Docker CE
sudo yum install docker-ce
- Install the EPEL repository by executing the command
yum install epel-release
- Install python-pip
yum install -y python-pip
- Install Docker Compose by executing a pip command
pip install docker-compose
- Check Docker Compose version
docker-compose -v
The output should be something like this
docker'compose version 1.16.1, build 6d1ac219
sudo systemctl start docker
- Verify that docker is installed correctly by running the hello-world image
sudo docker run hello-world
- Add insecure repos
sudo vi /etc/docker/daemon.json
{ "registry-mirrors": [], "insecure-registries": [ "url:port", "url:port" ], "debug": true, "experimental": true}
- Update the Operating System
$ sudo apt-get update
$ sudo apt-get install \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual
- SET UP THE REPOSITORY
- Update the apt package index:
$ sudo apt-get update
- Install packages to allow apt to use a repository over HTTPS:
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
-
Add Docker’s official GPG key:
This command will download GPG from the link and add the the link as a trusted APT repository key.
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
-
Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.
$ sudo apt-key fingerprint 0EBFCD88
Verify the key fingerprint is present
- Use the following command to set up the stable repository.
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
- Update the apt package index.
$ sudo apt-get update
- Install the latest version of Docker CE, or go to the next step to install a specific version. Any existing installation of Docker is replaced.
$ sudo apt-get install docker-ce
- To install a specific version of docker:
The command will list the available version of docker-ce
$ apt-cache madison docker-ce
- The Docker daemon starts automatically.
Verify that Docker CE is installed correctly by running the hello-world image.
$ sudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.
References: