Description
A brief description of the functionality being tested.
Setup
You should have an Atomic instance running in Cloud/vagrant or in bare metal.
How to test
Be as specific as required for the target audience.
- Login to the Atomic instances, if cloud/vagrant then ssh into it.
- Next we will start a previllaged container and try to connect to the host docker service.
$ sudo docker run --rm --privileged -v /run:/run -v /:/host --net=host --entrypoint=/bin/bash fedora:23 -c "chroot /host/ docker version"
Expected Results
The following must be true to consider this a successful test run. Be brief ... but explicit.
- Step #1 completes without error, you should be able to login to the instance.
- Step #2 should show you the same version of docker client and server.
$ sudo docker run --rm --privileged -v /run:/run -v /:/host --net=host --entrypoint=/bin/bash fedora:23 -c "chroot /host/ docker version" Client: Version: 1.9.1 API version: 1.21 Package version: docker-1.9.1-9.gitee06d03.fc23.x86_64 Go version: go1.5.3 Git commit: ee06d03/1.9.1 Built: OS/Arch: linux/amd64
Server: Version: 1.9.1 API version: 1.21 Package version: docker-1.9.1-9.gitee06d03.fc23.x86_64 Go version: go1.5.3 Git commit: ee06d03/1.9.1 Built: OS/Arch: linux/amd64
- Program completes with exit code 0
Optional
In this test case we are mounting the host file system into /host, and then chrooting into it. Finally we run docker version command there. It is important to remember that we need the same version of client and server of docker, that is why we are mounting & using the host system's docker command. It is the same binary which acts like a client and server.