Running Artillery in Docker
Using Artillery with Docker
For your convenience, there's a Docker image that allows you to use Artillery in a container.
Running tests scripts inside a Docker container
To run your test scripts using the latest Artillery Docker image, use the docker run
command. You can mount the directory containing your test scripts to the container using the -v
flag, and reference your test scripts when executing the run
command:
docker run --rm -it -v ${PWD}:/scripts \
artilleryio/artillery:latest \
run /scripts/test_script.yaml
In the above example, you're mounting your current directory containing your Artillery test script (test_script.yaml
) to /scripts
inside the container. You can then run the test script by referencing the full path inside the container - in this case, /scripts/test_script.yaml
.
Using a specific version of Artillery with Docker
The Artillery Docker image has multiple versions you can use. To run a specific version of Artillery using Docker, use the desired version tag in your docker run
command. For example, if you want to run your test scripts using Artillery 1.6.2:
docker run --rm -it -v ${PWD}:/scripts \
artilleryio/artillery:2.0.0-30 \
run /scripts/test_script.yaml
The latest
tag will always use the latest stable version of Artillery.