Prepare your Docker environment

Once the Installed Docker.

Test Docker version

  1. Run docker --version and ensure that you have a supported version of Docker:

    docker --version
    Otput:
    Docker version 17.12.0-ce, build c97c6d6
  2. Run docker info or (docker version without --) to view even more details about your docker installation:

    docker info
    Output:
    Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 17.12.0-ce Storage Driver: overlay2 ...
  3. To list the image in a docker:

    docker image ls
  4. List the hello-world container (spawned by the image) which exits after displaying its message. If it were still running, you would not need the --all option:

    docker container ls --all
    Output:
    CONTAINER ID     IMAGE           COMMAND      CREATED            STATUS
    54f4984ed6a8     hello-world     "/hello"     20 seconds ago     Exited (0) 19 seconds ago
  5. Test that your installation works by running the simple Docker image, hello-world:

    docker run hello-world
    Output:
    Hello from Docker!
    This message shows that your installation appears to be working correctly.


Was this answer helpful? 0 Users Found This Useful (0 Votes)