Local WebPagetest Using Docker

Francis John

Francis JohnFollowAug 24, 2017 · 5 min read

(Update 8/25/2017: A day after this was posted, traffic shaping on Mac OS was officially supported, however if you are using Docker it will not work as Docker runs in a linux headless agent.)

Recently at NerdWallet we’ve started using SpeedCurve to have a historical record of our WebPagetest results and shiny graphs to help visualize. It’s been a really great tool in terms of measuring performance for a large production website.

However sometimes it can be useful to have an even tighter feedback loop when you are iterating on performance, to get a sense of what works and by how much.

WebPagetest is awesome but I found the documentation a bit lacking so I thought I’d share into my experience in setting up a WebPageTest private instance for local development.

Docker Setup

WebPageTest has two components that need to be in sync with each other, the server and the agent. The server handles the frontend app for WebPagetest and the agent actually runs the tests. The agent polls the server for tests to run, and posts to an endpoint on the server. To spin these up, the WebPageTest folks have created Docker images for both:

If you aren’t super familiar with Docker (as I wasn’t), I’d recommend going through the tutorials to familiarize yourself. After you’ve gotten setup you’ll want to pull down the WebPageTest server and agent images.

After pulling down the images you can create the containers.

Run the server

Just after running the server, you should be able to browse to http://localhost:4000 and see the webpage test private instance page to confirm it’s up.

NOTE: Feel free to specify ports other than the one(s) I’m using.

Run the agent

The SERVER_URL should be set to <your server>/work/ — it denotes the URL for the agent to poll. The LOCATION should match one of the locations defined in settings/locations.ini in the WebPagetest server. These define the parameters for that agent you are running (e.g. browsers supported, label, and other goodies). These environment variables are used in the startup script of the wptagent python app.

NOTE: The agent will throw errors if it can’t communicate with the server. Try running the above command without detached mode (remove the -d) and it will spit out errors if there are any.

Start it up

Head over to http://localhost:4000 . You should see the frontend for WebPagetest and on the surface things look good. Right? Let’s check. There’s a built in configuration check if you hit http://localhost:4000/install

What you should see at http://localhost:4000/install

If your agent is able to communicate with your server, you should see an agent connected for the Test Location. Easy enough.

However if you’re on OS X like I am, there’s still a bit more work needed.

Traffic Shaping MacOS Workaround (until supported)

Select Test Location from the locations dropdown and then enter a URL to test

Let’s try to run a test. Select the Test Location from the list of locations on your WPT server:

If you attempt to run a test at this point you’re going to see an error Error configuring traffic-shaping:

Error configuring traffic shaping 🙁

This is because traffic shaping has not yet been implemented on MacOS, so
we’ll need to implement a couple workarounds.

You can remove traffic shaping by doing two things — setting a dummy value for connectivity in your settings/locations.ini file on your server, and setting --shaper none when the agent is starting up.

I’d recommend creating a new Docker image based on the original WPT agent/server images but with modifications to the configuration.


Setup a new folder that has two files, a Dockerfile and a locations.ini



This defines a new docker image that pulls from webpagetest/server , replacing the locations.ini file with one that will work for OS X, particularly setting connectivity to remove traffic shaping.


Setup a new folder that has two files, a Dockerfile and a


This defines a new docker image with a copy of the existing WPT entrypoint script that tacks on the --shaper none flag.

Make sure is executable:

And now we can build our agent image:

Start it up (for real)

Alright now we should be able to start up our local copies. You may need to first stop the existing docker containers.

Stop the parent containers

Start up your local WPT containers

And voila you should now be able hit http://localhost:4000 and run webpage tests against your local environments:

Happy WebPagetesting!

Francis John


Francis John

Software Engineer

Tagged with: ,

Tagged with: , , ,

Tagged with:
Tagged with: ,

Tagged with: ,

Walkthrough: Deploying a new Sitecore environment to the Microsoft Azure App service

Sitecore 9.2 PaaS On Azure: A Hosting Price Breakdown

Tagged with: , ,

Let’s cook chebureki. At cousin Anatoli’s place.
Objective is not to burn house down and not wake everyone up with the excess cheeki breeki.
Cooking with Boris is very easy if you follow video and do not try to skip most important part like adding salt and vodka.


For dough:
1 egg
3 cups flour
1 shot of vodka
1 tablespoon sugar
1 teaspoon salt
1 cup water
sunflower seed oil

For filling
400g/14oz beef or pork minced meat
Some green onion, parsley and dill
Some ground black pepper
3 teaspoons salt

Serve with parsley and dill
Eat with side of mayonez

