I have some integration tests for a system that deploys PHP software to an Apache host via FTP(S) and SSH/SFTP transports. The tests run in a Docker image that has FTP and SSH servers installed, and they are stopped and started using shell scripts. This is a bit hacky, and it does not offer much control.
I am therefore thinking of building an HTTP API to administrate these features. I’d like to see:
- Create/update/delete a user
- Create/update/delete/start/stop an FTP server
- Create/update/delete/start/stop an SSH server
- Create/update/delete/start/stop an Apache server
In my use case, there is only one each of the FTP and SSH servers, and since they are stopped and started manually, they would interfere with each other if parallelised. Thus, I’d like to be able to bind onto a wide range of IP addresses, so that the tests can be reliably parallelised.
I expect this system would run in Docker. It could either:
- Instantiate FTP server, SSH server or Apache instances inside the main container
- Using Docker-in-Docker, create new inner containers with a requested combination of servers