Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions DOCKER_BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Build using Docker

Build:

```bash
docker build -t lua-resty-http-builder:test .
```

Run:

```bash
docker run --rm -it -v "$(pwd)":/src -w /src lua-resty-http-builder:test bash

# Check LUA as well as run all tests and coverage:
luacheck lib && make coverage

# Run a single test file:
luacheck lib && TEST_FILE=t/01-basic.t make coverage
```
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM openresty/openresty:1.29.2.2-alpine-fat

RUN apk add --no-cache curl perl bash wget git perl-dev libarchive-tools nodejs; \
ln -s /usr/bin/bsdtar /usr/bin/tar

RUN curl -s -L https://cpanmin.us | perl - App::cpanminus > /bin/cpanm && chmod +x /bin/cpanm

RUN cpanm -q -n Test::Nginx

RUN /usr/local/openresty/luajit/bin/luarocks install luacov && \
/usr/local/openresty/luajit/bin/luarocks install lua-resty-openssl && \
/usr/local/openresty/luajit/bin/luarocks install luacheck
Loading