Creating serverless virtual servers with Docker

Well not serverless exactly as serverless is a popular term referring to the deploying of code in the cloud which does not require a dedicated server, as the AWS Lambda service or Google App Engine (GAE) for example.

In this case I needed some ssh addressable servers for testing my Pexpect scripts.  It occured to me that rather than using physical servers, or even creating virtual servers using Vagrant/VirtualBox I could create some Docker containers configured with openssh to act as if they were physical servers.

Whilst not the recommended use of Docker - where typically one or more application processes are created in a container - where "docker exec" rather than ssh would be used if there were a need to connect to the container, it fits perfectly my test use case.

I've placed my Dockerfile in this github repo.
It is used to create an container image running OpenSSH, and with a user 'user' and password 'password' - clearly security was not a concern for my testing !!

I intend to develop this repo making use of more Docker features to allow more complete server/network emulation for tests, demos, labs, presentations.


Popular Posts