Good luck and enjoy!

Tagged with: ,

.NET Conf 2019

C# 101

.NET Core 101


Xamarin 101

Desktop and .NET Core 101

Introduction to Containers (Docker)

Entity Framework Core 101

Intro to Visual Studio


.NET for Apache Spark 101.

Tagged with: , ,

Торта Гараш

24 см диаметер – 9 парчета торта
26 см диаметър – 7 белтъка

250 грама сурови орехи орехи се смилат на финно със 2 супени лъжици кристална захар за да не станат на пюре
6 белтъка на стайна температура се рабъркват с тел докато станат на пяна
ореховото брашно се разбърква с белтъците
слага се 1 супена лъжица брашно (15 грама)
1 пълна чаена чаша пудра захар (130 грама)
дебелината на платката не трябва да е повече от 2 милиметра
платката се пече на 160 градуса за 20 минути
трябват ни 4 платките
може да се пече на горещ въздух на наколко нива, но температурата трябва да се намали – 150 градуса?

платкита трябва да изстинат

крем Гараш

натурален (черен) шоколад – 250 грама
стопява се на водна баня или микровълнова на малка мощност като се разбърква
темературата да не надвишава 50 градуса, разбърква се периодично

200 милилитра млечна сметана се слага в дуг съд
1 чаена чаша кристална захар (75 грама) се слага в сметаната
загрява се сметаната за да се разтопи захарта

когато шоколада е разтопен, сметана се добавя по малко и се разбърква докато се получи един пухкав крем,
добре е да се използва ръчен миксер.


Във формата се слага една платка на дъното
намазжа се с крем Гараш отгоре като се разтила добре. Дебелината е 1-2 милиметра
Слага се следващата платка и се повтаря процеса докато се намажат всики платки.
Формата се мага и с останалия крем се намажва отстрани със шпатула.

След като торатата се стегне се залива със шоколадов кувертюр (глазура) – този път само разтопен шоколад – 100 грама разтопен в микровълнова печка – 500-600 вата.
Добавя се една супена лъжица олио и се разбърква за блясък.
Торатата се облива със тази смес – слага се само отгоре и се разстила. Накрая се намазва отстрани.

Преди да се втвърди кувертюра се поръсва с бадемови или шам фъстък стружки по края – 30 грама. Може да се използват кокосови стружки.

Tagged with: ,

The credits go to

24 Questions

Can you send me the job description?

What are the three key factors to success in the role?

What can you tell me about the client’s business? Why has the client decided to hire for this role?

Who does the position report to?

Is the role a new position, or a replacement position? Is there an incumbent in the role right now?

Where are you in the process? Has this search been open a long time?

Is your client very committed to getting this role filled? If so, why has it been open for so short / long of a time?

Is the client looking at a wide variety of candidates or have they narrowed it down to a specific type of match? Have they been very picky or more open-minded about the types of candidates they see?

What’s the compensation package? Yes, I know competitive, but how competitive?

What’s the interview and decision-making process like? How many weeks or months can I expect?

What’s something you can tell me about the company that I can’t find myself online?

Where is the job physically located? What percent is it in-office, travel, remote work?

Have you successfully placed a candidate with this client before? Was it the same hiring manager? If so, what can you tell me about how that process went?

Are you the exclusive recruiter on this role for this company? (If they are, you’re likelier to be reviewed by the hiring manager. Whereas, if the role is being shopped by multiple contingency firms at the same time, it obviously means the relationship with the ultimate employer is weaker.)

Who referred me to you?…

With those two dozen questions, you should get a pretty good feel for the role, the company, and the recruiter’s relationship with the hiring manager.

Speaking of which, the recruiter’s relationship with the hiring manager is worth exploring.

The most important thing to understand, as it impacts absolutely everything else about your relationship with them, is that recruiters are paid by the company, work for the company, and must put the company’s interests first.

However friendly, clever, accommodating, engaging, funny and sympathetic a particular recruiter is in their interactions with you, ultimately, that recruiter works for the company. That means the client calls the shots, and their friendly interactions with you, however pleasant or persuasive or compelling, are a means to an end.

As obvious as this is, especially for professionals who themselves have hired recruiters to fill dozens or hundreds of roles before, the personality, affability, and agreeableness of the best professional recruiters have a magic power that seems to cause candidates to forget these fundamental truths. I’ve personally seen it hundreds of times over the years with even very high-level professionals.

So when you find a recruiter calling up to chat, before you say “yes”, pull up these 24 questions and learn a little bit more about the landscape before marching off to your destiny.