• Recent blogs

    Docker Installation & Configuration ON CENTOS 7

    Docker Installation & Configuration ON CENTOS 7

    1. Create Docker Repo. 

    #yum install -y yum-utils
    #yum-config-manager \
        --add-repo \
    2. Install docker.
    yum install docker-ce docker-ce-cli containerd.io

    3. Start docker service.
    systemctl start docker

    4. Verify Docker Running Properly.
    [root@dockertest ~]# docker run hello-world
    Unable to find image 'hello-world:latest' locally
    latest: Pulling from library/hello-world

    c04b14da8d14: Pull complete
    Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
    Status: Downloaded newer image for hello-world:latest

    Hello from Docker!
    This message shows that your installation appears to be working correctly.

    5. Start docker at boot.
    [root@dockertest ~]# chkconfig docker on
    Note: Forwarding request to 'systemctl enable docker.service'.
    Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
    [root@dockertest ~]#

    6. Show all containers in the system.
    [root@dockertest ~]# docker ps -a
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
    10682a232910        hello-world         "/hello"            8 minutes ago       Exited (0) 8 minutes ago                       modest_cori
    [root@dockertest ~]#

    7. Check all the Images in the local host.
    [root@dockertest ~]# docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
    hello-world         latest              c54a2cc56cbb        5 days ago          1.848 kB
    [root@dockertest ~]#
    [root@dockertest ~]#

    No comments