Skip to content

Commit

Permalink
Add s390x arch for build-from-source flavors, without PCRE JIT (#208)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
neomantra committed Jun 2, 2022
1 parent b70f9b6 commit 5b127e3
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 24 deletions.
40 changes: 35 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ jobs:
script:
- ./docker_build_and_push_flavor.sh alpine-amd64 alpine/Dockerfile

- name: Build s390x Docker image for build-from-source flavors alpine
stage: build
arch: s390x
script:
- ./docker_build_and_push_flavor.sh alpine-s390x alpine/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS=""

- name: Build aarch64 Docker image for build-from-source flavor bionic
arch: arm64
stage: build
Expand All @@ -72,6 +78,12 @@ jobs:
script:
- ./docker_build_and_push_flavor.sh bionic-amd64 bionic/Dockerfile

- name: Build s390x Docker image for build-from-source flavor bionic
arch: s390x
stage: build
script:
- ./docker_build_and_push_flavor.sh bionic-s390x bionic/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS=""

- name: Build aarch64 Docker image for build-from-source flavor focal
arch: arm64
stage: build
Expand All @@ -84,6 +96,12 @@ jobs:
script:
- ./docker_build_and_push_flavor.sh focal-amd64 focal/Dockerfile

- name: Build s390x Docker image for build-from-source flavor focal
arch: s390x
stage: build
script:
- ./docker_build_and_push_flavor.sh focal-s390x focal/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS=""

- name: Build aarch64 Docker image for build-from-source flavor jammy
arch: arm64
stage: build
Expand All @@ -96,6 +114,12 @@ jobs:
script:
- ./docker_build_and_push_flavor.sh jammy-amd64 jammy/Dockerfile

- name: Build s390x Docker image for build-from-source flavor jammy
arch: s390x
stage: build
script:
- ./docker_build_and_push_flavor.sh jammy-s390x jammy/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS=""

###############################################################################
# Build From OpenResty Upstream Flavors
# These are shorter to build are put in the same job (per architecture)
Expand Down Expand Up @@ -135,17 +159,17 @@ jobs:
- name: Create and push manifests for multi-arch images
stage: manifest
script:
- ./docker_manifest.sh alpine alpine-amd64 alpine-aarch64
- ./docker_manifest.sh alpine alpine-amd64 alpine-aarch64 alpine-s390x
- ./docker_manifest.sh alpine-apk alpine-apk-amd64 alpine-apk-aarch64
- ./docker_manifest.sh amzn2 amzn2-amd64 amzn2-aarch64
- ./docker_manifest.sh bionic  bionic-amd64 bionic-aarch64
- ./docker_manifest.sh bionic  bionic-amd64 bionic-aarch64 bionic-s390x
- ./docker_manifest.sh bullseye bullseye-amd64 bullseye-aarch64
- ./docker_manifest.sh buster buster-amd64 buster-aarch64
- ./docker_manifest.sh centos centos-amd64 centos-aarch64
- ./docker_manifest.sh centos7 centos7-amd64 centos7-aarch64
- ./docker_manifest.sh fedora fedora-amd64 fedora-aarch64
- ./docker_manifest.sh focal focal-amd64 focal-aarch64
- ./docker_manifest.sh jammy jammy-amd64 jammy-aarch64
- ./docker_manifest.sh focal focal-amd64 focal-aarch64 focal-s390x
- ./docker_manifest.sh jammy jammy-amd64 jammy-aarch64 jammy-s390x
- ./docker_manifest.sh rocky rocky-amd64 rocky-aarch64
- ./docker_tag_alias.sh centos centos-rpm
- ./docker_tag_alias.sh fedora fedora-rpm
Expand Down Expand Up @@ -177,9 +201,15 @@ jobs:
- ./docker_build_and_push_flavor.sh buster-fat-amd64 buster/Dockerfile.fat
- ./docker_build_and_push_flavor.sh alpine-fat-amd64 alpine/Dockerfile.fat

- name: Build s390x fat Docker image
arch: s390x
stage: build-fat
script:
- ./docker_build_and_push_flavor.sh alpine-fat-s390x alpine/Dockerfile.fat

- name: Create and push manifests for fat multi-arch images
stage: manifest-fat
script:
- ./docker_manifest.sh bullseye-fat bullseye-fat-amd64 bullseye-fat-aarch64
- ./docker_manifest.sh buster-fat buster-fat-amd64 buster-fat-aarch64
- ./docker_manifest.sh alpine-fat alpine-fat-amd64 alpine-fat-aarch64
- ./docker_manifest.sh alpine-fat alpine-fat-amd64 alpine-fat-aarch64 alpine-fat-s390x
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Changelog
=========

## untagged
## 1.21.4.1-1

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

## 1.21.4.1-0

Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The following "flavors" are built from source and are intended for more advanced

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

Since `1.19.3.2-1`, all flavors support multi-architecture builds, both `amd64` and `aarch64`.
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.

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).

