Skip to content

Commit f4ac66d

Browse files
authored
Merge pull request #93 from andreub/master
Add Dockerfile to run as cli
2 parents 698a652 + 0348dd5 commit f4ac66d

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:boron
2+
3+
# Create app directory
4+
RUN mkdir -p /usr/src/app
5+
WORKDIR /usr/src/app
6+
7+
# Install app dependencies
8+
COPY package.json /usr/src/app/
9+
RUN npm install
10+
11+
# Bundle app source
12+
COPY . /usr/src/app
13+
14+
ENTRYPOINT [ "bin/webpagetest" ]

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ $ npm install webpagetest -g
2020
$ webpagetest test https://twitter.com/marcelduran
2121
```
2222

23+
### Docker
24+
#### Build
25+
```bash
26+
$ docker build -t webpagetest-api .
27+
```
28+
#### Run
29+
```bash
30+
$ docker run -it --rm webpagetest-api -k YOURAPIKEY test https://twitter.com/marcelduran
31+
```
32+
2333
### Module
2434
```javascript
2535
var WebPageTest = require('webpagetest');

0 commit comments

Comments
 (0)