Skip to content

Commit 5b127e3

Browse files
committed
Add s390x arch for build-from-source flavors, without PCRE JIT (#208)
Flavors: alpine, alpine-fat, bionic, focal/jammy Build-from-source Dockfiles now have more custom PCRE build options as s390x does not support PCRE JIT. So we disable it in s390x builds.
1 parent b70f9b6 commit 5b127e3

File tree

8 files changed

+74
-24
lines changed

8 files changed

+74
-24
lines changed

.travis.yml

+35-5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ jobs:
6060
script:
6161
- ./docker_build_and_push_flavor.sh alpine-amd64 alpine/Dockerfile
6262

63+
- name: Build s390x Docker image for build-from-source flavors alpine
64+
stage: build
65+
arch: s390x
66+
script:
67+
- ./docker_build_and_push_flavor.sh alpine-s390x alpine/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS=""
68+
6369
- name: Build aarch64 Docker image for build-from-source flavor bionic
6470
arch: arm64
6571
stage: build
@@ -72,6 +78,12 @@ jobs:
7278
script:
7379
- ./docker_build_and_push_flavor.sh bionic-amd64 bionic/Dockerfile
7480

81+
- name: Build s390x Docker image for build-from-source flavor bionic
82+
arch: s390x
83+
stage: build
84+
script:
85+
- ./docker_build_and_push_flavor.sh bionic-s390x bionic/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS=""
86+
7587
- name: Build aarch64 Docker image for build-from-source flavor focal
7688
arch: arm64
7789
stage: build
@@ -84,6 +96,12 @@ jobs:
8496
script:
8597
- ./docker_build_and_push_flavor.sh focal-amd64 focal/Dockerfile
8698

99+
- name: Build s390x Docker image for build-from-source flavor focal
100+
arch: s390x
101+
stage: build
102+
script:
103+
- ./docker_build_and_push_flavor.sh focal-s390x focal/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS=""
104+
87105
- name: Build aarch64 Docker image for build-from-source flavor jammy
88106
arch: arm64
89107
stage: build
@@ -96,6 +114,12 @@ jobs:
96114
script:
97115
- ./docker_build_and_push_flavor.sh jammy-amd64 jammy/Dockerfile
98116

117+
- name: Build s390x Docker image for build-from-source flavor jammy
118+
arch: s390x
119+
stage: build
120+
script:
121+
- ./docker_build_and_push_flavor.sh jammy-s390x jammy/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS=""
122+
99123
###############################################################################
100124
# Build From OpenResty Upstream Flavors
101125
# These are shorter to build are put in the same job (per architecture)
@@ -135,17 +159,17 @@ jobs:
135159
- name: Create and push manifests for multi-arch images
136160
stage: manifest
137161
script:
138-
- ./docker_manifest.sh alpine alpine-amd64 alpine-aarch64
162+
- ./docker_manifest.sh alpine alpine-amd64 alpine-aarch64 alpine-s390x
139163
- ./docker_manifest.sh alpine-apk alpine-apk-amd64 alpine-apk-aarch64
140164
- ./docker_manifest.sh amzn2 amzn2-amd64 amzn2-aarch64
141-
- ./docker_manifest.sh bionic  bionic-amd64 bionic-aarch64
165+
- ./docker_manifest.sh bionic  bionic-amd64 bionic-aarch64 bionic-s390x
142166
- ./docker_manifest.sh bullseye bullseye-amd64 bullseye-aarch64
143167
- ./docker_manifest.sh buster buster-amd64 buster-aarch64
144168
- ./docker_manifest.sh centos centos-amd64 centos-aarch64
145169
- ./docker_manifest.sh centos7 centos7-amd64 centos7-aarch64
146170
- ./docker_manifest.sh fedora fedora-amd64 fedora-aarch64
147-
- ./docker_manifest.sh focal focal-amd64 focal-aarch64
148-
- ./docker_manifest.sh jammy jammy-amd64 jammy-aarch64
171+
- ./docker_manifest.sh focal focal-amd64 focal-aarch64 focal-s390x
172+
- ./docker_manifest.sh jammy jammy-amd64 jammy-aarch64 jammy-s390x
149173
- ./docker_manifest.sh rocky rocky-amd64 rocky-aarch64
150174
- ./docker_tag_alias.sh centos centos-rpm
151175
- ./docker_tag_alias.sh fedora fedora-rpm
@@ -177,9 +201,15 @@ jobs:
177201
- ./docker_build_and_push_flavor.sh buster-fat-amd64 buster/Dockerfile.fat
178202
- ./docker_build_and_push_flavor.sh alpine-fat-amd64 alpine/Dockerfile.fat
179203

204+
- name: Build s390x fat Docker image
205+
arch: s390x
206+
stage: build-fat
207+
script:
208+
- ./docker_build_and_push_flavor.sh alpine-fat-s390x alpine/Dockerfile.fat
209+
180210
- name: Create and push manifests for fat multi-arch images
181211
stage: manifest-fat
182212
script:
183213
- ./docker_manifest.sh bullseye-fat bullseye-fat-amd64 bullseye-fat-aarch64
184214
- ./docker_manifest.sh buster-fat buster-fat-amd64 buster-fat-aarch64
185-
- ./docker_manifest.sh alpine-fat alpine-fat-amd64 alpine-fat-aarch64
215+
- ./docker_manifest.sh alpine-fat alpine-fat-amd64 alpine-fat-aarch64 alpine-fat-s390x

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Changelog
22
=========
33

4-
## untagged
4+
## 1.21.4.1-1
55

66
* Add `rocky` flavor, Rocky Linux built-from-upstream
7+
* Add `s390x` architecture for built-from-source flavors, with PCRE JIT disabled
78

89
## 1.21.4.1-0
910

README.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The following "flavors" are built from source and are intended for more advanced
9595

9696
The `openresty/openresty:latest` tag points to the latest `bullseye` image.
9797

98-
Since `1.19.3.2-1`, all flavors support multi-architecture builds, both `amd64` and `aarch64`.
98+
Since `1.19.3.2-1`, all flavors support multi-architecture builds, both `amd64` and `aarch64`. Since `1.21.4.1-1`, the `s390x` architecture is supported for build-from-source flavors, however [PCRE JIT](https://github.com/zherczeg/sljit/issues/89) is disabled.
9999

100100
Starting with `1.13.6.1`, releases are tagged with `<openresty-version>-<image-version>-<flavor>`. The latest `image-version` will also be tagged `<openresty-version>-<flavor>`. The HEAD of the master branch is also labeled plainly as `<flavor>`. The builds are managed by [Travis-CI](https://travis-ci.com/github/neomantra/docker-openresty) and [Appveyor](https://ci.appveyor.com/project/openresty/docker-openresty) (for Windows images).
101101

@@ -216,8 +216,8 @@ $ docker inspect openresty/openresty:1.17.8.1-0-bionic | jq '.[].Config.Labels'
216216
|`resty_apt_pgp` | buildarg `RESTY_APT_PGP` |
217217
|`resty_apt_repo` | buildarg `RESTY_APT_REPO` |
218218
|`resty_config_deps` | buildarg `_RESTY_CONFIG_DEPS` (internal) |
219-
|`resty_config_options` | buildarg `RESTY_CONFIG_OPTIONS` |
220219
|`resty_config_options_more` | buildarg `RESTY_CONFIG_OPTIONS_MORE` |
220+
|`resty_config_options` | buildarg `RESTY_CONFIG_OPTIONS` |
221221
|`resty_deb_flavor` | buildarg `RESTY_DEB_FLAVOR` |
222222
|`resty_deb_version` | buildarg `RESTY_DEB_VERSION` ([available versions](https://openresty.org/package/debian/pool/openresty/o/openresty/)) |
223223
|`resty_eval_post_make` | buildarg `RESTY_EVAL_POST_MAKE` |
@@ -230,11 +230,13 @@ $ docker inspect openresty/openresty:1.17.8.1-0-bionic | jq '.[].Config.Labels'
230230
|`resty_install_tag` | buildarg `RESTY_INSTALL_TAG` |
231231
|`resty_luajit_options` | buildarg `RESTY_LUAJIT_OPTIONS` |
232232
|`resty_luarocks_version` | buildarg `RESTY_LUAROCKS_VERSION` |
233-
|`resty_openssl_version` | buildarg `RESTY_OPENSSL_VERSION` |
234233
|`resty_openssl_patch_version` | buildarg `RESTY_OPENSSL_PATCH_VERSION` |
235234
|`resty_openssl_url_base` | buildarg `RESTY_OPENSSL_URL_BASE` |
236-
|`resty_pcre_version` | buildarg `RESTY_PCRE_VERSION` |
235+
|`resty_openssl_version` | buildarg `RESTY_OPENSSL_VERSION` |
236+
|`resty_pcre_build_options` | buildarg `RESTY_PCRE_BUILD_OPTIONS` |
237+
|`resty_pcre_options` | buildarg `RESTY_PCRE_OPTIONS` |
237238
|`resty_pcre_sha256` | buildarg `RESTY_PCRE_SHA256` |
239+
|`resty_pcre_version` | buildarg `RESTY_PCRE_VERSION` |
238240
|`resty_rpm_arch` | buildarg `RESTY_RPM_ARCH` |
239241
|`resty_rpm_dist` | buildarg `RESTY_RPM_DIST` |
240242
|`resty_rpm_flavor` | buildarg `RESTY_RPM_FLAVOR` |
@@ -299,6 +301,8 @@ docker build --build-arg RESTY_J=4 -f bionic/Dockerfile .
299301
|RESTY_OPENSSL_URL_BASE | https://www.openssl.org/source | The base of the URL to download OpenSSL from. |
300302
|RESTY_PCRE_VERSION | 8.45 | The version of PCRE to use. |
301303
|RESTY_PCRE_SHA256 | `4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09` | The SHA-256 checksum of the PCRE package to check. |
304+
|RESTY_PCRE_BUILD_OPTIONS | "--enable-jit" | Options tweak Resty's PCRE build. |
305+
|RESTY_PCRE_OPTIONS | "--with-pcre-jit" | Options to tweak Resty's build args regarding PCRE. |
302306
|RESTY_J | 1 | Sets the parallelism level (-jN) for the builds. |
303307
|RESTY_CONFIG_OPTIONS | "--with-compat --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-ipv6 --with-mail --with-mail_ssl_module --with-md5-asm --with-pcre-jit --with-sha1-asm --with-stream --with-stream_ssl_module --with-threads" | Options to pass to OpenResty's `./configure` script. |
304308
|RESTY_LUAJIT_OPTIONS | "--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'" | Options to tweak LuaJIT. |

alpine/Dockerfile

+7-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1n"
1616
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
1717
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
1818
ARG RESTY_PCRE_VERSION="8.45"
19+
ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit"
1920
ARG RESTY_PCRE_SHA256="4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09"
2021
ARG RESTY_J="1"
2122
ARG RESTY_CONFIG_OPTIONS="\
@@ -43,14 +44,14 @@ ARG RESTY_CONFIG_OPTIONS="\
4344
--with-mail \
4445
--with-mail_ssl_module \
4546
--with-md5-asm \
46-
--with-pcre-jit \
4747
--with-sha1-asm \
4848
--with-stream \
4949
--with-stream_ssl_module \
5050
--with-threads \
5151
"
5252
ARG RESTY_CONFIG_OPTIONS_MORE=""
5353
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
54+
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"
5455

5556
ARG RESTY_ADD_PACKAGE_BUILDDEPS=""
5657
ARG RESTY_ADD_PACKAGE_RUNDEPS=""
@@ -70,6 +71,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
7071
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
7172
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
7273
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
74+
LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}"
7375
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
7476
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
7577
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
@@ -78,7 +80,8 @@ LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}"
7880
LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}"
7981
LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}"
8082
LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
81-
83+
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
84+
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"
8285

8386
RUN apk add --no-cache --virtual .build-deps \
8487
build-base \
@@ -131,16 +134,16 @@ RUN apk add --no-cache --virtual .build-deps \
131134
&& ./configure \
132135
--prefix=/usr/local/openresty/pcre \
133136
--disable-cpp \
134-
--enable-jit \
135137
--enable-utf \
136138
--enable-unicode-properties \
139+
${RESTY_PCRE_BUILD_OPTIONS} \
137140
&& make -j${RESTY_J} \
138141
&& make -j${RESTY_J} install \
139142
&& cd /tmp \
140143
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
141144
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
142145
&& cd /tmp/openresty-${RESTY_VERSION} \
143-
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} \
146+
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
144147
&& make -j${RESTY_J} \
145148
&& make -j${RESTY_J} install \
146149
&& cd /tmp \