Expand Down Expand Up @@ -216,8 +216,8 @@ $ docker inspect openresty/openresty:1.17.8.1-0-bionic | jq '.[].Config.Labels'
|`resty_apt_pgp` | buildarg `RESTY_APT_PGP` |
|`resty_apt_repo` | buildarg `RESTY_APT_REPO` |
|`resty_config_deps` | buildarg `_RESTY_CONFIG_DEPS` (internal) |
|`resty_config_options` | buildarg `RESTY_CONFIG_OPTIONS` |
|`resty_config_options_more` | buildarg `RESTY_CONFIG_OPTIONS_MORE` |
|`resty_config_options` | buildarg `RESTY_CONFIG_OPTIONS` |
|`resty_deb_flavor` | buildarg `RESTY_DEB_FLAVOR` |
|`resty_deb_version` | buildarg `RESTY_DEB_VERSION` ([available versions](https://openresty.org/package/debian/pool/openresty/o/openresty/)) |
|`resty_eval_post_make` | buildarg `RESTY_EVAL_POST_MAKE` |
Expand All @@ -230,11 +230,13 @@ $ docker inspect openresty/openresty:1.17.8.1-0-bionic | jq '.[].Config.Labels'
|`resty_install_tag` | buildarg `RESTY_INSTALL_TAG` |
|`resty_luajit_options` | buildarg `RESTY_LUAJIT_OPTIONS` |
|`resty_luarocks_version` | buildarg `RESTY_LUAROCKS_VERSION` |
|`resty_openssl_version` | buildarg `RESTY_OPENSSL_VERSION` |
|`resty_openssl_patch_version` | buildarg `RESTY_OPENSSL_PATCH_VERSION` |
|`resty_openssl_url_base` | buildarg `RESTY_OPENSSL_URL_BASE` |
|`resty_pcre_version` | buildarg `RESTY_PCRE_VERSION` |
|`resty_openssl_version` | buildarg `RESTY_OPENSSL_VERSION` |
|`resty_pcre_build_options` | buildarg `RESTY_PCRE_BUILD_OPTIONS` |
|`resty_pcre_options` | buildarg `RESTY_PCRE_OPTIONS` |
|`resty_pcre_sha256` | buildarg `RESTY_PCRE_SHA256` |
|`resty_pcre_version` | buildarg `RESTY_PCRE_VERSION` |
|`resty_rpm_arch` | buildarg `RESTY_RPM_ARCH` |
|`resty_rpm_dist` | buildarg `RESTY_RPM_DIST` |
|`resty_rpm_flavor` | buildarg `RESTY_RPM_FLAVOR` |
Expand Down Expand Up @@ -299,6 +301,8 @@ docker build --build-arg RESTY_J=4 -f bionic/Dockerfile .
|RESTY_OPENSSL_URL_BASE | https://www.openssl.org/source | The base of the URL to download OpenSSL from. |
|RESTY_PCRE_VERSION | 8.45 | The version of PCRE to use. |
|RESTY_PCRE_SHA256 | `4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09` | The SHA-256 checksum of the PCRE package to check. |
|RESTY_PCRE_BUILD_OPTIONS | "--enable-jit" | Options tweak Resty's PCRE build. |
|RESTY_PCRE_OPTIONS | "--with-pcre-jit" | Options to tweak Resty's build args regarding PCRE. |
|RESTY_J | 1 | Sets the parallelism level (-jN) for the builds. |
|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. |
|RESTY_LUAJIT_OPTIONS | "--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'" | Options to tweak LuaJIT. |
Expand Down
11 changes: 7 additions & 4 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1n"
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
ARG RESTY_PCRE_VERSION="8.45"
ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit"
ARG RESTY_PCRE_SHA256="4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09"
ARG RESTY_J="1"
ARG RESTY_CONFIG_OPTIONS="\
Expand Down Expand Up @@ -43,14 +44,14 @@ ARG RESTY_CONFIG_OPTIONS="\
--with-mail \
--with-mail_ssl_module \
--with-md5-asm \
--with-pcre-jit \
--with-sha1-asm \
--with-stream \
--with-stream_ssl_module \
--with-threads \
"
ARG RESTY_CONFIG_OPTIONS_MORE=""
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"

ARG RESTY_ADD_PACKAGE_BUILDDEPS=""
ARG RESTY_ADD_PACKAGE_RUNDEPS=""
Expand All @@ -70,6 +71,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}"
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
Expand All @@ -78,7 +80,8 @@ LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}"
LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}"
LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}"
LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"

LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"

RUN apk add --no-cache --virtual .build-deps \
build-base \
Expand Down Expand Up @@ -131,16 +134,16 @@ RUN apk add --no-cache --virtual .build-deps \
&& ./configure \
--prefix=/usr/local/openresty/pcre \
--disable-cpp \
--enable-jit \
--enable-utf \
--enable-unicode-properties \
${RESTY_PCRE_BUILD_OPTIONS} \
&& make -j${RESTY_J} \
&& make -j${RESTY_J} install \
&& cd /tmp \
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
&& cd /tmp/openresty-${RESTY_VERSION} \
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} \
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
&& make -j${RESTY_J} \
&& make -j${RESTY_J} install \
&& cd /tmp \
Expand Down
10 changes: 7 additions & 3 deletions bionic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1n"
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
ARG RESTY_PCRE_VERSION="8.45"
ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit"
ARG RESTY_PCRE_SHA256="4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09"
ARG RESTY_J="1"
ARG RESTY_CONFIG_OPTIONS="\
Expand Down Expand Up @@ -44,14 +45,14 @@ ARG RESTY_CONFIG_OPTIONS="\
--with-mail \
--with-mail_ssl_module \
--with-md5-asm \
--with-pcre-jit \
--with-sha1-asm \
--with-stream \
--with-stream_ssl_module \
--with-threads \
"
ARG RESTY_CONFIG_OPTIONS_MORE=""
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"

ARG RESTY_ADD_PACKAGE_BUILDDEPS=""
ARG RESTY_ADD_PACKAGE_RUNDEPS=""
Expand All @@ -72,6 +73,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}"
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
Expand All @@ -80,6 +82,8 @@ LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}"
LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}"
LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}"
LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"


