Open jstarcher opened 7 years ago
Actually it's the other way around. This PR does a few things:
Docker is a platform for running and managing containers and this allows people to run siege with a pre-build image. The advantage to using Alpine linux as the base image is that this entire image is now only 11.3mb which is the full linux OS + Siege v4.0.3rc3. By having an official image it allows folks to run siege with the same OS and dependencies to eliminate any guess work. If someone is having a segfault on ubuntu but on on centos for example, then it takes some effort to get to the bottom of this. With docker, the image can be run on any host OS but the container environment will be exactly the same so the results are consistent and reproducible.
By having this docker image you can easily run the example command above and a one line command it'll run siege. No need to compile siege or install from any package managers. If you have Docker installed on Windows or Mac, you can run the same command and it'll run the linux container under those environments as well without any dependency issues.
This is also super useful for testing with a cluster using something like Swarm, Kubernetes, AWS ECS, etc. With this image I was able to make a few clicks in the AWS ECS UI and create a testing cluster as large as I wanted. I could spin up 25 VMs for example, run the test, and spin them down. This can be extremely useful for large scale testing.
With the Travis CI integration I added you are getting a very very basic CI setup which is really useful as well. Anytime a new tag is pushed, the code will get compiled and an example siege test will run. If the code fails to compile or if it segfaults when the test tries to run, the build will fail and we'll all be able to see that in the status badge.
Hope this clears it up!
Cheers
We've been using Siege w/Docker at Dowjones for stress/regression tests on many of the WSJ.com properties.
Adding an Alpine based Docker image with Travis CI builds
docker run --rm -t jstarcher/siege -d1 -r10 -c25 example.com