bionic/Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1n"
1717
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
1818
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
1919
ARG RESTY_PCRE_VERSION="8.45"
20+
ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit"
2021
ARG RESTY_PCRE_SHA256="4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09"
2122
ARG RESTY_J="1"
2223
ARG RESTY_CONFIG_OPTIONS="\
@@ -44,14 +45,14 @@ ARG RESTY_CONFIG_OPTIONS="\
4445
--with-mail \
4546
--with-mail_ssl_module \
4647
--with-md5-asm \
47-
--with-pcre-jit \
4848
--with-sha1-asm \
4949
--with-stream \
5050
--with-stream_ssl_module \
5151
--with-threads \
5252
"
5353
ARG RESTY_CONFIG_OPTIONS_MORE=""
5454
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
55+
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"
5556

5657
ARG RESTY_ADD_PACKAGE_BUILDDEPS=""
5758
ARG RESTY_ADD_PACKAGE_RUNDEPS=""
@@ -72,6 +73,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
7273
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
7374
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
7475
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
76+
LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}"
7577
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
7678
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
7779
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
@@ -80,6 +82,8 @@ LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}"
8082
LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}"
8183
LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}"
8284
LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
85+
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
86+
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"
8387

8488

8589
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
@@ -131,16 +135,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
131135
&& ./configure \
132136
--prefix=/usr/local/openresty/pcre \
133137
--disable-cpp \
134-
--enable-jit \
135138
--enable-utf \
136139
--enable-unicode-properties \
140+
${RESTY_PCRE_BUILD_OPTIONS} \
137141
&& make -j${RESTY_J} \
138142
&& make -j${RESTY_J} install \
139143
&& cd /tmp \
140144
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
141145
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
142146
&& cd /tmp/openresty-${RESTY_VERSION} \
143-
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} \
147+
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
144148
&& make -j${RESTY_J} \
145149
&& make -j${RESTY_J} install \
146150
&& cd /tmp \