RUN DEBIAN_FRONTEND=noninteractive apt-get update \
Expand Down Expand Up @@ -131,16 +135,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& ./configure \
--prefix=/usr/local/openresty/pcre \
--disable-cpp \
--enable-jit \
--enable-utf \
--enable-unicode-properties \
${RESTY_PCRE_BUILD_OPTIONS} \
&& make -j${RESTY_J} \
&& make -j${RESTY_J} install \
&& cd /tmp \
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
&& cd /tmp/openresty-${RESTY_VERSION} \
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} \
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
&& make -j${RESTY_J} \
&& make -j${RESTY_J} install \
&& cd /tmp \
Expand Down
2 changes: 1 addition & 1 deletion docker_manifest.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash -x
# Creates and pushes and pushes manifests flavors
# Creates and pushes manifests for flavors
#
# ./docker_manifest.sh FLAVOR TAG1 ....
#
Expand Down
10 changes: 7 additions & 3 deletions focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1n"
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
ARG RESTY_PCRE_VERSION="8.45"
ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit"
ARG RESTY_PCRE_SHA256="4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09"
ARG RESTY_J="1"
ARG RESTY_CONFIG_OPTIONS="\
Expand Down Expand Up @@ -44,14 +45,14 @@ ARG RESTY_CONFIG_OPTIONS="\
--with-mail \
--with-mail_ssl_module \
--with-md5-asm \
--with-pcre-jit \
--with-sha1-asm \
--with-stream \
--with-stream_ssl_module \
--with-threads \
"
ARG RESTY_CONFIG_OPTIONS_MORE=""
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"

ARG RESTY_ADD_PACKAGE_BUILDDEPS=""
ARG RESTY_ADD_PACKAGE_RUNDEPS=""
Expand All @@ -72,6 +73,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}"
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
Expand All @@ -80,6 +82,8 @@ LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}"
LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}"
LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}"
LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"


RUN DEBIAN_FRONTEND=noninteractive apt-get update \
Expand Down Expand Up @@ -131,16 +135,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& ./configure \
--prefix=/usr/local/openresty/pcre \
--disable-cpp \
--enable-jit \
--enable-utf \
--enable-unicode-properties \
${RESTY_PCRE_BUILD_OPTIONS} \
&& make -j${RESTY_J} \
&& make -j${RESTY_J} install \
&& cd /tmp \
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
&& cd /tmp/openresty-${RESTY_VERSION} \
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} \
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
&& make -j${RESTY_J} \
&& make -j${RESTY_J} install \
&& cd /tmp \
Expand Down
10 changes: 7 additions & 3 deletions jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ARG RESTY_OPENSSL_VERSION="1.1.1n"
ARG RESTY_OPENSSL_PATCH_VERSION="1.1.1f"
ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source"
ARG RESTY_PCRE_VERSION="8.45"
ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit"
ARG RESTY_PCRE_SHA256="4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09"
ARG RESTY_J="1"
ARG RESTY_CONFIG_OPTIONS="\
Expand Down Expand Up @@ -44,14 +45,14 @@ ARG RESTY_CONFIG_OPTIONS="\
--with-mail \
--with-mail_ssl_module \
--with-md5-asm \
--with-pcre-jit \
--with-sha1-asm \
--with-stream \
--with-stream_ssl_module \
--with-threads \
"
ARG RESTY_CONFIG_OPTIONS_MORE=""
ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'"
ARG RESTY_PCRE_OPTIONS="--with-pcre-jit"

ARG RESTY_ADD_PACKAGE_BUILDDEPS=""
ARG RESTY_ADD_PACKAGE_RUNDEPS=""
Expand All @@ -72,6 +73,7 @@ LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}"
LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}"
LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}"
LABEL resty_pcre_version="${RESTY_PCRE_VERSION}"
LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}"
LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}"
LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}"
LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}"
Expand All @@ -80,6 +82,8 @@ LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}"
LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}"
LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}"
LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}"
LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}"
LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}"


RUN DEBIAN_FRONTEND=noninteractive apt-get update \
Expand Down Expand Up @@ -131,16 +135,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& ./configure \
--prefix=/usr/local/openresty/pcre \
--disable-cpp \
--enable-jit \
--enable-utf \
--enable-unicode-properties \
${RESTY_PCRE_BUILD_OPTIONS} \
&& make -j${RESTY_J} \
&& make -j${RESTY_J} install \
&& cd /tmp \
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
&& cd /tmp/openresty-${RESTY_VERSION} \
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} \
&& eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \
&& make -j${RESTY_J} \
&& make -j${RESTY_J} install \
&& cd /tmp \
Expand Down

0 comments on commit 5b127e3

Please sign in to comment.