mac-webpagetest-server
This Docker image inherits from webpagetest/server and adds a custom locations.ini
file which adds a connectivity parameter to avoid traffic-shaping bugs on MacOS. The solution was taken from this post.
Instructions
- Pull down the server image:
docker pull amsimpson/mac-webpagetest-server:latest
(or any tag instead oflatest
). - Start the server:
docker run -d -p 4000:80 amsimpson/mac-webpagetest-server
The server will now be available onlocalhost:4000
. - To run webpagetest locally you will also need
webpagetest/agent
:docker pull webpagetest/agent
- Start the agent:
docker run -d -p --network="host" -e "SERVER_URL=http://localhost:4000/work/" -e "LOCATION=Test" -e "SHAPER=none" webpagetest/agent
. The only note on running the agent is that on macOS you need to specify the environment variableSHAPER=none
to avoid traffic-shaping issues. Also to surface custom development domains such as.dev
domains that are defined in/etc/hosts
on your Mac you'll need to pass those mappings in as well, e.g.--add-host customdomain.dev:localMachineIP
.
Note: there is also an example docker-compose file (docker-compose.example.yml
) that demonstrates composing this server image with the official webpagetest/agent.