Skip to content

Commit 517e3ae

Browse files
committed
Document restyrepo flavor (#305)
Signed-off-by: Evan Wies <evan@neomantra.net>
1 parent 0dfcccf commit 517e3ae

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

BUILDING.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Dockerfiles are provided for the following base systems, selecting the Dockerfil
2828
* [Ubuntu Jammy](https://github.com/openresty/docker-openresty/blob/master/jammy/Dockerfile) (`jammy/Dockerfile`)
2929
* [Ubuntu Noble](https://github.com/openresty/docker-openresty/blob/master/noble/Dockerfile) (`noble/Dockerfile`)
3030
* [Ubuntu Resolute](https://github.com/openresty/docker-openresty/blob/master/resolute/Dockerfile) (`resolute/Dockerfile`)
31+
* [RestyRepo](https://github.com/openresty/docker-openresty/blob/master/restyrepo/Dockerfile) (`restyrepo/Dockerfile`)
3132

3233
We used to support more build flavors but have trimmed that down. Older Dockerfiles are archived in the [`archive`](https://github.com/openresty/docker-openresty/tree/master/archive) folder.
3334

@@ -38,11 +39,22 @@ The following are the available build-time options. They can be set using the `-
3839
docker build --build-arg RESTY_J=4 -f jammy/Dockerfile .
3940
```
4041

42+
The `restyrepo` flavor is different from the other source builds: it clones `RESTY_SOURCE_REPO`, checks out `RESTY_VERSION` as a branch or tag, runs the OpenResty source repository's `make` target to generate an OpenResty source tarball, and then builds from that tarball. Use it when you need to test an OpenResty source branch or fork before it is published as a release tarball or upstream package:
43+
44+
```
45+
docker build -t myopenresty-restyrepo -f restyrepo/Dockerfile .
46+
docker build -t myopenresty-restyrepo \
47+
--build-arg RESTY_VERSION=v1.31.1.1 \
48+
--build-arg RESTY_SOURCE_REPO=https://github.com/openresty/openresty.git \
49+
-f restyrepo/Dockerfile .
50+
```
51+
4152
| Key | Default | Description |
4253
|:-----------------------------------------| :-----: |:----------- |
43-
| RESTY_IMAGE_BASE | "ubuntu" / "alpine" | The Debian or Alpine Docker image base to build `FROM`. |
44-
| RESTY_IMAGE_TAG | "noble" / "3.22.3" | The Debian or Alpine Docker image tag to build `FROM`. |
45-
| RESTY_VERSION | 1.27.1.2 | The version of OpenResty to use. |
54+
| RESTY_IMAGE_BASE | "ubuntu" / "alpine" / "debian" for `restyrepo` | The Ubuntu, Alpine, or Debian Docker image base to build `FROM`. |
55+
| RESTY_IMAGE_TAG | "noble" / "3.22.3" / "trixie-slim" for `restyrepo` | The Ubuntu, Alpine, or Debian Docker image tag to build `FROM`. |
56+
| RESTY_VERSION | 1.27.1.2 / v1.31.1.1 for `restyrepo` | The version of OpenResty to use. For `restyrepo`, this is the branch or tag checked out from `RESTY_SOURCE_REPO` and should include the full ref name, such as `v1.31.1.1`. |
57+
| RESTY_SOURCE_REPO | "https://github.com/openresty/openresty.git" | The OpenResty source repository to clone. Used by `restyrepo`. |
4658
| RESTY_LUAROCKS_VERSION | 3.13.0 | The version of LuaRocks to use. |
4759
| RESTY_OPENSSL_VERSION | 3.5.7 | The version of OpenSSL to use. |
4860
| RESTY_OPENSSL_PATCH_VERSION | 3.5.5 | The version of OpenSSL to use when patching. |
@@ -238,4 +250,3 @@ End-To-End Tests
238250
================
239251

240252
The script [`./tests/e2e/run-test.sh`](./tests/e2e/run-test.sh) will stand up two local container registries and attempt to build all the images.
241-

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ It is best practice to pin your images to an explicit image tag. The [next sect
4747
| `openresty/openresty:1.29.2.4-1-bookworm-fat` | Built-from-upstream Debian Bookworm |
4848
| `openresty/openresty:1.29.2.4-1-alpine` | Built-from-source Alpine |
4949
| `openresty/openresty:1.29.2.4-1-alpine-apk` | Built-from-upstream Alpine |
50+
| `openresty/openresty:1.31.1.1-1-restyrepo` | Built-from-source OpenResty GitHub branch on Debian Trixie |
5051
| `openresty/openresty:1.31-alpine` | Latest Alpine image in the OpenResty 1.31 release series |
5152

5253
These are examples of untagged image names, for reference:
@@ -57,6 +58,7 @@ These are examples of untagged image names, for reference:
5758
| `openresty/openresty:noble` | Latest Ubuntu Noble |
5859
| `openresty/openresty:jammy` | Latest Ubuntu Jammy |
5960
| `openresty/openresty:alpine` | Latest Alpine |
61+
| `openresty/openresty:restyrepo` | Latest OpenResty GitHub source branch build |
6062

6163
There are also specific tags for [Debug](https://openresty.org/en/deb-packages.html#openresty-debug) and [Valgrind](https://openresty.org/en/deb-packages.html#openresty-valgrind) OpenResty variants:
6264
| Image | Description |
@@ -117,6 +119,7 @@ The following "flavors" are built from source and are intended for more advanced
117119
- [`alpine-slim`, (*alpine/Dockerfile*](https://github.com/openresty/docker-openresty/blob/master/alpine/Dockerfile), stripped Alpine image)
118120
- [`jammy`, (*jammy/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/jammy/Dockerfile)
119121
- [`noble`, (*noble/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/noble/Dockerfile)
122+
- [`restyrepo`, (*restyrepo/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/restyrepo/Dockerfile)
120123

121124
The `openresty/openresty:latest` tag points to the latest `bookworm` image.
122125

@@ -130,6 +133,8 @@ OpenResty supports SSE 4.2 optimizations. Starting with the `1.19.3.1` series,
130133

131134
It is *highly recommended* that you use the upstream-based images for best support. For best stability, pin your images to the full tag, for example `1.21.4.1-0-bionic`.
132135

136+
The `restyrepo` flavor is a built-from-source image that clones the OpenResty GitHub repository, builds the OpenResty source tarball from the selected branch or tag, and then builds OpenResty from that generated tarball. It uses Debian Trixie as its base image and is published for `amd64` and `arm64`.
137+
133138
`-fat` images are ones that have [LuaRocks and OPM](#opm) installed in them. `-buildpack` images are based on [`buildpack-deps` images](https://hub.docker.com/_/buildpack-deps#what-is-buildpack-deps); they might be useful when more build scaffolding is required in your application.
134139

135140

0 commit comments

Comments
 (0)