docker_manifest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash -x
2-
# Creates and pushes and pushes manifests flavors
2+
# Creates and pushes manifests for flavors
33
#
44
# ./docker_manifest.sh FLAVOR TAG1 ....
55
#

focal/Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1n"
1717
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
1818
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
1919
ARG RESTY_PCRE_VERSION="8.45"
20+
ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit"
2021
ARG RESTY_PCRE_SHA256="4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09"
2122
ARG RESTY_J="1"
2223
ARG RESTY_CONFIG_OPTIONS="\
@@ -44,14 +45,14 @@ ARG RESTY_CONFIG_OPTIONS="\
4445
--with-mail \
4546
--with-mail_ssl_module \
4647
--with-md5-asm \
47-
--with-pcre-jit \
4848
--with-sha1-asm \
4949
--with-stream \
5050
--with-stream_ssl_module \
5151
--with-threads \
5252
"
5353
ARG RESTY_CONFIG_OPTIONS_MORE=""
5454
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
55+
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"
5556

5657
ARG RESTY_ADD_PACKAGE_BUILDDEPS=""
5758
ARG RESTY_ADD_PACKAGE_RUNDEPS=""
@@ -72,6 +73,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
7273
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
7374
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
7475
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
76+
LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}"
7577
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
7678
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
7779
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
@@ -80,6 +82,8 @@ LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}"
8082
LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}"
8183
LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}"
8284
LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
85+
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
86+
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"
8387

