deploy-using-helm

Installing Docker

Reference: https://docs.docker.com/engine/install/centos/

  1. Install yum-utils

     sudo yum install -y yum-utils
    
  2. Add docker repo

     sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    
  3. Install docker engine

     sudo yum install -y docker-ce docker-ce-cli containerd.io
    
  4. Enable docker service

     sudo systemctl enable --now docker
    
  5. Check docker service status

     sudo systemctl status docker
    
  6. Create a docker group (if required)

     sudo groupadd docker
    
  7. Add your personal user to the docker group

     sudo usermod -aG docker $USER
    

    Run the following command

     newgrp docker
    

    to update group information in the current session. Alternatively, you can simply re-login.

  8. Run a test to confirm docker is working

     [roberto@vmlab01 ~]$ docker run hello-world
    
     Unable to find image 'hello-world:latest' locally
     latest: Pulling from library/hello-world
     b8dfde127a29: Pull complete
     Digest: sha256:7d91b69e04a9029b99f3585aaaccae2baa80bcf318f4a5d2165a9898cd2dc0a1
     Status: Downloaded newer image for hello-world:latest
    
     Hello from Docker!
        ...
    
  9. If you get the following error when ran the previous command:

    Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version”: dial unix /var/run/docker.sock: connect: permission denied

    Run the following command:

     sudo chgrp docker /var/run/docker.sock
    

    and try again