carpentries-incubator / docker-introduction

Reproducible Computational Environments using Containers
https://carpentries-incubator.github.io/docker-introduction/
Other
42 stars 48 forks source link

Add docker validation test for `setup.md` #123

Open MiddelkoopT opened 2 years ago

MiddelkoopT commented 2 years ago

During the setup process for students I have found it valuable to have a "validation" step to ensure students have a working (or not-not working) installation. They may think that it is installed but is not actually working. This is especially true for Linux if the user does not have the docker group. I would recommend that setup.md include the following test.

$ docker version

and explain that the following output shows both the client and server are working.

Client:
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.8
 Git commit:        20.10.2-0ubuntu2
 Built:             Tue Mar  2 05:52:27 2021
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.8
  Git commit:       20.10.2-0ubuntu2
  Built:            Tue Mar  2 05:45:16 2021
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.4.4-0ubuntu1
  GitCommit:        
 runc:
  Version:          1.0.0~rc95-0ubuntu1~21.04.1
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:        

I would be willing to make a PR if this is deemed useful.

jcohen02 commented 2 years ago

Hi @MiddelkoopT, thanks for opening this issue.

At present, we do a check similar to what you're suggesting at the start of the "Introducing the Docker Command Line" episode where we say

"...open a shell (terminal) window, and run the following command to check that Docker is installed and the command line tools are working correctly."

and then ask the students to run docker --version (which I guess could be replaced with docker version). I'd be inclined not to remove this from here but I certainly don't see any issue with adding something like this to the end of the setup instructions so that there is some verification of whether things seem to be working correctly straight after the install.

Feel free to go ahead and add a PR for this. Thanks.