Installing with Docker

QuickStrom provides a Docker image as an easy installation method. Download the image using Docker:

$ docker pull quickstrom/quickstrom:0.5.0

Verify that Quickstrom can now be run using Docker:

$ docker run quickstrom/quickstrom:0.5.0 \
    quickstrom --help

You can now run Quickstrom checks:

1$ docker run \
2  -v $PWD/specs:/specs \
3  quickstrom/quickstrom:0.5.0 \
4  quickstrom -I/specs \
5  check example \

There’s a lot of things going in the above command. Let’s look at what each line does:

  1. Uses docker run to execute a program inside the container

  2. Mounts a host directory containing specification(s) to /specs in the container filesystem

  3. Uses the image quickstrom/quickstrom with the 0.5.0 tag

  4. Runs quickstrom with the mounted /specs directory as an include path

  5. Checks the example specificiation module (i.e. /specs/example.strom)

  6. Passes an origin URI (this could also be a file path into the mounted directory)

Accessing a Server on the Host

If you wish to run Quickstrom in Docker and test a website being hosted by the Docker host system you can set the URL to localhost (or host.docker.internal for MacOS).

1$ docker run \
2  --network=host \
3  -v $PWD/specs:/specs \
4  quickstrom/quickstrom:latest \
5  quickstrom -I/specs \
6  check example \
7  http://localhost:3000 # or http://host.docker.internal:3000 for MacOS

You may have to disable HOST checking if you get “Invalid Host header” messages.