8488

8589
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
@@ -131,16 +135,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
131135
&& ./configure \
132136
--prefix=/usr/local/openresty/pcre \
133137
--disable-cpp \
134-
--enable-jit \
135138
--enable-utf \
136139
--enable-unicode-properties \
140+
${RESTY_PCRE_BUILD_OPTIONS} \
137141
&& make -j${RESTY_J} \
138142
&& make -j${RESTY_J} install \
139143
&& cd /tmp \
140144
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
141145
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
142146
&& cd /tmp/openresty-${RESTY_VERSION} \
143-
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} \
147+
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
144148
&& make -j${RESTY_J} \
145149
&& make -j${RESTY_J} install \
146150
&& cd /tmp \

jammy/Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1n"
1717
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
1818
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
1919
ARG RESTY_PCRE_VERSION="8.45"
20+
ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit"
2021
ARG RESTY_PCRE_SHA256="4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09"
2122
ARG RESTY_J="1"
2223
ARG RESTY_CONFIG_OPTIONS="\
@@ -44,14 +45,14 @@ ARG RESTY_CONFIG_OPTIONS="\
4445
--with-mail \
4546
--with-mail_ssl_module \
4647
--with-md5-asm \
47-
--with-pcre-jit \
4848
--with-sha1-asm \
4949
--with-stream \
5050
--with-stream_ssl_module \
5151
--with-threads \
5252
"
5353
ARG RESTY_CONFIG_OPTIONS_MORE=""
5454
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
55+
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"
5556

5657
ARG RESTY_ADD_PACKAGE_BUILDDEPS=""
5758
ARG RESTY_ADD_PACKAGE_RUNDEPS=""
@@ -72,6 +73,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
7273
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
7374
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
7475
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
76+
LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}"
7577
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
7678
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
7779
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
@@ -80,6 +82,8 @@ LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}"
8082
LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}"
8183
LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}"
8284
LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
85+
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
86+
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"
8387

8488

8589
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
@@ -131,16 +135,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
131135
&& ./configure \
132136
--prefix=/usr/local/openresty/pcre \
133137
--disable-cpp \
134-
--enable-jit \
135138
--enable-utf \
136139
--enable-unicode-properties \
140+
${RESTY_PCRE_BUILD_OPTIONS} \
137141
&& make -j${RESTY_J} \
138142
&& make -j${RESTY_J} install \
139143
&& cd /tmp \
140144
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
141145
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
142146
&& cd /tmp/openresty-${RESTY_VERSION} \
143-
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} \
147+
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
144148
&& make -j${RESTY_J} \
145149
&& make -j${RESTY_J} install \
146150
&& cd /tmp \

0 commit comments

Comments
 (0)