├── .dockerignore ├── .gitignore ├── .travis.yml ├── AUTHORS.md ├── CHANGELOG.md ├── COPYRIGHT ├── README.md ├── Taskfile.yml ├── alpine-apk └── Dockerfile ├── alpine ├── Dockerfile └── Dockerfile.fat ├── appveyor.yml ├── archive ├── Dockerfile.armhf-xenial ├── Dockerfile.centos ├── Dockerfile.jessie ├── Dockerfile.stretch ├── Dockerfile.stretch.fat ├── Dockerfile.stretch.luarocks_example ├── Dockerfile.stretch.opm_example ├── Dockerfile.trusty ├── Dockerfile.wheezy ├── Dockerfile.xenial └── buster │ ├── Dockerfile │ ├── Dockerfile.fat │ ├── Dockerfile.luarocks_example │ └── Dockerfile.opm_example ├── bionic └── Dockerfile ├── bookworm ├── Dockerfile ├── Dockerfile.buildpack └── Dockerfile.fat ├── bullseye ├── Dockerfile ├── Dockerfile.debug ├── Dockerfile.fat └── Dockerfile.valgrind ├── centos ├── Dockerfile └── Dockerfile.expat_example ├── centos7 └── Dockerfile ├── docker_build_and_push_flavor.sh ├── docker_build_and_push_flavor_fat.sh ├── docker_manifest.sh ├── docker_tag_alias.sh ├── fedora └── Dockerfile ├── focal └── Dockerfile ├── jammy └── Dockerfile ├── nginx.conf ├── nginx.vh.default.conf ├── noble └── Dockerfile └── windows └── Dockerfile /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | AUTHORS.md 3 | CHANGELOG.md 4 | COPYRIGHT 5 | README.md 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # docker-openresty .travis.yml 2 | # 3 | # Builds docker-openresty images on Travis CI 4 | # 5 | # https://travis-ci.com/github/openresty/docker-openresty 6 | # 7 | # 8 | # Master will build with Docker tag: 9 | # openresty: 10 | # 11 | # Releases should be tagged in git as: 12 | # - 13 | # 14 | # This will build with Docker tags: 15 | # openresty:-- 16 | # openresty:- 17 | # 18 | 19 | os: linux 20 | dist: focal 21 | language: generic 22 | 23 | addons: 24 | apt: 25 | sources: 26 | - sourceline: 'deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable' 27 | key_url: 'https://download.docker.com/linux/ubuntu/gpg' 28 | packages: 29 | - docker-ce 30 | - docker-ce-cli 31 | 32 | services: 33 | - docker 34 | 35 | stages: 36 | - build 37 | - manifest 38 | - build-fat 39 | - manifest-fat 40 | 41 | before_script: 42 | - echo $DOCKER_PASSWORD > /tmp/docker.pass 43 | - echo $DOCKER_MIRROR_PASSWORD > /tmp/docker_mirror.pass 44 | 45 | jobs: 46 | include: 47 | ############################################################################### 48 | # Build From Source Flavors 49 | # These take longer to build and are put in their own jobs 50 | ############################################################################### 51 | 52 | - name: Build Docker image for build-from-source flavors -- alpine / aarch64 53 | stage: build 54 | arch: arm64 55 | script: 56 | - ./docker_build_and_push_flavor.sh alpine-aarch64 alpine/Dockerfile 57 | 58 | - name: Build Docker image for build-from-source flavors -- alpine / amd64 59 | stage: build 60 | arch: amd64 61 | script: 62 | - ./docker_build_and_push_flavor.sh alpine-amd64 alpine/Dockerfile 63 | 64 | - name: Build Docker image for build-from-source flavors -- alpine-slim / aarch64 65 | stage: build 66 | arch: arm64 67 | script: 68 | - ./docker_build_and_push_flavor.sh alpine-slim-aarch64 alpine/Dockerfile --build-arg RESTY_STRIP_BINARIES="1" 69 | 70 | - name: Build Docker image for build-from-source flavors -- alpine-slim / amd64 71 | stage: build 72 | arch: amd64 73 | script: 74 | - ./docker_build_and_push_flavor.sh alpine-slim-amd64 alpine/Dockerfile --build-arg RESTY_STRIP_BINARIES="1" 75 | 76 | - name: Build Docker image for build-from-source flavor -- bionic / aarch64 77 | arch: arm64 78 | stage: build 79 | script: 80 | - ./docker_build_and_push_flavor.sh bionic-aarch64 bionic/Dockerfile 81 | 82 | - name: Build Docker image for build-from-source flavor -- bionic / amd64 83 | arch: amd64 84 | stage: build 85 | script: 86 | - ./docker_build_and_push_flavor.sh bionic-amd64 bionic/Dockerfile 87 | 88 | - name: Build Docker image for build-from-source flavor -- bionic / s390x 89 | arch: s390x 90 | stage: build 91 | script: 92 | - ./docker_build_and_push_flavor.sh bionic-s390x bionic/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS="" 93 | 94 | - name: Build Docker image for build-from-source flavor -- focal / aarch64 95 | arch: arm64 96 | stage: build 97 | script: 98 | - ./docker_build_and_push_flavor.sh focal-aarch64 focal/Dockerfile 99 | 100 | - name: Build Docker image for build-from-source flavor -- focal / amd64 101 | arch: amd64 102 | stage: build 103 | script: 104 | - ./docker_build_and_push_flavor.sh focal-amd64 focal/Dockerfile 105 | 106 | - name: Build Docker image for build-from-source flavor -- focal / s390x 107 | arch: s390x 108 | stage: build 109 | script: 110 | - ./docker_build_and_push_flavor.sh focal-s390x focal/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS="" 111 | 112 | - name: Build Docker image for build-from-source flavor -- jammy / aarch64 113 | arch: arm64 114 | stage: build 115 | script: 116 | - ./docker_build_and_push_flavor.sh jammy-aarch64 jammy/Dockerfile 117 | 118 | - name: Build Docker image for build-from-source flavor -- jammy / amd64 119 | arch: amd64 120 | stage: build 121 | script: 122 | - ./docker_build_and_push_flavor.sh jammy-amd64 jammy/Dockerfile 123 | 124 | - name: Build Docker image for build-from-source flavor -- jammy / s390x 125 | arch: s390x 126 | stage: build 127 | script: 128 | - ./docker_build_and_push_flavor.sh jammy-s390x jammy/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS="" 129 | 130 | - name: Build Docker image for build-from-source flavor -- noble / aarch64 131 | arch: arm64 132 | stage: build 133 | script: 134 | - ./docker_build_and_push_flavor.sh noble-aarch64 noble/Dockerfile 135 | 136 | - name: Build Docker image for build-from-source flavor -- noble / amd64 137 | arch: amd64 138 | stage: build 139 | script: 140 | - ./docker_build_and_push_flavor.sh noble-amd64 noble/Dockerfile 141 | 142 | - name: Build Docker image for build-from-source flavor -- noble / s390x 143 | arch: s390x 144 | stage: build 145 | script: 146 | - ./docker_build_and_push_flavor.sh noble-s390x noble/Dockerfile --build-arg RESTY_PCRE_BUILD_OPTIONS="" --build-arg RESTY_PCRE_OPTIONS="" 147 | 148 | ############################################################################### 149 | # Build From OpenResty Upstream Flavors 150 | # These are shorter to build are put in the same job (per architecture) 151 | ############################################################################### 152 | 153 | - name: Build Docker image for upstream flavors -- aarch64 154 | arch: arm64 155 | stage: build 156 | script: 157 | - ./docker_build_and_push_flavor.sh alpine-apk-aarch64 alpine-apk/Dockerfile 158 | - ./docker_build_and_push_flavor.sh amzn2-aarch64 centos/Dockerfile --build-arg RESTY_IMAGE_BASE=amazonlinux --build-arg RESTY_IMAGE_TAG=2 --build-arg RESTY_YUM_REPO="https://openresty.org/package/amazon/openresty.repo" --build-arg RESTY_RPM_DIST="amzn2" --build-arg RESTY_RPM_ARCH="aarch64" 159 | - ./docker_build_and_push_flavor.sh rocky-aarch64 fedora/Dockerfile --build-arg RESTY_IMAGE_BASE=rockylinux --build-arg RESTY_IMAGE_TAG=8.5 --build-arg RESTY_YUM_REPO="https://openresty.org/package/rocky/openresty.repo" --build-arg RESTY_RPM_DIST="el8" --build-arg RESTY_RPM_ARCH="aarch64" 160 | - ./docker_build_and_push_flavor.sh centos-aarch64 centos/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 161 | - ./docker_build_and_push_flavor.sh centos7-aarch64 centos7/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 162 | - ./docker_build_and_push_flavor.sh fedora-aarch64 fedora/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 163 | - ./docker_build_and_push_flavor.sh bookworm-aarch64 bookworm/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" 164 | - ./docker_build_and_push_flavor.sh bookworm-buildpack-aarch64 bookworm/Dockerfile.buildpack --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" 165 | - ./docker_build_and_push_flavor.sh bullseye-aarch64 bullseye/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" 166 | - ./docker_build_and_push_flavor.sh bullseye-debug-aarch64 bullseye/Dockerfile.debug --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" 167 | - ./docker_build_and_push_flavor.sh bullseye-valgrind-aarch64 bullseye/Dockerfile.valgrind --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" 168 | 169 | - name: Build Docker image for upstream flavors -- amd64 170 | arch: amd64 171 | stage: build 172 | script: 173 | - ./docker_build_and_push_flavor.sh alpine-apk-amd64 alpine-apk/Dockerfile 174 | - ./docker_build_and_push_flavor.sh amzn2-amd64 centos/Dockerfile --build-arg RESTY_IMAGE_BASE=amazonlinux --build-arg RESTY_IMAGE_TAG=2 --build-arg RESTY_YUM_REPO="https://openresty.org/package/amazon/openresty.repo" --build-arg RESTY_RPM_DIST="amzn2" 175 | - ./docker_build_and_push_flavor.sh rocky-amd64 fedora/Dockerfile --build-arg RESTY_IMAGE_BASE=rockylinux --build-arg RESTY_IMAGE_TAG=8.5 --build-arg RESTY_YUM_REPO="https://openresty.org/package/rocky/openresty.repo" --build-arg RESTY_RPM_DIST="el8" 176 | - ./docker_build_and_push_flavor.sh centos-amd64 centos/Dockerfile 177 | - ./docker_build_and_push_flavor.sh centos7-amd64 centos7/Dockerfile 178 | - ./docker_build_and_push_flavor.sh fedora-amd64 fedora/Dockerfile 179 | - ./docker_build_and_push_flavor.sh bookworm-amd64 bookworm/Dockerfile 180 | - ./docker_build_and_push_flavor.sh bookworm-buildpack-amd64 bookworm/Dockerfile.buildpack 181 | - ./docker_build_and_push_flavor.sh bullseye-amd64 bullseye/Dockerfile 182 | - ./docker_build_and_push_flavor.sh bullseye-debug-amd64 bullseye/Dockerfile.debug 183 | - ./docker_build_and_push_flavor.sh bullseye-valgrind-amd64 bullseye/Dockerfile.valgrind 184 | 185 | ############################################################################### 186 | # Multi-arch manifests 187 | ############################################################################### 188 | 189 | # also master bookworm gets tagged "latest" 190 | - name: Create and push manifests for multi-arch images 191 | stage: manifest 192 | script: 193 | - ./docker_manifest.sh alpine alpine-amd64 alpine-aarch64 194 | - ./docker_manifest.sh alpine-slim alpine-slim-amd64 alpine-slim-aarch64 195 | - ./docker_manifest.sh alpine-apk alpine-apk-amd64 alpine-apk-aarch64 196 | - ./docker_manifest.sh amzn2 amzn2-amd64 amzn2-aarch64 197 | - ./docker_manifest.sh bionic bionic-amd64 bionic-aarch64 bionic-s390x 198 | - ./docker_manifest.sh bookworm bookworm-amd64 bookworm-aarch64 199 | - ./docker_manifest.sh bookworm-buildpack bookworm-buildpack-amd64 bookworm-buildpack-aarch64 200 | - ./docker_manifest.sh bullseye bullseye-amd64 bullseye-aarch64 201 | - ./docker_manifest.sh bullseye-debug bullseye-debug-amd64 bullseye-debug-aarch64 202 | - ./docker_manifest.sh bullseye-valgrind bullseye-valgrind-amd64 bullseye-valgrind-aarch64 203 | - ./docker_manifest.sh centos centos-amd64 centos-aarch64 204 | - ./docker_manifest.sh centos7 centos7-amd64 centos7-aarch64 205 | - ./docker_manifest.sh fedora fedora-amd64 # fedora-aarch64 206 | - ./docker_manifest.sh focal focal-amd64 focal-aarch64 focal-s390x 207 | - ./docker_manifest.sh jammy jammy-amd64 jammy-aarch64 jammy-s390x 208 | - ./docker_manifest.sh noble noble-amd64 noble-aarch64 noble-s390x 209 | - ./docker_manifest.sh rocky rocky-amd64 rocky-aarch64 210 | - ./docker_tag_alias.sh centos centos-rpm 211 | - ./docker_tag_alias.sh fedora fedora-rpm 212 | - if [[ "$TRAVIS_BRANCH" == "master" ]] ; then 213 | echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin && 214 | docker pull $DOCKER_ORG/openresty:bookworm && 215 | docker tag $DOCKER_ORG/openresty:bookworm $DOCKER_ORG/openresty:latest && 216 | docker push $DOCKER_ORG/openresty:latest ; 217 | fi 218 | 219 | ############################################################################### 220 | # Build Derived ("fat") Flavors 221 | # Built after other images 222 | ############################################################################### 223 | 224 | - name: Build fat Docker image -- aarch64 225 | stage: build-fat 226 | arch: arm64 227 | script: 228 | - ./docker_build_and_push_flavor_fat.sh bookworm-fat-aarch64 bookworm/Dockerfile.fat 229 | - ./docker_build_and_push_flavor_fat.sh bullseye-fat-aarch64 bullseye/Dockerfile.fat 230 | - ./docker_build_and_push_flavor_fat.sh alpine-fat-aarch64 alpine/Dockerfile.fat 231 | 232 | - name: Build fat Docker image -- amd64 233 | arch: amd64 234 | stage: build-fat 235 | script: 236 | - ./docker_build_and_push_flavor_fat.sh bookworm-fat-amd64 bookworm/Dockerfile.fat 237 | - ./docker_build_and_push_flavor_fat.sh bullseye-fat-amd64 bullseye/Dockerfile.fat 238 | - ./docker_build_and_push_flavor_fat.sh alpine-fat-amd64 alpine/Dockerfile.fat 239 | 240 | - name: Create and push manifests for fat multi-arch images 241 | stage: manifest-fat 242 | script: 243 | - ./docker_manifest.sh bookworm-fat bookworm-fat-amd64 bookworm-fat-aarch64 244 | - ./docker_manifest.sh bullseye-fat bullseye-fat-amd64 bullseye-fat-aarch64 245 | - ./docker_manifest.sh alpine-fat alpine-fat-amd64 alpine-fat-aarch64 246 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | We'd like to thank the following people for their commits: 2 | 3 | - Evan Wies 4 | - Yichun Zhang (agentzh) 5 | - Connor Poole 6 | - Lef Ioannidis 7 | - Onni Hakala 8 | - mahnkong 9 | - Markus Lippert 10 | - Davide Montanari 11 | - Roy Nasser (NeoAssist) 12 | - Joseph C. Sible 13 | - Robin Ketelbuters 14 | - Joel Linn 15 | - Kshitij Joshi 16 | - Duncan Schulze 17 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Changelog 2 | ========= 3 | 4 | ## 1.27.1.2-1 (2025-05-19) 5 | 6 | * Mirror images to GitHub Container Registry, using image prefix `ghcr.io/` (#270) 7 | * Allow custom script before make command with `RESTY_EVAL_PRE_MAKE` (#275) 8 | * Add stripped `alpine-slim` flavor (#273) 9 | 10 | ## 1.27.1.2-0 (2025-04-04) 11 | 12 | * Upgrade OpenResty to 1.27.1.2 13 | * Upgrade OpenSSL to 3.4.1 14 | * Move `buster` to archive as [upstream no longer supports it](https://github.com/openresty/openresty-packaging/issues/148) 15 | * `latest` tags now point to `bookworm` flavor 16 | 17 | ## 1.27.1.1-4 (2025-03-31) 18 | 19 | * Add `bookworm-buildpack` flavor. ([#267](https://github.com/openresty/docker-openresty/issues/267)) 20 | * Tagged build for Alpine CVE-2025-27113 ([#272](https://github.com/openresty/docker-openresty/issues/272)) 21 | 22 | ## 1.25.3.2-3 (2025-02-25) 23 | 24 | * Update `alpine-apk` flavor to Alpine 3.18.12 25 | * Update `alpine` flavor to Alpine 3.20.6 26 | 27 | ## 1.21.4.4-1 (2025-02-25) 28 | 29 | * Update `alpine-apk` flavor to Alpine 3.18.12 30 | * Update `alpine` flavor to Alpine 3.20.6 31 | 32 | ## 1.27.1.1-2 (2025-02-25) 33 | 34 | * Update `alpine` built-from-source flavor to Alpine 3.21.3 (#268) 35 | * Update `RESTY_OPENSSL_VERSION` to 3.0.16 36 | * Fix `RESTY_OPENSSL_VERSION` patching -- broken since `1.27.1.1-0` 37 | 38 | ## 1.27.1.1-1 (2025-01-10) 39 | 40 | * Upgrade `alpine` built-from source flavor to Alpine 3.21 41 | 42 | ## 1.27.1.1-0 (2024-10-22) 43 | 44 | * Upgrade OpenResty to 1.27.1.1 (#264) 45 | * Upgrade OpenSSL to 3.0.15 46 | * Upgrade PCRE to 10.44 47 | 48 | * **BREAKING:** For parity with upstream, built-from-source also removes `--with-aio` [to improve startup performance](https://github.com/openresty/openresty-packaging/commit/81bd2facc9c725bc92c440200ed7cb7e355e510e). 49 | 50 | ## 1.25.3.2-2 (2024-10-22) 51 | 52 | * Update LuaRocks to `3.11.1` 53 | * Add `include /etc/nginx/conf.d/*.conf;` to `nginx.conf` for injecting config into main stanza (#257). **NOTE:** This may be a **breaking change** for those bind-mounting existing files named `*.main`. 54 | 55 | ## 1.25.3.2-1 (2024-10-18) 56 | 57 | * Add `tzdata` and `zlib` packages to Alpine flavors (#263) 58 | * Add `bullseye-debug` and `bullseye-valgrind` flavors (#259) 59 | * Install envsubst (part of gettext-base) in Debian Bookworm (#261) 60 | 61 | ## 1.25.3.2-0 62 | 63 | * Upgrade OpenResty to 1.25.3.2 (#256) 64 | * `centos7` now uses `yum` from `vault.centos.org` as it is now EOL 65 | 66 | ## 1.25.3.1-5 67 | 68 | * Add `noble` build-from-source flavor for Ubuntu Noble Numbat 24.04 (#253) 69 | * Restore `s390x` architecture for `jammy` and `noble` flavors (#209) 70 | 71 | ## 1.25.3.1-4 72 | 73 | * Upgrade `alpine` built-from-source flavor to Alpine 3.20 74 | 75 | ## 1.25.3.1-3 76 | 77 | * Fix `LUA_PATH` for recent `luajit` installs (#249) 78 | * Update `RESTY_OPENSSL_URL_BASE` to `https://www.openssl.org/source/old/1.1.1` 79 | * Update LuaRocks to `3.11.0` 80 | * Remove obsolete `--lua-suffix` from LuaRocks build command 81 | 82 | ## 1.25.3.1-2 83 | 84 | * Update `windows` tag to `openresty/openresty:windows-2019` 85 | * Change base install image of `windows` to dotnet image 86 | * Fix syntax error in command instruction of `windows` build 87 | 88 | ## 1.25.3.1-1 89 | 90 | * Add `--with-http_v3_module` to build-from-source flavors 91 | 92 | ## 1.25.3.1-0 93 | 94 | * Upgrade OpenResty to 1.25.3.1 (#243) 95 | 96 | ## 1.21.4.4-0 (2024-10-17) 97 | 98 | * Upgrade OpenResty to 1.21.4.4 (#258) 99 | * Backport: 100 | * Added Taskfile 101 | * Upgrade `alpine` built-from-source flavor to Alpine 3.20 102 | * Update `windows` tag to `openresty/openresty:windows-2019` 103 | * Change base install image of `windows` to dotnet image 104 | * Fix syntax error in command instruction of `windows` build 105 | * Update `RESTY_OPENSSL_URL_BASE` to `https://www.openssl.org/source/old/1.1.1` 106 | * `centos7` now uses `yum` from `vault.centos.org` as it is now EOL 107 | * Add `noble` build-from-source flavor for Ubuntu Noble Numbat 24.04 (#253) 108 | * Restore `s390x` architecture for `jammy` and `noble` flavors (#209) 109 | * Add `tzdata` and `zlib` packages to `alpine` and `alpine-apk` flavors (#263) 110 | * Install `envsubst` in Debian Bookworm via `gettext-base` (#261) 111 | 112 | ## 1.21.4.3-3 113 | 114 | * Upgrade `alpine` built-from-source flavor to Alpine 3.19 (#244) 115 | 116 | ## 1.21.4.3-2 117 | 118 | * Upgrade `alpine-apk` flavor to Alpine 3.18 (#235) 119 | 120 | ## 1.21.4.3-1 121 | 122 | * Add Debian `bookworm` built-from-upstream flavor (#232) 123 | 124 | ## 1.21.4.3-0 125 | 126 | * Upgrade OpenResty to 1.21.4.3. Addresses CVE-2023-44487 (#238) 127 | * Restore fedora aarch64 build 128 | 129 | ## 1.21.4.2-1 130 | 131 | * Update OpenSSL to `1.1.1w` for built-from-source flavors (#237) 132 | 133 | ## 1.21.4.2-0 134 | 135 | * Upgrade OpenResty to 1.21.4.2 136 | * Bump `fedora` flavor to FC36. 137 | * Upgrade LuaRocks to 3.9.2 138 | 139 | ## 1.21.4.1-8 140 | 141 | * Add Policies to README to clarify how we operate 142 | * Upgraded Alpine to `3.18` for `alpine` not `alpine-apk` 143 | * Update OpenSSL to `1.1.1u` for built-from-source flavors (#233) 144 | 145 | ## 1.21.4.1-7 146 | 147 | * Tagged rebuild to catch latest Alpine and more. 148 | * Remove Fedora aarch64 build (#229) 149 | 150 | ## 1.21.4.1-6 151 | 152 | * Added `centos/Dockerfile.expat_example` of installing expat from source (#221) 153 | * Upgraded Alpine to `3.17` for `alpine` not `alpine-apk` (#224) 154 | * Update OpenSSL to 1.1.1t for built-from-source flavors 155 | 156 | ## 1.21.4.1-5 157 | 158 | * Adds `RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE` build argument to run patches 159 | against OpenResty source download (#219). 160 | 161 | ## 1.21.4.1-4 162 | 163 | * Tag to update CI/CD with latest base images, 2022-11-30. 164 | 165 | ## 1.21.4.1-3 166 | 167 | * Update OpenSSL to 1.1.1q for built-from-source flavors (#212) 168 | * Ensure "fat" images are built from the correct RESTY_IMAGE_TAG_BASE (#211) 169 | * "Fat" Debian images now install the `resty` utility 170 | 171 | ## 1.21.4.1-2 172 | 173 | * Update OpenSSL to 1.1.1p for built-from-source flavors due to CVE-2022-2068 174 | * Remove `jammy` flavor on `s390x` architecture because the build rarely succeeds (#209) 175 | 176 | ## 1.21.4.1-1 177 | 178 | * Add `rocky` flavor, Rocky Linux built-from-upstream 179 | * Add `s390x` architecture for built-from-source Ubuntu flavors, with PCRE JIT disabled 180 | * Upgrade built-from-source `alpine` to Alpine `3.16` 181 | 182 | ## 1.21.4.1-0 183 | 184 | * Upgrade OpenResty to 1.21.4.1 185 | * Upgrade PRCE to 8.45 for built-from-source flavors 186 | * Bump `fedora` flavor to FC35. 187 | 188 | ## 1.21.4.1rc3-1 189 | 190 | * LuaRocks 3.9.0 depends on wget (#204) 191 | 192 | ## 1.21.4.1rc3-0 193 | 194 | * Upgrade Openresty to 1.21.4.1rc3 195 | NOTE: only for build-from-source flavors `alpine`, `bionic`, `focal`, `jammy` 196 | 197 | ## 1.19.9.1-14 198 | 199 | * Update OpenSSL to 1.1.1q for built-from-source flavors (#212) 200 | * Ensure "fat" images are built from the correct RESTY_IMAGE_TAG_BASE (#211) 201 | * "Fat" Debian images now install the `resty` utility 202 | 203 | ## 1.19.9.1-13 204 | NOTE!!! The "fat" images for 1.19.9.1-13 are accidentally based on OpenResty 1.21.4.1. 205 | Other version tags are OK. 206 | 207 | * Update OpenSSL to 1.1.1p for built-from-source flavors due to CVE-2022-2068 208 | * Upgrade PRCE to 8.45 for built-from-source flavors 209 | * Upgrade built-from-source `alpine` to Alpine `3.16` 210 | * Bump `fedora` flavor to FC35. 211 | 212 | ## 1.19.9.1-12 213 | 214 | * LuaRocks 3.9.0 depends on wget (#204) 215 | 216 | ## 1.19.9.1-11 217 | 218 | * Update LuaRocks to 3.9.0 219 | * Add `jammy` build-from-source flavor for Ubuntu Jammy Jellyfish 22.04 220 | 221 | ## 1.19.9.1-10 222 | 223 | * Tagged rebuild to get zlib-1.2.12 due to CVE-2018-25032 (#202) 224 | 225 | ## 1.19.9.1-9 226 | 227 | * Upgrade alpine-apk Alpine to 3.15 (#196) 228 | 229 | ## 1.19.9.1-8 230 | 231 | * Tagged rebuild for CVE-2022-0778... all flavors covered 232 | 233 | ## 1.19.9.1-7 234 | 235 | * Tagged rebuild for CVE-2022-0778... covered flavors are: 236 | * all build-from-source flavors 237 | * upstream `amd64` flavors except `alpine-apk` 238 | 239 | ## 1.19.9.1-6 240 | 241 | * Update OpenSSL to 1.1.1n for built-from-source flavors due to CVE-2022-0778 (#200) 242 | * `centos` flavor (from EOL Centos 8) now uses yum repo http://vault.centos.org 243 | 244 | ## 1.19.9.1-5 245 | 246 | * Update LuaRocks to 3.8.0 (#197) 247 | 248 | ## 1.19.9.1-4 249 | 250 | * Update `alpine` to 3.15, but not `alpine-apk` (#196) 251 | 252 | ## 1.19.9.1-3 253 | 254 | * change ftp.pcre.org to SourceForge mirror for PCRE downloads (#193) 255 | * check SHA-256 of PCRE downloads (#193) 256 | 257 | ## 1.19.9.1-2 258 | 259 | * Add multi-arch upstream Debian Bullseye flavors `bullseye` and `bullseye-fat` (#191) 260 | * Update `fedora` flavor to FC 34 (#190) 261 | * Convert many http:// references to https:// 262 | 263 | ## 1.19.9.1-1 264 | 265 | * Upgrade OpenSSL to 1.1.1l for built-from-source images (alpine, bionic, focal) (#189) 266 | * Upstream flavors are rebuilt with this tag and have 1.1.1l as well 267 | 268 | ## 1.19.9.1-0 269 | 270 | * Upgrade OpenResty to 1.19.9.1 (#188) 271 | * `alpine` and `alpine-apk` are both Alpine 3.14 (#187) 272 | * Build with Ubuntu Focal and latest Docker 273 | 274 | ## 1.19.3.2-3 275 | 276 | * -----XXXX Upgrade `alpine` to Alpine 3.14. `alpine-apk` is still at Alpine 3.13. 277 | * Due to an error, this actually shipped with Alpine 3.13. See (#187) 278 | 279 | ## 1.19.3.2-2 280 | 281 | * Add multi-architecture image for Debian Buster (#184) 282 | * Builds happen again at https://travis-ci.com/github/openresty/docker-openresty 283 | 284 | ## 1.19.3.2-1 285 | 286 | * Expand multi-architecture to all images except Windows and Debian Buster 287 | * arm64 references are now referred to as aarch64 to match upstream 288 | * fix build script error propagation 289 | 290 | ## 1.19.3.2-0 291 | 292 | * Upgrade OpenResty to 1.19.3.2 (#181) 293 | * Upgrade `alpine-apk` to Alpine 3.13 294 | 295 | ## 1.19.3.1-8 296 | 297 | * "Fat" images now have RESTY_FAT_IMAGE_BASE label (#179) 298 | * Upgrade LuaRocks to 3.7.0 299 | 300 | ## 1.19.3.1-7 301 | 302 | * skipped because of my CI mistakes, use 1.19.3.1-8 303 | 304 | ## 1.19.3.1-6 305 | 306 | * Upgrade OpenSSL to 1.1.1k for built-from-source images (alpine, bionic, focal) 307 | * Builds now happen at https://travis-ci.com/github/neomantra/docker-openresty (#169) 308 | 309 | ## 1.19.3.1-5 310 | 311 | * Upgrade OpenSSL to 1.1.1j for built-from-source images (alpine, bionic, focal) 312 | 313 | ## 1.19.3.1-4 314 | 315 | * Restructure travis.yml with build scripts 316 | * Add `centos7` flavor (#173) supporting both `x86_64` and `aarch64` 317 | 318 | ## 1.19.3.1-3 319 | 320 | * Upgrade `alpine` to Alpine 3.13. `alpine-apk` is still at Alpine 3.12. 321 | * Upgrade LuaRocks to 3.5.0 322 | 323 | ## 1.19.3.1-2 324 | 325 | * Upgrade OpenSSL to 1.1.1i 326 | * Upstream OpenResty packages built on this tag also have OpenSSL to 1.1.1i 327 | 328 | ## 1.19.3.1-1 329 | 330 | * Remove `no-sse2` images as 1.19.3.1 now auto-detects SSE 4.2 support based on architecture (#168) 331 | 332 | ## 1.19.3.1-0 333 | 334 | * Upgrade OpenResty to 1.19.3.1 (#161) 335 | * Added some documentation to `nginx.conf` file 336 | * Set `pcre_jit on` in `nginx.conf` 337 | * Added gitignore 338 | 339 | ## 1.17.8.2-5 340 | 341 | * Fix alpine manifest (#160) 342 | 343 | ## 1.17.8.2-4 344 | 345 | * Bump `alpine` and `alpine-apk` to 3.12 to address CVE-2019-2201 346 | 347 | ## 1.17.8.2-3 348 | 349 | * Multi-architecture builds for `alpine`, supporting `amd64` and `arm64v8` (#130, #157) 350 | 351 | ## 1.17.8.2-2 352 | 353 | * Don't uninstall `make` in `centos` and `fedora` flavors (#154) 354 | * Install `lsb-base` dependency in `buster` flavor (#155) 355 | 356 | ## 1.17.8.2-1 357 | 358 | * Upgrade OpenSSL to 1.1.1 for build-from-source `bionic` and `focal` flavors 359 | * Add `fedora` built-from-upstream flavor (#150) 360 | 361 | ## 1.17.8.2-0 362 | 363 | * Upgrade OpenResty to 1.17.8.2 364 | * Add `RESTY_APK_VERSION` to manage versions and build `-debug` 365 | 366 | ## 1.17.8.1-0 367 | 368 | * Upgrade OpenResty to 1.17.8.1 (#138) 369 | * Upgrade CentOS to 8 370 | * Upgrade LuaRocks to 3.3.1 371 | * Build-from-source flavors download from https://openresty.org/download/openresty 372 | * Add `alpine-apk` build-from-package flavor (#142) 373 | * Add `focal` build-from-source flavor 374 | * Move `xenial` and `stretch` to archive 375 | 376 | ## 1.15.8.3-2 377 | 378 | * Upgrade OpenSSL to 1.1.1g for `alpine` flavor (for CVE-2020-1967). 379 | 380 | ## 1.15.8.3-1 381 | 382 | * Upgrade PRCE to 8.44 for built-from-source flavors 383 | * Upgrade OpenSSL to 1.1.0l and 1.1.1f for built-from-source flavors 384 | * Add RESTY_OPENSSL_PATCH_VERSION and RESTY_OPENSSL_URL_BASE build args 385 | 386 | ## 1.15.8.3-0 387 | 388 | * Upgrade OpenResty to 1.15.8.3 389 | * Windows builds now use `servercore:ltsc2019` and `nanoserver:1809` 390 | 391 | ## 1.15.8.2-7 392 | 393 | * Add `buster-nosse2` and `buster-fat-nosse2` (#103) 394 | * Bump `alpine` to 3.11 to address CVE-2019-18276 (#135) 395 | 396 | ## 1.15.8.2-6 397 | 398 | * Add `RESTY_YUM_REPO` and `RESTY_RPM_DIST` build args to `centos` 399 | * Install more yum packages for `centos` builds 400 | * Add `amzn2` flavor, based on `centos` 401 | 402 | ## 1.15.8.2-5 403 | 404 | * Remove `VOLUME` directive and just `mkdir /var/run/openresty` (#128) 405 | 406 | ## 1.15.8.2-4 407 | 408 | * Add `buster` and `buster-fat` using upstream Debian packages 409 | 410 | ## 1.15.8.2-3 411 | 412 | * Fix broken `alpine` logging 413 | * Add `VOLUME` for temporary paths (#124) (but not for `windows`) 414 | 415 | ## 1.15.8.2-2 (broken, do not use) 416 | 417 | * Upgrade built-from-upstream packages (`stretch`, `centos`, `windows`) to 1.15.8.2 418 | * Upgrade LuaRocks to 3.2.1 (#122) 419 | * Move default writable temp paths to dedicated directories `/var/run/openresty` (#119) 420 | 421 | ## 1.15.8.2-1 (untagged in git) 422 | 423 | * Patch and build OpenSSL ourselves in built-from-source flavors (#117, #118) 424 | 425 | ## 1.15.8.2-0 (untagged in git) 426 | 427 | For now (untagged release), the following only applies to built-from-source flavors (alpine/bionic/xenial). We are waiting for OpenResty upstream to release their packages for CentOS and Debian. 428 | 429 | * Upgrade OpenResty to 1.15.8.2 430 | * Upgrade PCRE to 8.43 431 | * Upgrade OpenSSL 1.1.0 versions to 1.1.0k 432 | * Download OpenResty source from github.com instead of openresty.org 433 | * README note about OpenSSL 1.1.1 / TLS 1.3 issues with ssl_session_(store|fetch)_by_lua* (affects `alpine` flavor) 434 | 435 | ## 1.15.8.1-4 436 | 437 | * enable --with-compat NGINX option in source-built images (#114) 438 | 439 | ## 1.15.8.1-3 440 | 441 | * Fix PCRE issues by building it ourselves (#22, #108) 442 | * Build Nginx with `-DNGX_LUA_ABORT_AT_PANIC` like upstream 443 | * Add `RESTY_LUAJIT_OPTIONS` build arg for harmony with upstream 444 | Defaults to `--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'` 445 | * Tag `stretch` builds on `master` branch as the `latest` (#112) 446 | 447 | ## 1.15.8.1-2 448 | 449 | * Alpine upgraded to 3.9 with OpenSSL 1.1.1c (#94, #101) 450 | * Upgrade LuaRocks to 3.1.3 451 | * Windows installer and base images are more precisely specified and customizable 452 | * Add Docker labels for the image bases and add some label documentation 453 | 454 | ## 1.15.8.1-1 455 | 456 | * Fixed an error caused by '"' in executing apt (#95) 457 | 458 | ## 1.15.8.1-0 459 | 460 | * Upgrade OpenResty to 1.15.8.1 461 | * Add `-nosse42` builds to `alpine`, `xenial`, and `bionic` flavors (#103) 462 | 463 | ## 1.15.8.1rc2-1 464 | 465 | * Upgrade LuaRocks to 3.1.2 and change release URL (#100) 466 | * Downgrade alpine base image to 3.8 until OpenSSL 1.1.1 works (#99) 467 | 468 | ## 1.15.8.1rc2-0 469 | 470 | * Upgrade Openresty to 1.15.8.1rc2 471 | * Upgraded alpine base image to 3.9 (#94) 472 | * Install `outils-md5` on `alpine-fat` (#98) 473 | 474 | ## 1.15.8.1rc1-0 475 | 476 | * Upgrade Openresty to 1.15.8.1rc1 477 | * Upgrade LuaRocks to 3.0.4 478 | * Upgrade OpenSSL to 1.0.2r / 1.1.0j 479 | 480 | * Temporarily disable Travis builds of centos / stretch images 481 | until upstream packages are available 482 | 483 | ## 1.13.6.2-2 484 | 485 | * Add LUA_PATH and LUA_CPATH to ENV for LuaRocks (#53) 486 | * Add custom module building via build-args (#79) 487 | * Stop with SIGQUIT so that "docker stop" is actually a graceful stop (#80) 488 | 489 | ## 1.13.6.2-1 490 | 491 | * Added `bionic` image 492 | * Upgraded alpine base image to 3.8 493 | * Upgraded OpenSSL to 1.1.0i (xenial/bionic) and 1.0.2p (alpine) 494 | 495 | ## 1.13.6.2-0 496 | 497 | * Upgraded OpenResty to 1.13.6.2 498 | * Upgraded LuaRocks to 2.4.4 via GitHub Releases 499 | * Upgraded PCRE to 8.42 500 | * Upgraded OpenSSL to 1.1.0h (except Alpine is still at 1.0.2k) 501 | 502 | * Upgraded Windows build to 64-bit upstream and nanoserver (much smaller image!!) 503 | 504 | * Use build-args with `FROM` to give more flexible package building (and less Dockerfiles), 505 | with `RESTY_IMAGE_BASE` and `RESTY_IMAGE_TAG`. 506 | 507 | * Simplify availble images and archive old distributions, 508 | settling on alpine/xenial from source and centos/stretch from upsteam packages. 509 | 510 | * `centos-rpm` renamed to `centos`. `centos-rpm` tag works but is deprecated. 511 | 512 | * Archive `armhf-xenial`, `centos`, `jessie`, `trusty`, `wheezy` 513 | 514 | * `alpine-fat` is now built on top of `alpine` rather than standalone 515 | 516 | * added `stretch-fat` image 517 | 518 | ## 1.13.6.1-2 519 | 520 | * Add Windows support 521 | 522 | ## 1.13.6.1-1 523 | 524 | * New docker tagging scheme 525 | * Travis CI build system (Thank you @travis-ci!!) (#62) 526 | * Add underlying package metadata as labels (#48) 527 | * Install custom nginx.conf with `include /etc/nginx/conf.d/*.conf` 528 | Long term this will make it easier to make docker-specifc changes. 529 | 530 | ## 1.13.6.1-0 531 | 532 | * Upgraded OpenResty to 1.13.6.1 533 | * Upgraded LuaRocks to 2.4.3 via GitHub Releases 534 | * Upgraded PCRE to 8.41 535 | * Add `bash` package to `alpine-fat` 536 | * Add `RESTY_DEB_VERSION` 537 | * Add `envsubst` utility 538 | * Add `RESTY_CONFIG_OPTIONS_MORE` build-arg to facilitate adding options (versus overriding them) 539 | * Use `CMD` instead of `ENTRYPOINT` 540 | 541 | ## 1.11.2.5 (2017-Aug-28) 542 | 543 | * Fixed `centos-rpm` installation of `opm` and `resty` (2017-Sep-06) 544 | * Upgraded OpenResty to 1.11.2.5 545 | * Update `centos-rpm` to 1.11.2.5-1 and use latest repos 546 | * Upgraded PCRE to 3.40 547 | * Add `stretch` using official Debian packages 548 | 549 | ## 1.11.2.4 550 | 551 | * Upgraded OpenResty to 1.11.2.4 552 | * Update `centos-rpm` to 1.11.2.4-1 553 | 554 | ## 1.11.2.3 555 | 556 | * Upgraded OpenResty to 1.11.2.3 557 | * Upgraded OpenSSL to 1.0.2k 558 | * Update `centos-rpm` to 1.11.2.3-1 559 | * Change PCRE download URL to https://ftp.pcre.org/pub/pcre 560 | * Add `armhf-xenial` image 561 | * Update `centos-rpm` to 1.11.2.2-8 562 | * Add `alpine-fat` image 563 | * Remove 'latest' tags 564 | 565 | ## 1.11.2.2 566 | 567 | * Upgraded OpenResty to 1.11.2.2 568 | * Add resty-opm package to `centos-rpm` 569 | * Added Debian Jessie and Wheezy Builds 570 | * Upgraded OpenSSL to 1.0.2j 571 | 572 | ## 1.11.2.1 573 | 574 | * Upgraded OpenResty to 1.11.2.1 575 | * Upgraded PCRE to 8.39 576 | * Updated ENTRYPOINT to use the new symlink `/usr/local/openresty/bin/openresty` 577 | * `centos-rpm` now has the build argument `RESTY_RPM_VERSION` and ENTRYPOINT `/usr/bin/openresty` 578 | 579 | ## 1.9.15.1 580 | 581 | * Upgraded OpenResty to 1.9.15.1 582 | * Logging is redirected to /dev/stdout and /dev/stderr 583 | * Introduced ENTRYPOINT with the `-g "daemon off;"` directive 584 | * Add `centos-rpm` base system, using upstream RPM packaging 585 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright (C) 2017-2024, by Evan Wies . 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | 9 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | -------------------------------------------------------------------------------- /Taskfile.yml: -------------------------------------------------------------------------------- 1 | # https://taskfile.dev/installation 2 | 3 | version: '3' 4 | 5 | tasks: 6 | default: 7 | cmds: 8 | - task --list-all 9 | 10 | build-all-arm64: 11 | deps: 12 | - build-all-upstream-arm64 13 | - build-all-source-arm64 14 | - build-debug-arm64 15 | 16 | build-all-amd64: 17 | deps: 18 | - build-all-upstream-amd64 19 | - build-all-source-amd64 20 | - build-debug-amd64 21 | 22 | build-all-upstream-arm64: 23 | cmds: 24 | - docker build -t alpine-apk-aarch64 -f alpine-apk/Dockerfile . 25 | - docker build -t amzn2-aarch64 -f centos/Dockerfile --build-arg RESTY_IMAGE_BASE=amazonlinux --build-arg RESTY_IMAGE_TAG=2 --build-arg RESTY_YUM_REPO="https://openresty.org/package/amazon/openresty.repo" --build-arg RESTY_RPM_DIST="amzn2" --build-arg RESTY_RPM_ARCH="aarch64" . 26 | - docker build -t rocky-aarch64 -f fedora/Dockerfile --build-arg RESTY_IMAGE_BASE=rockylinux --build-arg RESTY_IMAGE_TAG=8.5 --build-arg RESTY_YUM_REPO="https://openresty.org/package/rocky/openresty.repo" --build-arg RESTY_RPM_DIST="el8" --build-arg RESTY_RPM_ARCH="aarch64" . 27 | - docker build -t centos-aarch64 -f centos/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . 28 | - docker build -t centos7-aarch64 -f centos7/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . 29 | - docker build -t fedora-aarch64 -f fedora/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . 30 | - docker build -t bookworm-aarch64 -f bookworm/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" . 31 | - docker build -t bullseye-aarch64 -f bullseye/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" . 32 | 33 | build-all-upstream-amd64: 34 | cmds: 35 | - docker build -t alpine-apk-amd64 -f alpine-apk/Dockerfile . 36 | - docker build -t amzn2-amd64 -f centos/Dockerfile --build-arg RESTY_IMAGE_BASE=amazonlinux --build-arg RESTY_IMAGE_TAG=2 --build-arg RESTY_YUM_REPO="https://openresty.org/package/amazon/openresty.repo" --build-arg RESTY_RPM_DIST="amzn2" --build-arg RESTY_RPM_ARCH="x86_64" . 37 | - docker build -t rocky-amd64 -f fedora/Dockerfile --build-arg RESTY_IMAGE_BASE=rockylinux --build-arg RESTY_IMAGE_TAG=8.5 --build-arg RESTY_YUM_REPO="https://openresty.org/package/rocky/openresty.repo" --build-arg RESTY_RPM_DIST="el8" --build-arg RESTY_RPM_ARCH="x86_64" . 38 | - docker build -t centos-amd64 -f centos/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . 39 | - docker build -t centos7-amd64 -f centos7/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . 40 | - docker build -t fedora-amd64 -f fedora/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . 41 | - docker build -t bookworm-amd64 -f bookworm/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . 42 | - docker build -t bullseye-amd64 -f bullseye/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . 43 | 44 | # Just uses host arch with aarch64 tags... 45 | # TODO: Should fail if arch is wrong, perhaps add pre-flight check 46 | build-all-source-arm64: 47 | cmds: 48 | - docker build -t alpine-aarch64 -f alpine/Dockerfile . 49 | - docker build -t bionic-aarch64 -f bionic/Dockerfile . 50 | - docker build -t focal-aarch64 -f focal/Dockerfile . 51 | - docker build -t jammy-aarch64 -f jammy/Dockerfile . 52 | - docker build -t noble-aarch64 -f noble/Dockerfile . 53 | 54 | # Just uses host arch with amd64 tags... 55 | # TODO: Should fail if arch is wrong, perhaps add pre-flight check 56 | build-all-source-amd64: 57 | cmds: 58 | - docker build -t alpine-amd64 -f alpine/Dockerfile . 59 | - docker build -t bionic-amd64 -f bionic/Dockerfile . 60 | - docker build -t focal-amd64 -f focal/Dockerfile . 61 | - docker build -t jammy-amd64 -f jammy/Dockerfile . 62 | - docker build -t noble-amd64 -f noble/Dockerfile . 63 | 64 | # Builds all source on host arch platform without tags 65 | build-all-source: 66 | cmds: 67 | - docker build -f alpine/Dockerfile . 68 | - docker build -f bionic/Dockerfile . 69 | - docker build -f focal/Dockerfile . 70 | - docker build -f jammy/Dockerfile . 71 | - docker build -f noble/Dockerfile . 72 | 73 | build-debug-arm64: 74 | - docker build -t bullseye-debug-aarch64 -f bullseye/Dockerfile.debug --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" . 75 | - docker build -t bullseye-valgrind-aarch64 -f bullseye/Dockerfile.valgrind --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" . 76 | 77 | build-debug-amd64: 78 | - docker build -t bullseye-debug-amd64 -f bullseye/Dockerfile.debug . 79 | - docker build -t bullseye-valgrind-amd64 -f bullseye/Dockerfile.valgrind . 80 | -------------------------------------------------------------------------------- /alpine-apk/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - alpine-apk 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="alpine" 5 | ARG RESTY_IMAGE_TAG="3.18.12" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # Docker Build Arguments 12 | ARG RESTY_IMAGE_BASE="alpine" 13 | ARG RESTY_IMAGE_TAG="3.18.12" 14 | 15 | ARG RESTY_APK_ALPINE_VERSION="3.18" 16 | ARG RESTY_APK_KEY_URL="https://openresty.org/package/admin@openresty.com-5ea678a6.rsa.pub" 17 | ARG RESTY_APK_REPO_URL="https://openresty.org/package/alpine/v${RESTY_APK_ALPINE_VERSION}/main" 18 | ARG RESTY_APK_VERSION="=1.27.1.2-r0" 19 | 20 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 21 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 22 | LABEL resty_apk_alpine_version="${RESTY_APK_ALPINE_VERSION}" 23 | LABEL resty_apk_key_url="${RESTY_APK_KEY_URL}" 24 | LABEL resty_apk_repo_url="${RESTY_APK_REPO_URL}" 25 | LABEL resty_apk_version="${RESTY_APK_VERSION}" 26 | 27 | RUN wget -O "/etc/apk/keys/$(basename ${RESTY_APK_KEY_URL})" "${RESTY_APK_KEY_URL}" \ 28 | && echo "${RESTY_APK_REPO_URL}" >> /etc/apk/repositories \ 29 | && apk update \ 30 | && apk add --no-cache \ 31 | tzdata \ 32 | zlib \ 33 | && apk add "openresty${RESTY_APK_VERSION}" \ 34 | && mkdir -p /var/run/openresty \ 35 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 36 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 37 | 38 | # Add additional binaries into PATH for convenience 39 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 40 | 41 | # Copy nginx configuration files 42 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 43 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 44 | 45 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 46 | 47 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 48 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 49 | STOPSIGNAL SIGQUIT 50 | -------------------------------------------------------------------------------- /alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - alpine 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="alpine" 5 | ARG RESTY_IMAGE_TAG="3.21.3" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # Docker Build Arguments 12 | ARG RESTY_IMAGE_BASE="alpine" 13 | ARG RESTY_IMAGE_TAG="3.21.3" 14 | ARG RESTY_VERSION="1.27.1.2" 15 | 16 | # https://github.com/openresty/openresty-packaging/blob/master/alpine/openresty-openssl3/APKBUILD 17 | ARG RESTY_OPENSSL_VERSION="3.4.1" 18 | ARG RESTY_OPENSSL_PATCH_VERSION="3.4.1" 19 | ARG RESTY_OPENSSL_URL_BASE="https://github.com/openssl/openssl/releases/download/openssl-${RESTY_OPENSSL_VERSION}" 20 | # LEGACY: "https://www.openssl.org/source/old/1.1.1" 21 | ARG RESTY_OPENSSL_BUILD_OPTIONS="enable-camellia enable-seed enable-rfc3779 enable-cms enable-md2 enable-rc5 \ 22 | enable-weak-ssl-ciphers enable-ssl3 enable-ssl3-method enable-md2 enable-ktls enable-fips \ 23 | " 24 | 25 | # https://github.com/openresty/openresty-packaging/blob/master/alpine/openresty-pcre2/APKBUILD 26 | ARG RESTY_PCRE_VERSION="10.44" 27 | ARG RESTY_PCRE_SHA256="86b9cb0aa3bcb7994faa88018292bc704cdbb708e785f7c74352ff6ea7d3175b" 28 | ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit --enable-pcre2grep-jit --disable-bsr-anycrlf --disable-coverage --disable-ebcdic --disable-fuzz-support \ 29 | --disable-jit-sealloc --disable-never-backslash-C --enable-newline-is-lf --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 \ 30 | --enable-pcre2grep-callout --enable-pcre2grep-callout-fork --disable-pcre2grep-libbz2 --disable-pcre2grep-libz --disable-pcre2test-libedit \ 31 | --enable-percent-zt --disable-rebuild-chartables --enable-shared --disable-static --disable-silent-rules --enable-unicode --disable-valgrind \ 32 | " 33 | 34 | ARG RESTY_J="1" 35 | 36 | # https://github.com/openresty/openresty-packaging/blob/master/alpine/openresty/APKBUILD 37 | ARG RESTY_CONFIG_OPTIONS="\ 38 | --with-compat \ 39 | --without-http_rds_json_module \ 40 | --without-http_rds_csv_module \ 41 | --without-lua_rds_parser \ 42 | --without-mail_pop3_module \ 43 | --without-mail_imap_module \ 44 | --without-mail_smtp_module \ 45 | --with-http_addition_module \ 46 | --with-http_auth_request_module \ 47 | --with-http_dav_module \ 48 | --with-http_flv_module \ 49 | --with-http_geoip_module=dynamic \ 50 | --with-http_gunzip_module \ 51 | --with-http_gzip_static_module \ 52 | --with-http_image_filter_module=dynamic \ 53 | --with-http_mp4_module \ 54 | --with-http_random_index_module \ 55 | --with-http_realip_module \ 56 | --with-http_secure_link_module \ 57 | --with-http_slice_module \ 58 | --with-http_ssl_module \ 59 | --with-http_stub_status_module \ 60 | --with-http_sub_module \ 61 | --with-http_v2_module \ 62 | --with-http_v3_module \ 63 | --with-http_xslt_module=dynamic \ 64 | --with-ipv6 \ 65 | --with-mail \ 66 | --with-mail_ssl_module \ 67 | --with-md5-asm \ 68 | --with-sha1-asm \ 69 | --with-stream \ 70 | --with-stream_ssl_module \ 71 | --with-stream_ssl_preread_module \ 72 | --with-threads \ 73 | " 74 | ARG RESTY_CONFIG_OPTIONS_MORE="" 75 | ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'" 76 | ARG RESTY_PCRE_OPTIONS="--with-pcre-jit" 77 | 78 | ARG RESTY_ADD_PACKAGE_BUILDDEPS="" 79 | ARG RESTY_ADD_PACKAGE_RUNDEPS="" 80 | ARG RESTY_EVAL_PRE_CONFIGURE="" 81 | ARG RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE="" 82 | ARG RESTY_EVAL_PRE_MAKE="" 83 | ARG RESTY_EVAL_POST_MAKE="" 84 | 85 | ARG RESTY_STRIP_BINARIES="" 86 | 87 | # These are not intended to be user-specified 88 | ARG _RESTY_CONFIG_DEPS="--with-pcre \ 89 | --with-cc-opt='-DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/pcre2/include -I/usr/local/openresty/openssl3/include' \ 90 | --with-ld-opt='-L/usr/local/openresty/pcre2/lib -L/usr/local/openresty/openssl3/lib -Wl,-rpath,/usr/local/openresty/pcre2/lib:/usr/local/openresty/openssl3/lib' \ 91 | " 92 | 93 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 94 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 95 | LABEL resty_version="${RESTY_VERSION}" 96 | LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}" 97 | LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}" 98 | LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}" 99 | LABEL resty_openssl_build_options="${RESTY_OPENSSL_BUILD_OPTIONS}" 100 | LABEL resty_pcre_version="${RESTY_PCRE_VERSION}" 101 | LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}" 102 | LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}" 103 | LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}" 104 | LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}" 105 | LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}" 106 | LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}" 107 | LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}" 108 | LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}" 109 | LABEL resty_eval_post_download_pre_configure="${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" 110 | LABEL resty_eval_pre_make="${RESTY_EVAL_PRE_MAKE}" 111 | LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}" 112 | LABEL resty_strip_binaries="${RESTY_STRIP_BINARIES}" 113 | LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}" 114 | LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}" 115 | 116 | RUN apk add --no-cache --virtual .build-deps \ 117 | build-base \ 118 | binutils \ 119 | coreutils \ 120 | curl \ 121 | gd-dev \ 122 | geoip-dev \ 123 | libxslt-dev \ 124 | linux-headers \ 125 | make \ 126 | perl-dev \ 127 | readline-dev \ 128 | zlib-dev \ 129 | ${RESTY_ADD_PACKAGE_BUILDDEPS} \ 130 | && apk add --no-cache \ 131 | gd \ 132 | geoip \ 133 | libgcc \ 134 | libxslt \ 135 | tzdata \ 136 | zlib \ 137 | ${RESTY_ADD_PACKAGE_RUNDEPS} \ 138 | && cd /tmp \ 139 | && if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \ 140 | && cd /tmp \ 141 | && curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 142 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 143 | && cd openssl-${RESTY_OPENSSL_VERSION} \ 144 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-2) = "3." ] ; then \ 145 | echo 'patching OpenSSL 3.x for OpenResty' \ 146 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 147 | fi \ 148 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.1" ] ; then \ 149 | echo 'patching OpenSSL 1.1.1 for OpenResty' \ 150 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 151 | fi \ 152 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.0" ] ; then \ 153 | echo 'patching OpenSSL 1.1.0 for OpenResty' \ 154 | && curl -s https://raw.githubusercontent.com/openresty/openresty/ed328977028c3ec3033bc25873ee360056e247cd/patches/openssl-1.1.0j-parallel_build_fix.patch | patch -p1 \ 155 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 156 | fi \ 157 | && ./config \ 158 | shared zlib -g \ 159 | --prefix=/usr/local/openresty/openssl3 \ 160 | --libdir=lib \ 161 | -Wl,-rpath,/usr/local/openresty/openssl3/lib \ 162 | ${RESTY_OPENSSL_BUILD_OPTIONS} \ 163 | && make -j${RESTY_J} \ 164 | && make -j${RESTY_J} install_sw \ 165 | && cd /tmp \ 166 | && curl -fSL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${RESTY_PCRE_VERSION}/pcre2-${RESTY_PCRE_VERSION}.tar.gz" -o pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 167 | && echo "${RESTY_PCRE_SHA256} pcre2-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \ 168 | && tar xzf pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 169 | && cd /tmp/pcre2-${RESTY_PCRE_VERSION} \ 170 | && CFLAGS="-g -O3" ./configure \ 171 | --prefix=/usr/local/openresty/pcre2 \ 172 | --libdir=/usr/local/openresty/pcre2/lib \ 173 | ${RESTY_PCRE_BUILD_OPTIONS} \ 174 | && CFLAGS="-g -O3" make -j${RESTY_J} \ 175 | && CFLAGS="-g -O3" make -j${RESTY_J} install \ 176 | && cd /tmp \ 177 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 178 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 179 | && cd /tmp/openresty-${RESTY_VERSION} \ 180 | && if [ -n "${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}); fi \ 181 | && eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \ 182 | && if [ -n "${RESTY_EVAL_PRE_MAKE}" ]; then eval $(echo ${RESTY_EVAL_PRE_MAKE}); fi \ 183 | && make -j${RESTY_J} \ 184 | && make -j${RESTY_J} install \ 185 | && cd /tmp \ 186 | && if [ -n "${RESTY_EVAL_POST_MAKE}" ]; then eval $(echo ${RESTY_EVAL_POST_MAKE}); fi \ 187 | && rm -rf \ 188 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz openssl-${RESTY_OPENSSL_VERSION} \ 189 | pcre2-${RESTY_PCRE_VERSION}.tar.gz pcre2-${RESTY_PCRE_VERSION} \ 190 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 191 | && if [ -n "${RESTY_STRIP_BINARIES}" ]; then \ 192 | echo 'stripping OpenResty binaries' \ 193 | && rm -Rf /usr/local/openresty/openssl3/bin/c_rehash /usr/local/openresty/openssl3/lib/*.a /usr/local/openresty/openssl3/include \ 194 | && find /usr/local/openresty/openssl3 -type f -perm -u+x -exec strip --strip-unneeded '{}' \; \ 195 | && rm -Rf /usr/local/openresty/pcre2/bin /usr/local/openresty/pcre2/share \ 196 | && find /usr/local/openresty/pcre2 -type f -perm -u+x -exec strip --strip-unneeded '{}' \; \ 197 | && rm -Rf /usr/local/openresty/luajit/lib/*.a /usr/local/openresty/luajit/share/man \ 198 | && find /usr/local/openresty/luajit -type f -perm -u+x -exec strip --strip-unneeded '{}' \; \ 199 | && find /usr/local/openresty/nginx -type f -perm -u+x -exec strip --strip-unneeded '{}' \; ; \ 200 | fi \ 201 | && apk del .build-deps \ 202 | && mkdir -p /var/run/openresty \ 203 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 204 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 205 | 206 | # Add additional binaries into PATH for convenience 207 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 208 | 209 | # Copy nginx configuration files 210 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 211 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 212 | 213 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 214 | 215 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 216 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 217 | STOPSIGNAL SIGQUIT 218 | -------------------------------------------------------------------------------- /alpine/Dockerfile.fat: -------------------------------------------------------------------------------- 1 | # Dockerfile - alpine-fat 2 | # https://github.com/openresty/docker-openresty 3 | # 4 | # This builds upon the base OpenResty alpine image that adds 5 | # some build-related packages, has perl installed for opm, 6 | # and includes luarocks and envsubst. 7 | # 8 | # NOTE: For envsubst, we install gettext (envsubst's source package), 9 | # copy it out, then uninstall gettext (to save some space as envsubst is very small) 10 | # libintl and musl are dependencies of envsubst, so those are installed as well 11 | 12 | ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" 13 | ARG RESTY_FAT_IMAGE_TAG="alpine" 14 | 15 | FROM ${RESTY_FAT_IMAGE_BASE}:${RESTY_FAT_IMAGE_TAG} 16 | 17 | ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" 18 | ARG RESTY_FAT_IMAGE_TAG="alpine" 19 | 20 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 21 | 22 | LABEL maintainer="Evan Wies " 23 | LABEL resty_fat_image_base="${RESTY_FAT_IMAGE_BASE}" 24 | LABEL resty_fat_image_tag="${RESTY_FAT_IMAGE_TAG}" 25 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" 26 | 27 | RUN apk add --no-cache --virtual .build-deps \ 28 | perl-dev \ 29 | && apk add --no-cache \ 30 | bash \ 31 | build-base \ 32 | curl \ 33 | libintl \ 34 | linux-headers \ 35 | make \ 36 | musl \ 37 | outils-md5 \ 38 | perl \ 39 | unzip \ 40 | wget \ 41 | && cd /tmp \ 42 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 43 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 44 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 45 | && ./configure \ 46 | --prefix=/usr/local/openresty/luajit \ 47 | --with-lua=/usr/local/openresty/luajit \ 48 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 49 | && make build \ 50 | && make install \ 51 | && cd /tmp \ 52 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 53 | && apk add --no-cache --virtual .gettext gettext \ 54 | && mv /usr/bin/envsubst /tmp/ \ 55 | && apk del .build-deps .gettext \ 56 | && mv /tmp/envsubst /usr/local/bin/ 57 | 58 | # Add LuaRocks paths 59 | # If OpenResty changes, these may need updating: 60 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 61 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 62 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 63 | 64 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 65 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | 3 | image: Visual Studio 2019 4 | 5 | environment: 6 | DOCKER_ORG: 7 | secure: zzVvB/twdpuNAko2Sjpu7g== 8 | DOCKER_USER: 9 | secure: GfPcN/48qsxPw+Tp011d+A== 10 | DOCKER_PASS: 11 | secure: zYHL3LCh2EskrlIVjrOqKmOwpbcGNtDCw2fHreu+xTs= 12 | 13 | install: 14 | - ps: docker version 15 | 16 | build_script: 17 | - ps: docker build --pull -t openresty:windows -f windows/Dockerfile . 18 | 19 | test_script: 20 | - cmd: docker run openresty:windows nginx -vt 21 | 22 | deploy_script: 23 | - ps: >- 24 | echo "${env:DOCKER_PASS}" | docker login -u="${env:DOCKER_USER}" --password-stdin 25 | 26 | if (${env:APPVEYOR_REPO_BRANCH} -eq "master") { 27 | docker tag ${env:DOCKER_ORG}:windows ${env:DOCKER_ORG}/openresty:windows 28 | docker push ${env:DOCKER_ORG}/openresty:windows 29 | docker tag ${env:DOCKER_ORG}:windows ${env:DOCKER_ORG}/openresty:windows-2019 30 | docker push ${env:DOCKER_ORG}/openresty:windows-2019 31 | } 32 | 33 | if (${env:APPVEYOR_REPO_TAG_NAME}) { 34 | docker tag ${env:DOCKER_ORG}:windows ${env:DOCKER_ORG}/openresty:${env:APPVEYOR_REPO_TAG_NAME}-windows 35 | docker push ${env:DOCKER_ORG}/openresty:${env:APPVEYOR_REPO_TAG_NAME}-windows 36 | docker tag ${env:DOCKER_ORG}:windows ${env:DOCKER_ORG}/openresty:${env:APPVEYOR_REPO_TAG_NAME}-windows-2019 37 | docker push ${env:DOCKER_ORG}/openresty:${env:APPVEYOR_REPO_TAG_NAME}-windows-2019 38 | } 39 | -------------------------------------------------------------------------------- /archive/Dockerfile.armhf-xenial: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Xenial 2 | # https://github.com/openresty/docker-openresty 3 | 4 | FROM armv7/armhf-ubuntu:xenial 5 | 6 | LABEL maintainer="Evan Wies " 7 | 8 | # Docker Build Arguments 9 | ARG RESTY_VERSION="1.13.6.1" 10 | ARG RESTY_LUAROCKS_VERSION="2.4.3" 11 | ARG RESTY_OPENSSL_VERSION="1.0.2k" 12 | ARG RESTY_PCRE_VERSION="8.41" 13 | ARG RESTY_J="1" 14 | ARG RESTY_CONFIG_OPTIONS="\ 15 | --with-file-aio \ 16 | --with-http_addition_module \ 17 | --with-http_auth_request_module \ 18 | --with-http_dav_module \ 19 | --with-http_flv_module \ 20 | --with-http_geoip_module=dynamic \ 21 | --with-http_gunzip_module \ 22 | --with-http_gzip_static_module \ 23 | --with-http_image_filter_module=dynamic \ 24 | --with-http_mp4_module \ 25 | --with-http_random_index_module \ 26 | --with-http_realip_module \ 27 | --with-http_secure_link_module \ 28 | --with-http_slice_module \ 29 | --with-http_ssl_module \ 30 | --with-http_stub_status_module \ 31 | --with-http_sub_module \ 32 | --with-http_v2_module \ 33 | --with-http_xslt_module=dynamic \ 34 | --with-ipv6 \ 35 | --with-mail \ 36 | --with-mail_ssl_module \ 37 | --with-md5-asm \ 38 | --with-pcre-jit \ 39 | --with-sha1-asm \ 40 | --with-stream \ 41 | --with-stream_ssl_module \ 42 | --with-threads \ 43 | " 44 | ARG RESTY_CONFIG_OPTIONS_MORE="" 45 | 46 | # These are not intended to be user-specified 47 | ARG _RESTY_CONFIG_DEPS="--with-openssl=/tmp/openssl-${RESTY_OPENSSL_VERSION} --with-pcre=/tmp/pcre-${RESTY_PCRE_VERSION}" 48 | 49 | 50 | # 1) Install apt dependencies 51 | # 2) Download and untar OpenSSL, PCRE, and OpenResty 52 | # 3) Build OpenResty 53 | # 4) Cleanup 54 | 55 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 56 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 57 | build-essential \ 58 | ca-certificates \ 59 | curl \ 60 | gettext-base \ 61 | libgd-dev \ 62 | libgeoip-dev \ 63 | libncurses5-dev \ 64 | libperl-dev \ 65 | libreadline-dev \ 66 | libxslt1-dev \ 67 | make \ 68 | perl \ 69 | unzip \ 70 | zlib1g-dev \ 71 | && cd /tmp \ 72 | && curl -fSL https://www.openssl.org/source/openssl-${RESTY_OPENSSL_VERSION}.tar.gz -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 73 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 74 | && curl -fSL https://ftp.pcre.org/pub/pcre/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \ 75 | && tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \ 76 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 77 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 78 | && cd /tmp/openresty-${RESTY_VERSION} \ 79 | && ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} \ 80 | && make -j${RESTY_J} \ 81 | && make -j${RESTY_J} install \ 82 | && cd /tmp \ 83 | && rm -rf \ 84 | openssl-${RESTY_OPENSSL_VERSION} \ 85 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 86 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 87 | pcre-${RESTY_PCRE_VERSION}.tar.gz pcre-${RESTY_PCRE_VERSION} \ 88 | && curl -fSL https://github.com/luarocks/luarocks/archive/${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 89 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 90 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 91 | && ./configure \ 92 | --prefix=/usr/local/openresty/luajit \ 93 | --with-lua=/usr/local/openresty/luajit \ 94 | --lua-suffix=jit-2.1.0-beta3 \ 95 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 96 | && make build \ 97 | && make install \ 98 | && cd /tmp \ 99 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 100 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 101 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 102 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 103 | 104 | # Add additional binaries into PATH for convenience 105 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 106 | 107 | # Add LuaRocks paths 108 | # If OpenResty changes, these may need updating: 109 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 110 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 111 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 112 | 113 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 114 | 115 | # Copy nginx configuration files 116 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 117 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 118 | 119 | # TODO: remove any other apt packages? 120 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 121 | 122 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 123 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 124 | STOPSIGNAL SIGQUIT 125 | -------------------------------------------------------------------------------- /archive/Dockerfile.centos: -------------------------------------------------------------------------------- 1 | # Dockerfile - CentOS 7 2 | # https://github.com/openresty/docker-openresty 3 | 4 | FROM centos:7 5 | 6 | LABEL maintainer="Evan Wies " 7 | 8 | # Docker Build Arguments 9 | ARG RESTY_VERSION="1.13.6.1" 10 | ARG RESTY_LUAROCKS_VERSION="2.4.3" 11 | ARG RESTY_OPENSSL_VERSION="1.0.2k" 12 | ARG RESTY_PCRE_VERSION="8.41" 13 | ARG RESTY_J="1" 14 | ARG RESTY_CONFIG_OPTIONS="\ 15 | --with-file-aio \ 16 | --with-http_addition_module \ 17 | --with-http_auth_request_module \ 18 | --with-http_dav_module \ 19 | --with-http_flv_module \ 20 | --with-http_geoip_module=dynamic \ 21 | --with-http_gunzip_module \ 22 | --with-http_gzip_static_module \ 23 | --with-http_image_filter_module=dynamic \ 24 | --with-http_mp4_module \ 25 | --with-http_random_index_module \ 26 | --with-http_realip_module \ 27 | --with-http_secure_link_module \ 28 | --with-http_slice_module \ 29 | --with-http_ssl_module \ 30 | --with-http_stub_status_module \ 31 | --with-http_sub_module \ 32 | --with-http_v2_module \ 33 | --with-http_xslt_module=dynamic \ 34 | --with-ipv6 \ 35 | --with-mail \ 36 | --with-mail_ssl_module \ 37 | --with-md5-asm \ 38 | --with-pcre-jit \ 39 | --with-sha1-asm \ 40 | --with-stream \ 41 | --with-stream_ssl_module \ 42 | --with-threads \ 43 | " 44 | ARG RESTY_CONFIG_OPTIONS_MORE="" 45 | 46 | # These are not intended to be user-specified 47 | ARG _RESTY_CONFIG_DEPS="--with-openssl=/tmp/openssl-${RESTY_OPENSSL_VERSION} --with-pcre=/tmp/pcre-${RESTY_PCRE_VERSION}" 48 | 49 | 50 | # 1) Install yum dependencies 51 | # 2) Download and untar OpenSSL, PCRE, and OpenResty 52 | # 3) Build OpenResty 53 | # 4) Cleanup 54 | 55 | RUN yum install -y \ 56 | gcc \ 57 | gcc-c++ \ 58 | gd-devel \ 59 | gettext \ 60 | GeoIP-devel \ 61 | libxslt-devel \ 62 | make \ 63 | perl \ 64 | perl-ExtUtils-Embed \ 65 | readline-devel \ 66 | unzip \ 67 | zlib-devel \ 68 | && cd /tmp \ 69 | && curl -fSL https://www.openssl.org/source/openssl-${RESTY_OPENSSL_VERSION}.tar.gz -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 70 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 71 | && curl -fSL https://ftp.pcre.org/pub/pcre/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \ 72 | && tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \ 73 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 74 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 75 | && cd /tmp/openresty-${RESTY_VERSION} \ 76 | && ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} \ 77 | && make -j${RESTY_J} \ 78 | && make -j${RESTY_J} install \ 79 | && cd /tmp \ 80 | && rm -rf \ 81 | openssl-${RESTY_OPENSSL_VERSION} \ 82 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 83 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 84 | pcre-${RESTY_PCRE_VERSION}.tar.gz pcre-${RESTY_PCRE_VERSION} \ 85 | && curl -fSL https://github.com/luarocks/luarocks/archive/${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 86 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 87 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 88 | && ./configure \ 89 | --prefix=/usr/local/openresty/luajit \ 90 | --with-lua=/usr/local/openresty/luajit \ 91 | --lua-suffix=jit-2.1.0-beta3 \ 92 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 93 | && make build \ 94 | && make install \ 95 | && cd /tmp \ 96 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 97 | && yum clean all \ 98 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 99 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 100 | 101 | # Add additional binaries into PATH for convenience 102 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 103 | 104 | # Add LuaRocks paths 105 | # If OpenResty changes, these may need updating: 106 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 107 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 108 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 109 | 110 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 111 | 112 | # Copy nginx configuration files 113 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 114 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 115 | 116 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 117 | 118 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 119 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 120 | STOPSIGNAL SIGQUIT 121 | -------------------------------------------------------------------------------- /archive/Dockerfile.jessie: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian Jessie 2 | # https://github.com/openresty/docker-openresty 3 | 4 | FROM debian:jessie 5 | 6 | LABEL maintainer="Evan Wies " 7 | 8 | # Docker Build Arguments 9 | ARG RESTY_VERSION="1.13.6.1" 10 | ARG RESTY_LUAROCKS_VERSION="2.4.3" 11 | ARG RESTY_OPENSSL_VERSION="1.0.2k" 12 | ARG RESTY_PCRE_VERSION="8.41" 13 | ARG RESTY_J="1" 14 | ARG RESTY_CONFIG_OPTIONS="\ 15 | --with-file-aio \ 16 | --with-http_addition_module \ 17 | --with-http_auth_request_module \ 18 | --with-http_dav_module \ 19 | --with-http_flv_module \ 20 | --with-http_geoip_module=dynamic \ 21 | --with-http_gunzip_module \ 22 | --with-http_gzip_static_module \ 23 | --with-http_image_filter_module=dynamic \ 24 | --with-http_mp4_module \ 25 | --with-http_random_index_module \ 26 | --with-http_realip_module \ 27 | --with-http_secure_link_module \ 28 | --with-http_slice_module \ 29 | --with-http_ssl_module \ 30 | --with-http_stub_status_module \ 31 | --with-http_sub_module \ 32 | --with-http_v2_module \ 33 | --with-http_xslt_module=dynamic \ 34 | --with-ipv6 \ 35 | --with-mail \ 36 | --with-mail_ssl_module \ 37 | --with-md5-asm \ 38 | --with-pcre-jit \ 39 | --with-sha1-asm \ 40 | --with-stream \ 41 | --with-stream_ssl_module \ 42 | --with-threads \ 43 | " 44 | ARG RESTY_CONFIG_OPTIONS_MORE="" 45 | 46 | # These are not intended to be user-specified 47 | ARG _RESTY_CONFIG_DEPS="--with-openssl=/tmp/openssl-${RESTY_OPENSSL_VERSION} --with-pcre=/tmp/pcre-${RESTY_PCRE_VERSION}" 48 | 49 | 50 | # 1) Install apt dependencies 51 | # 2) Download and untar OpenSSL, PCRE, and OpenResty 52 | # 3) Build OpenResty 53 | # 4) Cleanup 54 | 55 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 56 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 57 | build-essential \ 58 | ca-certificates \ 59 | curl \ 60 | gettext-base \ 61 | libgd-dev \ 62 | libgeoip-dev \ 63 | libncurses5-dev \ 64 | libperl-dev \ 65 | libreadline-dev \ 66 | libxslt1-dev \ 67 | make \ 68 | perl \ 69 | unzip \ 70 | zlib1g-dev \ 71 | && cd /tmp \ 72 | && curl -fSL https://www.openssl.org/source/openssl-${RESTY_OPENSSL_VERSION}.tar.gz -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 73 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 74 | && curl -fSL https://ftp.pcre.org/pub/pcre/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \ 75 | && tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \ 76 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 77 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 78 | && cd /tmp/openresty-${RESTY_VERSION} \ 79 | && ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} \ 80 | && make -j${RESTY_J} \ 81 | && make -j${RESTY_J} install \ 82 | && cd /tmp \ 83 | && rm -rf \ 84 | openssl-${RESTY_OPENSSL_VERSION} \ 85 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 86 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 87 | pcre-${RESTY_PCRE_VERSION}.tar.gz pcre-${RESTY_PCRE_VERSION} \ 88 | && curl -fSL https://github.com/luarocks/luarocks/archive/${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 89 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 90 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 91 | && ./configure \ 92 | --prefix=/usr/local/openresty/luajit \ 93 | --with-lua=/usr/local/openresty/luajit \ 94 | --lua-suffix=jit-2.1.0-beta3 \ 95 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 96 | && make build \ 97 | && make install \ 98 | && cd /tmp \ 99 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 100 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 101 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 102 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 103 | 104 | # Add additional binaries into PATH for convenience 105 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 106 | 107 | # Add LuaRocks paths 108 | # If OpenResty changes, these may need updating: 109 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 110 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 111 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 112 | 113 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 114 | 115 | # Copy nginx configuration files 116 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 117 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 118 | 119 | # TODO: remove any other apt packages? 120 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 121 | 122 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 123 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 124 | STOPSIGNAL SIGQUIT 125 | -------------------------------------------------------------------------------- /archive/Dockerfile.stretch: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 9 Stretch - DEB version 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="debian" 5 | ARG RESTY_IMAGE_TAG="stretch-slim" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # RESTY_DEB_FLAVOR build argument is used to select other 12 | # OpenResty Debian package variants. 13 | # For example: "-debug" or "-valgrind" 14 | ARG RESTY_DEB_FLAVOR="" 15 | ARG RESTY_DEB_VERSION="=1.15.8.3-1~stretch1" 16 | ARG RESTY_IMAGE_BASE="debian" 17 | ARG RESTY_IMAGE_TAG="stretch-slim" 18 | 19 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 20 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 21 | LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" 22 | LABEL resty_deb_version="${RESTY_DEB_VERSION}" 23 | 24 | 25 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 26 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 27 | ca-certificates \ 28 | gettext-base \ 29 | gnupg2 \ 30 | lsb-release \ 31 | software-properties-common \ 32 | wget \ 33 | && wget -qO /tmp/pubkey.gpg https://openresty.org/package/pubkey.gpg \ 34 | && DEBIAN_FRONTEND=noninteractive apt-key add /tmp/pubkey.gpg \ 35 | && rm /tmp/pubkey.gpg \ 36 | && DEBIAN_FRONTEND=noninteractive add-apt-repository -y "deb http://openresty.org/package/debian $(lsb_release -sc) openresty" \ 37 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 38 | gnupg2 \ 39 | lsb-release \ 40 | software-properties-common \ 41 | wget \ 42 | && DEBIAN_FRONTEND=noninteractive apt-get update \ 43 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 44 | openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ 45 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 46 | && rm -rf /var/lib/apt/lists/* \ 47 | && mkdir -p /var/run/openresty \ 48 | && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ 49 | && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log 50 | 51 | # Add additional binaries into PATH for convenience 52 | ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" 53 | 54 | # Copy nginx configuration files 55 | COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf 56 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 57 | 58 | CMD ["/usr/bin/openresty", "-g", "daemon off;"] 59 | 60 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 61 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 62 | STOPSIGNAL SIGQUIT 63 | -------------------------------------------------------------------------------- /archive/Dockerfile.stretch.fat: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 9 Stretch Fat - DEB version 2 | # https://github.com/openresty/docker-openresty 3 | # 4 | # This builds upon the base OpenResty Stretch image, 5 | # adding useful packages and utilities. 6 | # 7 | # Currently it just adds the openresty-opm package. 8 | # 9 | 10 | ARG RESTY_IMAGE_BASE="openresty/openresty" 11 | ARG RESTY_IMAGE_TAG="stretch" 12 | 13 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 14 | 15 | LABEL maintainer="Evan Wies " 16 | 17 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 18 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 19 | openresty-opm \ 20 | && rm -rf /var/lib/apt/lists/* 21 | -------------------------------------------------------------------------------- /archive/Dockerfile.stretch.luarocks_example: -------------------------------------------------------------------------------- 1 | # Derived Dockerfile Example using `opm` 2 | # https://github.com/openresty/docker-openresty 3 | # 4 | # Installs openresty-opm and then uses opm to install pgmoon. 5 | # 6 | 7 | FROM openresty/openresty:stretch 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | ARG RESTY_LUAROCKS_VERSION="3.2.1" 12 | 13 | 14 | # install LuaRocks 15 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 16 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 17 | curl \ 18 | make \ 19 | unzip \ 20 | && cd /tmp \ 21 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 22 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 23 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 24 | && ./configure \ 25 | --prefix=/usr/local/openresty/luajit \ 26 | --with-lua=/usr/local/openresty/luajit \ 27 | --lua-suffix=jit-2.1.0-beta3 \ 28 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 29 | && make build \ 30 | && make install \ 31 | && cd /tmp \ 32 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz 33 | 34 | # Add LuaRocks paths 35 | # If OpenResty changes, these may need updating: 36 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 37 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 38 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 39 | 40 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 41 | 42 | # install a rock 43 | RUN /usr/local/openresty/luajit/bin/luarocks install ljsyscall 44 | -------------------------------------------------------------------------------- /archive/Dockerfile.stretch.opm_example: -------------------------------------------------------------------------------- 1 | # Derived Dockerfile Example using `opm` 2 | # https://github.com/openresty/docker-openresty 3 | # 4 | # Installs openresty-opm and then uses opm to install pgmoon. 5 | # 6 | 7 | FROM openresty/openresty:stretch 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 12 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 13 | openresty-opm \ 14 | && opm get leafo/pgmoon 15 | -------------------------------------------------------------------------------- /archive/Dockerfile.trusty: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Trusty 2 | # https://github.com/openresty/docker-openresty 3 | 4 | FROM ubuntu:trusty 5 | 6 | LABEL maintainer="Evan Wies " 7 | 8 | # Docker Build Arguments 9 | ARG RESTY_VERSION="1.13.6.1" 10 | ARG RESTY_LUAROCKS_VERSION="2.4.3" 11 | ARG RESTY_OPENSSL_VERSION="1.0.2k" 12 | ARG RESTY_PCRE_VERSION="8.41" 13 | ARG RESTY_J="1" 14 | ARG RESTY_CONFIG_OPTIONS="\ 15 | --with-file-aio \ 16 | --with-http_addition_module \ 17 | --with-http_auth_request_module \ 18 | --with-http_dav_module \ 19 | --with-http_flv_module \ 20 | --with-http_geoip_module=dynamic \ 21 | --with-http_gunzip_module \ 22 | --with-http_gzip_static_module \ 23 | --with-http_image_filter_module=dynamic \ 24 | --with-http_mp4_module \ 25 | --with-http_random_index_module \ 26 | --with-http_realip_module \ 27 | --with-http_secure_link_module \ 28 | --with-http_slice_module \ 29 | --with-http_ssl_module \ 30 | --with-http_stub_status_module \ 31 | --with-http_sub_module \ 32 | --with-http_v2_module \ 33 | --with-http_xslt_module=dynamic \ 34 | --with-ipv6 \ 35 | --with-mail \ 36 | --with-mail_ssl_module \ 37 | --with-md5-asm \ 38 | --with-pcre-jit \ 39 | --with-sha1-asm \ 40 | --with-stream \ 41 | --with-stream_ssl_module \ 42 | --with-threads \ 43 | " 44 | ARG RESTY_CONFIG_OPTIONS_MORE="" 45 | 46 | # These are not intended to be user-specified 47 | ARG _RESTY_CONFIG_DEPS="--with-openssl=/tmp/openssl-${RESTY_OPENSSL_VERSION} --with-pcre=/tmp/pcre-${RESTY_PCRE_VERSION}" 48 | 49 | 50 | # 1) Install apt dependencies 51 | # 2) Download and untar OpenSSL, PCRE, and OpenResty 52 | # 3) Build OpenResty 53 | # 4) Cleanup 54 | 55 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 56 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 57 | build-essential \ 58 | ca-certificates \ 59 | curl \ 60 | gettext-base \ 61 | libgd-dev \ 62 | libgeoip-dev \ 63 | libncurses5-dev \ 64 | libperl-dev \ 65 | libreadline-dev \ 66 | libxslt1-dev \ 67 | make \ 68 | perl \ 69 | unzip \ 70 | zlib1g-dev \ 71 | && cd /tmp \ 72 | && curl -fSL https://www.openssl.org/source/openssl-${RESTY_OPENSSL_VERSION}.tar.gz -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 73 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 74 | && curl -fSL https://ftp.pcre.org/pub/pcre/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \ 75 | && tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \ 76 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 77 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 78 | && cd /tmp/openresty-${RESTY_VERSION} \ 79 | && ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} \ 80 | && make -j${RESTY_J} \ 81 | && make -j${RESTY_J} install \ 82 | && cd /tmp \ 83 | && rm -rf \ 84 | openssl-${RESTY_OPENSSL_VERSION} \ 85 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 86 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 87 | pcre-${RESTY_PCRE_VERSION}.tar.gz pcre-${RESTY_PCRE_VERSION} \ 88 | && curl -fSL https://github.com/luarocks/luarocks/archive/${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 89 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 90 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 91 | && ./configure \ 92 | --prefix=/usr/local/openresty/luajit \ 93 | --with-lua=/usr/local/openresty/luajit \ 94 | --lua-suffix=jit-2.1.0-beta3 \ 95 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 96 | && make build \ 97 | && make install \ 98 | && cd /tmp \ 99 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 100 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 101 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 102 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 103 | 104 | # Add additional binaries into PATH for convenience 105 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 106 | 107 | # Add LuaRocks paths 108 | # If OpenResty changes, these may need updating: 109 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 110 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 111 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 112 | 113 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 114 | 115 | # Copy nginx configuration files 116 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 117 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 118 | 119 | # TODO: remove any other apt packages? 120 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 121 | 122 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 123 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 124 | STOPSIGNAL SIGQUIT 125 | -------------------------------------------------------------------------------- /archive/Dockerfile.wheezy: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian Wheezy 2 | # https://github.com/openresty/docker-openresty 3 | 4 | FROM debian:wheezy 5 | 6 | LABEL maintainer="Evan Wies " 7 | 8 | # Docker Build Arguments 9 | ARG RESTY_VERSION="1.13.6.1" 10 | ARG RESTY_LUAROCKS_VERSION="2.4.3" 11 | ARG RESTY_OPENSSL_VERSION="1.0.2k" 12 | ARG RESTY_PCRE_VERSION="8.41" 13 | ARG RESTY_J="1" 14 | ARG RESTY_CONFIG_OPTIONS="\ 15 | --with-file-aio \ 16 | --with-http_addition_module \ 17 | --with-http_auth_request_module \ 18 | --with-http_dav_module \ 19 | --with-http_flv_module \ 20 | --with-http_geoip_module=dynamic \ 21 | --with-http_gunzip_module \ 22 | --with-http_gzip_static_module \ 23 | --with-http_image_filter_module=dynamic \ 24 | --with-http_mp4_module \ 25 | --with-http_random_index_module \ 26 | --with-http_realip_module \ 27 | --with-http_secure_link_module \ 28 | --with-http_slice_module \ 29 | --with-http_ssl_module \ 30 | --with-http_stub_status_module \ 31 | --with-http_sub_module \ 32 | --with-http_v2_module \ 33 | --with-http_xslt_module=dynamic \ 34 | --with-ipv6 \ 35 | --with-mail \ 36 | --with-mail_ssl_module \ 37 | --with-md5-asm \ 38 | --with-pcre-jit \ 39 | --with-sha1-asm \ 40 | --with-stream \ 41 | --with-stream_ssl_module \ 42 | --with-threads \ 43 | " 44 | ARG RESTY_CONFIG_OPTIONS_MORE="" 45 | 46 | # These are not intended to be user-specified 47 | ARG _RESTY_CONFIG_DEPS="--with-openssl=/tmp/openssl-${RESTY_OPENSSL_VERSION} --with-pcre=/tmp/pcre-${RESTY_PCRE_VERSION}" 48 | 49 | 50 | # 1) Install apt dependencies 51 | # 2) Download and untar OpenSSL, PCRE, and OpenResty 52 | # 3) Build OpenResty 53 | # 4) Cleanup 54 | 55 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 56 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 57 | build-essential \ 58 | ca-certificates \ 59 | curl \ 60 | gettext-base \ 61 | libgd2-noxpm-dev \ 62 | libgeoip-dev \ 63 | libncurses5-dev \ 64 | libperl-dev \ 65 | libreadline-dev \ 66 | libxslt1-dev \ 67 | make \ 68 | perl \ 69 | unzip \ 70 | zlib1g-dev \ 71 | && cd /tmp \ 72 | && curl -fSL https://www.openssl.org/source/openssl-${RESTY_OPENSSL_VERSION}.tar.gz -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 73 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 74 | && curl -fSL https://ftp.pcre.org/pub/pcre/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \ 75 | && tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \ 76 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 77 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 78 | && cd /tmp/openresty-${RESTY_VERSION} \ 79 | && ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} \ 80 | && make -j${RESTY_J} \ 81 | && make -j${RESTY_J} install \ 82 | && cd /tmp \ 83 | && rm -rf \ 84 | openssl-${RESTY_OPENSSL_VERSION} \ 85 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 86 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 87 | pcre-${RESTY_PCRE_VERSION}.tar.gz pcre-${RESTY_PCRE_VERSION} \ 88 | && curl -fSL https://github.com/luarocks/luarocks/archive/${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 89 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 90 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 91 | && ./configure \ 92 | --prefix=/usr/local/openresty/luajit \ 93 | --with-lua=/usr/local/openresty/luajit \ 94 | --lua-suffix=jit-2.1.0-beta3 \ 95 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 96 | && make build \ 97 | && make install \ 98 | && cd /tmp \ 99 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 100 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 101 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 102 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 103 | 104 | # Add additional binaries into PATH for convenience 105 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 106 | 107 | # Add LuaRocks paths 108 | # If OpenResty changes, these may need updating: 109 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 110 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 111 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 112 | 113 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 114 | 115 | # Copy nginx configuration files 116 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 117 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 118 | 119 | # TODO: remove any other apt packages? 120 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 121 | 122 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 123 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 124 | STOPSIGNAL SIGQUIT 125 | -------------------------------------------------------------------------------- /archive/Dockerfile.xenial: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Xenial 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="ubuntu" 5 | ARG RESTY_IMAGE_TAG="xenial" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # Docker Build Arguments 12 | ARG RESTY_IMAGE_BASE="ubuntu" 13 | ARG RESTY_IMAGE_TAG="xenial" 14 | ARG RESTY_VERSION="1.15.8.3" 15 | ARG RESTY_LUAROCKS_VERSION="3.2.1" 16 | ARG RESTY_OPENSSL_VERSION="1.1.0l" 17 | ARG RESTY_OPENSSL_PATCH_VERSION="1.1.0d" 18 | ARG RESTY_OPENSSL_URL_BASE="https://www.openssl.org/source/old/1.1.0" 19 | ARG RESTY_PCRE_VERSION="8.44" 20 | ARG RESTY_J="1" 21 | ARG RESTY_CONFIG_OPTIONS="\ 22 | --with-compat \ 23 | --with-file-aio \ 24 | --with-http_addition_module \ 25 | --with-http_auth_request_module \ 26 | --with-http_dav_module \ 27 | --with-http_flv_module \ 28 | --with-http_geoip_module=dynamic \ 29 | --with-http_gunzip_module \ 30 | --with-http_gzip_static_module \ 31 | --with-http_image_filter_module=dynamic \ 32 | --with-http_mp4_module \ 33 | --with-http_random_index_module \ 34 | --with-http_realip_module \ 35 | --with-http_secure_link_module \ 36 | --with-http_slice_module \ 37 | --with-http_ssl_module \ 38 | --with-http_stub_status_module \ 39 | --with-http_sub_module \ 40 | --with-http_v2_module \ 41 | --with-http_xslt_module=dynamic \ 42 | --with-ipv6 \ 43 | --with-mail \ 44 | --with-mail_ssl_module \ 45 | --with-md5-asm \ 46 | --with-pcre-jit \ 47 | --with-sha1-asm \ 48 | --with-stream \ 49 | --with-stream_ssl_module \ 50 | --with-threads \ 51 | " 52 | ARG RESTY_CONFIG_OPTIONS_MORE="" 53 | ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'" 54 | 55 | ARG RESTY_ADD_PACKAGE_BUILDDEPS="" 56 | ARG RESTY_ADD_PACKAGE_RUNDEPS="" 57 | ARG RESTY_EVAL_PRE_CONFIGURE="" 58 | ARG RESTY_EVAL_POST_MAKE="" 59 | 60 | # These are not intended to be user-specified 61 | ARG _RESTY_CONFIG_DEPS="--with-pcre \ 62 | --with-cc-opt='-DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl/include' \ 63 | --with-ld-opt='-L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl/lib -Wl,-rpath,/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl/lib' \ 64 | " 65 | 66 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 67 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 68 | LABEL resty_version="${RESTY_VERSION}" 69 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" 70 | LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}" 71 | LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}" 72 | LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}" 73 | LABEL resty_pcre_version="${RESTY_PCRE_VERSION}" 74 | LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}" 75 | LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}" 76 | LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}" 77 | LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}" 78 | LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}" 79 | LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}" 80 | LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}" 81 | LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}" 82 | 83 | 84 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 85 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 86 | build-essential \ 87 | ca-certificates \ 88 | curl \ 89 | gettext-base \ 90 | libgd-dev \ 91 | libgeoip-dev \ 92 | libncurses5-dev \ 93 | libperl-dev \ 94 | libreadline-dev \ 95 | libxslt1-dev \ 96 | make \ 97 | perl \ 98 | unzip \ 99 | zlib1g-dev \ 100 | ${RESTY_ADD_PACKAGE_BUILDDEPS} \ 101 | ${RESTY_ADD_PACKAGE_RUNDEPS} \ 102 | && cd /tmp \ 103 | && if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \ 104 | && cd /tmp \ 105 | && curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 106 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 107 | && cd openssl-${RESTY_OPENSSL_VERSION} \ 108 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.1" ] ; then \ 109 | echo 'patching OpenSSL 1.1.1 for OpenResty' \ 110 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-1.1.1c-sess_set_get_cb_yield.patch | patch -p1 ; \ 111 | fi \ 112 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.0" ] ; then \ 113 | echo 'patching OpenSSL 1.1.0 for OpenResty' \ 114 | && curl -s https://raw.githubusercontent.com/openresty/openresty/ed328977028c3ec3033bc25873ee360056e247cd/patches/openssl-1.1.0j-parallel_build_fix.patch | patch -p1 \ 115 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 116 | fi \ 117 | && ./config \ 118 | no-threads shared zlib -g \ 119 | enable-ssl3 enable-ssl3-method \ 120 | --prefix=/usr/local/openresty/openssl \ 121 | --libdir=lib \ 122 | -Wl,-rpath,/usr/local/openresty/openssl/lib \ 123 | && make -j${RESTY_J} \ 124 | && make -j${RESTY_J} install_sw \ 125 | && cd /tmp \ 126 | && curl -fSL https://ftp.pcre.org/pub/pcre/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \ 127 | && tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \ 128 | && cd /tmp/pcre-${RESTY_PCRE_VERSION} \ 129 | && ./configure \ 130 | --prefix=/usr/local/openresty/pcre \ 131 | --disable-cpp \ 132 | --enable-jit \ 133 | --enable-utf \ 134 | --enable-unicode-properties \ 135 | && make -j${RESTY_J} \ 136 | && make -j${RESTY_J} install \ 137 | && cd /tmp \ 138 | && curl -fSL https://github.com/openresty/openresty/releases/download/v${RESTY_VERSION}/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 139 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 140 | && cd /tmp/openresty-${RESTY_VERSION} \ 141 | && eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} \ 142 | && make -j${RESTY_J} \ 143 | && make -j${RESTY_J} install \ 144 | && cd /tmp \ 145 | && rm -rf \ 146 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz openssl-${RESTY_OPENSSL_VERSION} \ 147 | pcre-${RESTY_PCRE_VERSION}.tar.gz pcre-${RESTY_PCRE_VERSION} \ 148 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 149 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 150 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 151 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 152 | && ./configure \ 153 | --prefix=/usr/local/openresty/luajit \ 154 | --with-lua=/usr/local/openresty/luajit \ 155 | --lua-suffix=jit-2.1.0-beta3 \ 156 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 157 | && make build \ 158 | && make install \ 159 | && cd /tmp \ 160 | && if [ -n "${RESTY_EVAL_POST_MAKE}" ]; then eval $(echo ${RESTY_EVAL_POST_MAKE}); fi \ 161 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 162 | && if [ -n "${RESTY_ADD_PACKAGE_BUILDDEPS}" ]; then DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge ${RESTY_ADD_PACKAGE_BUILDDEPS} ; fi \ 163 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 164 | && mkdir -p /var/run/openresty \ 165 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 166 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 167 | 168 | # Add additional binaries into PATH for convenience 169 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 170 | 171 | # Add LuaRocks paths 172 | # If OpenResty changes, these may need updating: 173 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 174 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 175 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 176 | 177 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 178 | 179 | 180 | # Copy nginx configuration files 181 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 182 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 183 | 184 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 185 | 186 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 187 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 188 | STOPSIGNAL SIGQUIT 189 | -------------------------------------------------------------------------------- /archive/buster/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 10 Buster - DEB version 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="debian" 5 | ARG RESTY_IMAGE_TAG="buster-slim" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # RESTY_DEB_FLAVOR build argument is used to select other 12 | # OpenResty Debian package variants. 13 | # For example: "-debug" or "-valgrind" 14 | ARG RESTY_DEB_FLAVOR="" 15 | ARG RESTY_DEB_VERSION="=1.27.1.2-1~buster1" 16 | ARG RESTY_APT_REPO="https://openresty.org/package/debian" 17 | ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" 18 | ARG RESTY_IMAGE_BASE="debian" 19 | ARG RESTY_IMAGE_TAG="buster-slim" 20 | 21 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 22 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 23 | LABEL resty_apt_repo="${RESTY_APT_REPO}" 24 | LABEL resty_apt_pgp="${RESTY_APT_PGP}" 25 | LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" 26 | LABEL resty_deb_version="${RESTY_DEB_VERSION}" 27 | 28 | 29 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 30 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 31 | ca-certificates \ 32 | gettext-base \ 33 | gnupg2 \ 34 | lsb-base \ 35 | lsb-release \ 36 | software-properties-common \ 37 | wget \ 38 | && wget -qO /tmp/pubkey.gpg ${RESTY_APT_PGP} \ 39 | && DEBIAN_FRONTEND=noninteractive apt-key add /tmp/pubkey.gpg \ 40 | && rm /tmp/pubkey.gpg \ 41 | && DEBIAN_FRONTEND=noninteractive add-apt-repository -y "deb ${RESTY_APT_REPO} $(lsb_release -sc) openresty" \ 42 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 43 | gnupg2 \ 44 | lsb-release \ 45 | software-properties-common \ 46 | wget \ 47 | && DEBIAN_FRONTEND=noninteractive apt-get update \ 48 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 49 | openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ 50 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 51 | && rm -rf /var/lib/apt/lists/* \ 52 | && mkdir -p /var/run/openresty \ 53 | && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ 54 | && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log 55 | 56 | # Add additional binaries into PATH for convenience 57 | ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" 58 | 59 | # Copy nginx configuration files 60 | COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf 61 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 62 | 63 | CMD ["/usr/bin/openresty", "-g", "daemon off;"] 64 | 65 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 66 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 67 | STOPSIGNAL SIGQUIT 68 | -------------------------------------------------------------------------------- /archive/buster/Dockerfile.fat: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 10 Buster Fat - DEB version 2 | # https://github.com/openresty/docker-openresty 3 | # 4 | # This builds upon the base OpenResty Buster image, 5 | # adding useful packages and utilities. 6 | # 7 | # Currently it just adds the openresty-opm package. 8 | # 9 | 10 | ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" 11 | ARG RESTY_FAT_IMAGE_TAG="buster" 12 | 13 | FROM ${RESTY_FAT_IMAGE_BASE}:${RESTY_FAT_IMAGE_TAG} 14 | 15 | ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" 16 | ARG RESTY_FAT_IMAGE_TAG="buster" 17 | 18 | # RESTY_FAT_DEB_FLAVOR build argument is used to select other 19 | # OpenResty Debian package variants. 20 | # For example: "-debug" or "-valgrind" 21 | ARG RESTY_FAT_DEB_FLAVOR="" 22 | ARG RESTY_FAT_DEB_VERSION="=1.27.1.2-1~buster1" 23 | 24 | LABEL maintainer="Evan Wies " 25 | LABEL resty_fat_deb_flavor="${RESTY_FAT_DEB_FLAVOR}" 26 | LABEL resty_fat_deb_version="${RESTY_FAT_DEB_VERSION}" 27 | LABEL resty_fat_image_base="${RESTY_FAT_IMAGE_BASE}" 28 | LABEL resty_fat_image_tag="${RESTY_FAT_IMAGE_TAG}" 29 | 30 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 31 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 32 | openresty-opm${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ 33 | openresty-resty${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ 34 | && rm -rf /var/lib/apt/lists/* 35 | -------------------------------------------------------------------------------- /archive/buster/Dockerfile.luarocks_example: -------------------------------------------------------------------------------- 1 | # Derived Dockerfile Example using `luarocks` 2 | # https://github.com/openresty/docker-openresty 3 | # 4 | # Installs LuaRocks and then uses LuaRocks to install ljsyscall. 5 | # 6 | 7 | FROM openresty/openresty:bionic 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 12 | 13 | 14 | # install LuaRocks 15 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 16 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 17 | curl \ 18 | make \ 19 | unzip \ 20 | wget \ 21 | && cd /tmp \ 22 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 23 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 24 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 25 | && ./configure \ 26 | --prefix=/usr/local/openresty/luajit \ 27 | --with-lua=/usr/local/openresty/luajit \ 28 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 29 | && make build \ 30 | && make install \ 31 | && cd /tmp \ 32 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz 33 | 34 | # Add LuaRocks paths 35 | # If OpenResty changes, these may need updating: 36 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 37 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 38 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 39 | 40 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 41 | 42 | # install a rock 43 | RUN /usr/local/openresty/luajit/bin/luarocks install ljsyscall 44 | -------------------------------------------------------------------------------- /archive/buster/Dockerfile.opm_example: -------------------------------------------------------------------------------- 1 | # Derived Dockerfile Example using `opm` 2 | # https://github.com/openresty/docker-openresty 3 | # 4 | # Installs openresty-opm and then uses opm to install pgmoon. 5 | # 6 | 7 | FROM openresty/openresty:buster 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 12 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 13 | openresty-opm \ 14 | && opm get leafo/pgmoon 15 | -------------------------------------------------------------------------------- /bionic/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Bionic 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="ubuntu" 5 | ARG RESTY_IMAGE_TAG="bionic" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # Docker Build Arguments 12 | ARG RESTY_IMAGE_BASE="ubuntu" 13 | ARG RESTY_IMAGE_TAG="bionic" 14 | ARG RESTY_VERSION="1.27.1.2" 15 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 16 | 17 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty-openssl3/debian/rules 18 | ARG RESTY_OPENSSL_VERSION="3.4.1" 19 | ARG RESTY_OPENSSL_PATCH_VERSION="3.4.1" 20 | ARG RESTY_OPENSSL_URL_BASE="https://github.com/openssl/openssl/releases/download/openssl-${RESTY_OPENSSL_VERSION}" 21 | # LEGACY: "https://www.openssl.org/source/old/1.1.1" 22 | ARG RESTY_OPENSSL_BUILD_OPTIONS="enable-camellia enable-seed enable-rfc3779 enable-cms enable-md2 enable-rc5 \ 23 | enable-weak-ssl-ciphers enable-ssl3 enable-ssl3-method enable-md2 enable-ktls enable-fips \ 24 | " 25 | 26 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty-pcre2/debian/rules 27 | ARG RESTY_PCRE_VERSION="10.44" 28 | ARG RESTY_PCRE_SHA256="86b9cb0aa3bcb7994faa88018292bc704cdbb708e785f7c74352ff6ea7d3175b" 29 | ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit --enable-pcre2grep-jit --disable-bsr-anycrlf --disable-coverage --disable-ebcdic --disable-fuzz-support \ 30 | --disable-jit-sealloc --disable-never-backslash-C --enable-newline-is-lf --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 \ 31 | --enable-pcre2grep-callout --enable-pcre2grep-callout-fork --disable-pcre2grep-libbz2 --disable-pcre2grep-libz --disable-pcre2test-libedit \ 32 | --enable-percent-zt --disable-rebuild-chartables --enable-shared --disable-static --disable-silent-rules --enable-unicode --disable-valgrind \ 33 | " 34 | 35 | ARG RESTY_J="1" 36 | 37 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty/debian/rules 38 | ARG RESTY_CONFIG_OPTIONS="\ 39 | --with-compat \ 40 | --without-http_rds_json_module \ 41 | --without-http_rds_csv_module \ 42 | --without-lua_rds_parser \ 43 | --without-mail_pop3_module \ 44 | --without-mail_imap_module \ 45 | --without-mail_smtp_module \ 46 | --with-http_addition_module \ 47 | --with-http_auth_request_module \ 48 | --with-http_dav_module \ 49 | --with-http_flv_module \ 50 | --with-http_geoip_module=dynamic \ 51 | --with-http_gunzip_module \ 52 | --with-http_gzip_static_module \ 53 | --with-http_image_filter_module=dynamic \ 54 | --with-http_mp4_module \ 55 | --with-http_random_index_module \ 56 | --with-http_realip_module \ 57 | --with-http_secure_link_module \ 58 | --with-http_slice_module \ 59 | --with-http_ssl_module \ 60 | --with-http_stub_status_module \ 61 | --with-http_sub_module \ 62 | --with-http_v2_module \ 63 | --with-http_v3_module \ 64 | --with-http_xslt_module=dynamic \ 65 | --with-ipv6 \ 66 | --with-mail \ 67 | --with-mail_ssl_module \ 68 | --with-md5-asm \ 69 | --with-sha1-asm \ 70 | --with-stream \ 71 | --with-stream_ssl_module \ 72 | --with-stream_ssl_preread_module \ 73 | --with-threads \ 74 | " 75 | ARG RESTY_CONFIG_OPTIONS_MORE="" 76 | ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'" 77 | ARG RESTY_PCRE_OPTIONS="--with-pcre-jit" 78 | 79 | ARG RESTY_ADD_PACKAGE_BUILDDEPS="" 80 | ARG RESTY_ADD_PACKAGE_RUNDEPS="" 81 | ARG RESTY_EVAL_PRE_CONFIGURE="" 82 | ARG RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE="" 83 | ARG RESTY_EVAL_PRE_MAKE="" 84 | ARG RESTY_EVAL_POST_MAKE="" 85 | 86 | # These are not intended to be user-specified 87 | ARG _RESTY_CONFIG_DEPS="--with-pcre \ 88 | --with-cc-opt='-DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/pcre2/include -I/usr/local/openresty/openssl3/include' \ 89 | --with-ld-opt='-L/usr/local/openresty/pcre2/lib -L/usr/local/openresty/openssl3/lib -Wl,-rpath,/usr/local/openresty/pcre2/lib:/usr/local/openresty/openssl3/lib' \ 90 | " 91 | 92 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 93 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 94 | LABEL resty_version="${RESTY_VERSION}" 95 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" 96 | LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}" 97 | LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}" 98 | LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}" 99 | LABEL resty_openssl_build_options="${RESTY_OPENSSL_BUILD_OPTIONS}" 100 | LABEL resty_pcre_version="${RESTY_PCRE_VERSION}" 101 | LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}" 102 | LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}" 103 | LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}" 104 | LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}" 105 | LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}" 106 | LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}" 107 | LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}" 108 | LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}" 109 | LABEL resty_eval_post_download_pre_configure="${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" 110 | LABEL resty_eval_pre_make="${RESTY_EVAL_PRE_MAKE}" 111 | LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}" 112 | LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}" 113 | LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}" 114 | 115 | 116 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 117 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 118 | build-essential \ 119 | ca-certificates \ 120 | curl \ 121 | gettext-base \ 122 | libgd-dev \ 123 | libgeoip-dev \ 124 | libncurses5-dev \ 125 | libperl-dev \ 126 | libreadline-dev \ 127 | libxslt1-dev \ 128 | make \ 129 | perl \ 130 | unzip \ 131 | wget \ 132 | zlib1g-dev \ 133 | ${RESTY_ADD_PACKAGE_BUILDDEPS} \ 134 | ${RESTY_ADD_PACKAGE_RUNDEPS} \ 135 | && cd /tmp \ 136 | && if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \ 137 | && curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 138 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 139 | && cd openssl-${RESTY_OPENSSL_VERSION} \ 140 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-2) = "3." ] ; then \ 141 | echo 'patching OpenSSL 3.x for OpenResty' \ 142 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 143 | fi \ 144 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.1" ] ; then \ 145 | echo 'patching OpenSSL 1.1.1 for OpenResty' \ 146 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 147 | fi \ 148 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.0" ] ; then \ 149 | echo 'patching OpenSSL 1.1.0 for OpenResty' \ 150 | && curl -s https://raw.githubusercontent.com/openresty/openresty/ed328977028c3ec3033bc25873ee360056e247cd/patches/openssl-1.1.0j-parallel_build_fix.patch | patch -p1 \ 151 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 152 | fi \ 153 | && ./config \ 154 | shared zlib -g \ 155 | --prefix=/usr/local/openresty/openssl3 \ 156 | --libdir=lib \ 157 | -Wl,-rpath,/usr/local/openresty/openssl3/lib \ 158 | ${RESTY_OPENSSL_BUILD_OPTIONS} \ 159 | && make -j${RESTY_J} \ 160 | && make -j${RESTY_J} install_sw \ 161 | && cd /tmp \ 162 | && curl -fSL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${RESTY_PCRE_VERSION}/pcre2-${RESTY_PCRE_VERSION}.tar.gz" -o pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 163 | && echo "${RESTY_PCRE_SHA256} pcre2-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \ 164 | && tar xzf pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 165 | && cd /tmp/pcre2-${RESTY_PCRE_VERSION} \ 166 | && CFLAGS="-g -O3" ./configure \ 167 | --prefix=/usr/local/openresty/pcre2 \ 168 | --libdir=/usr/local/openresty/pcre2/lib \ 169 | ${RESTY_PCRE_BUILD_OPTIONS} \ 170 | && CFLAGS="-g -O3" make -j${RESTY_J} \ 171 | && CFLAGS="-g -O3" make -j${RESTY_J} install \ 172 | && cd /tmp \ 173 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 174 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 175 | && cd /tmp/openresty-${RESTY_VERSION} \ 176 | && if [ -n "${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}); fi \ 177 | && eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \ 178 | && if [ -n "${RESTY_EVAL_PRE_MAKE}" ]; then eval $(echo ${RESTY_EVAL_PRE_MAKE}); fi \ 179 | && make -j${RESTY_J} \ 180 | && make -j${RESTY_J} install \ 181 | && cd /tmp \ 182 | && rm -rf \ 183 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz openssl-${RESTY_OPENSSL_VERSION} \ 184 | pcre2-${RESTY_PCRE_VERSION}.tar.gz pcre2-${RESTY_PCRE_VERSION} \ 185 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 186 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 187 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 188 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 189 | && ./configure \ 190 | --prefix=/usr/local/openresty/luajit \ 191 | --with-lua=/usr/local/openresty/luajit \ 192 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 193 | && make build \ 194 | && make install \ 195 | && cd /tmp \ 196 | && if [ -n "${RESTY_EVAL_POST_MAKE}" ]; then eval $(echo ${RESTY_EVAL_POST_MAKE}); fi \ 197 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 198 | && if [ -n "${RESTY_ADD_PACKAGE_BUILDDEPS}" ]; then DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge ${RESTY_ADD_PACKAGE_BUILDDEPS} ; fi \ 199 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 200 | && mkdir -p /var/run/openresty \ 201 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 202 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 203 | 204 | # Add additional binaries into PATH for convenience 205 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 206 | 207 | # Add LuaRocks paths 208 | # If OpenResty changes, these may need updating: 209 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 210 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 211 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 212 | 213 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 214 | 215 | # Copy nginx configuration files 216 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 217 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 218 | 219 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 220 | 221 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 222 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 223 | STOPSIGNAL SIGQUIT 224 | -------------------------------------------------------------------------------- /bookworm/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 12 Bookworm - DEB version 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="debian" 5 | ARG RESTY_IMAGE_TAG="bookworm-slim" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # RESTY_DEB_FLAVOR build argument is used to select other 12 | # OpenResty Debian package variants. 13 | # For example: "-debug" or "-valgrind" 14 | ARG RESTY_DEB_FLAVOR="" 15 | ARG RESTY_DEB_VERSION="=1.27.1.2-1~bookworm1" 16 | ARG RESTY_APT_REPO="https://openresty.org/package/debian" 17 | ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" 18 | ARG RESTY_APT_ARCH="amd64" 19 | ARG RESTY_IMAGE_BASE="debian" 20 | ARG RESTY_IMAGE_TAG="bookworm-slim" 21 | 22 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 23 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 24 | LABEL resty_apt_repo="${RESTY_APT_REPO}" 25 | LABEL resty_apt_pgp="${RESTY_APT_PGP}" 26 | LABEL resty_apt_arch="${RESTY_APT_ARCH}" 27 | LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" 28 | LABEL resty_deb_version="${RESTY_DEB_VERSION}" 29 | 30 | 31 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 32 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 33 | ca-certificates \ 34 | gettext-base \ 35 | gnupg \ 36 | wget \ 37 | && wget -qO - ${RESTY_APT_PGP} | gpg --dearmor > /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ 38 | && chown root:root /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ 39 | && chmod ugo+r /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ 40 | && chmod go-w /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ 41 | && echo "deb [arch=$RESTY_APT_ARCH signed-by=/etc/apt/trusted.gpg.d/openresty-keyring.gpg] $RESTY_APT_REPO $(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release) openresty" | tee /etc/apt/sources.list.d/openresty.list \ 42 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 43 | gnupg \ 44 | wget \ 45 | && DEBIAN_FRONTEND=noninteractive apt-get update \ 46 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 47 | openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ 48 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 49 | && rm -rf /var/lib/apt/lists/* \ 50 | && mkdir -p /var/run/openresty \ 51 | && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ 52 | && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log 53 | 54 | # Add additional binaries into PATH for convenience 55 | ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" 56 | 57 | # Copy nginx configuration files 58 | COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf 59 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 60 | 61 | CMD ["/usr/bin/openresty", "-g", "daemon off;"] 62 | 63 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 64 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 65 | STOPSIGNAL SIGQUIT 66 | -------------------------------------------------------------------------------- /bookworm/Dockerfile.buildpack: -------------------------------------------------------------------------------- 1 | # Dockerfile - buildpack-deps 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="buildpack-deps" 5 | ARG RESTY_IMAGE_TAG="bookworm" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # RESTY_DEB_FLAVOR build argument is used to select other 12 | # OpenResty Debian package variants. 13 | # For example: "-debug" or "-valgrind" 14 | ARG RESTY_DEB_FLAVOR="" 15 | ARG RESTY_DEB_VERSION="=1.27.1.2-1~bookworm1" 16 | ARG RESTY_APT_REPO="https://openresty.org/package/debian" 17 | ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" 18 | ARG RESTY_APT_ARCH="amd64" 19 | ARG RESTY_IMAGE_BASE="buildpack-deps" 20 | ARG RESTY_IMAGE_TAG="bookworm" 21 | 22 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 23 | 24 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 25 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 26 | LABEL resty_apt_repo="${RESTY_APT_REPO}" 27 | LABEL resty_apt_pgp="${RESTY_APT_PGP}" 28 | LABEL resty_apt_arch="${RESTY_APT_ARCH}" 29 | LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" 30 | LABEL resty_deb_version="${RESTY_DEB_VERSION}" 31 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}}" 32 | 33 | # Install OpenResty 34 | RUN wget -qO - ${RESTY_APT_PGP} | gpg --dearmor > /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ 35 | && chown root:root /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ 36 | && chmod ugo+r /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ 37 | && chmod go-w /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ 38 | && echo "deb [arch=$RESTY_APT_ARCH signed-by=/etc/apt/trusted.gpg.d/openresty-keyring.gpg] $RESTY_APT_REPO $(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release) openresty" | tee /etc/apt/sources.list.d/openresty.list \ 39 | && DEBIAN_FRONTEND=noninteractive apt-get update \ 40 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 41 | openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ 42 | openresty-resty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ 43 | openresty-opm${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ 44 | && mkdir -p /var/run/openresty \ 45 | && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ 46 | && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log 47 | 48 | # Install LuaRocks 49 | RUN curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 50 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 51 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 52 | && ./configure \ 53 | --prefix=/usr/local/openresty/luajit \ 54 | --with-lua=/usr/local/openresty/luajit \ 55 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 56 | && make build \ 57 | && make install \ 58 | && cd /tmp \ 59 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz 60 | 61 | # Add additional binaries into PATH for convenience 62 | ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" 63 | 64 | # Add LuaRocks paths 65 | # If OpenResty changes, these may need updating: 66 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 67 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 68 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 69 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 70 | 71 | # Copy nginx configuration files 72 | COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf 73 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 74 | 75 | CMD ["/usr/bin/openresty", "-g", "daemon off;"] 76 | 77 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 78 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 79 | STOPSIGNAL SIGQUIT 80 | -------------------------------------------------------------------------------- /bookworm/Dockerfile.fat: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 12 Bookworm Fat - DEB version 2 | # https://github.com/openresty/docker-openresty 3 | # 4 | # This builds upon the base OpenResty Bookworm image, 5 | # adding useful packages and utilities. 6 | # 7 | # Currently it just adds the openresty-opm package. 8 | # 9 | 10 | ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" 11 | ARG RESTY_FAT_IMAGE_TAG="bookworm" 12 | 13 | FROM ${RESTY_FAT_IMAGE_BASE}:${RESTY_FAT_IMAGE_TAG} 14 | 15 | ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" 16 | ARG RESTY_FAT_IMAGE_TAG="bookworm" 17 | 18 | # RESTY_FAT_DEB_FLAVOR build argument is used to select other 19 | # OpenResty Debian package variants. 20 | # For example: "-debug" or "-valgrind" 21 | ARG RESTY_FAT_DEB_FLAVOR="" 22 | ARG RESTY_FAT_DEB_VERSION="=1.27.1.2-1~bookworm1" 23 | 24 | LABEL maintainer="Evan Wies " 25 | LABEL resty_fat_deb_flavor="${RESTY_FAT_DEB_FLAVOR}" 26 | LABEL resty_fat_deb_version="${RESTY_FAT_DEB_VERSION}" 27 | LABEL resty_fat_image_base="${RESTY_FAT_IMAGE_BASE}" 28 | LABEL resty_fat_image_tag="${RESTY_FAT_IMAGE_TAG}" 29 | 30 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 31 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 32 | openresty-resty${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ 33 | openresty-opm${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ 34 | && rm -rf /var/lib/apt/lists/* 35 | -------------------------------------------------------------------------------- /bullseye/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 11 Bullseye - DEB version 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="debian" 5 | ARG RESTY_IMAGE_TAG="bullseye-slim" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # RESTY_DEB_FLAVOR build argument is used to select other 12 | # OpenResty Debian package variants. 13 | # For example: "-debug" or "-valgrind" 14 | ARG RESTY_DEB_FLAVOR="" 15 | ARG RESTY_DEB_VERSION="=1.27.1.2-1~bullseye1" 16 | ARG RESTY_APT_REPO="https://openresty.org/package/debian" 17 | ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" 18 | ARG RESTY_IMAGE_BASE="debian" 19 | ARG RESTY_IMAGE_TAG="bullseye-slim" 20 | 21 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 22 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 23 | LABEL resty_apt_repo="${RESTY_APT_REPO}" 24 | LABEL resty_apt_pgp="${RESTY_APT_PGP}" 25 | LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" 26 | LABEL resty_deb_version="${RESTY_DEB_VERSION}" 27 | 28 | 29 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 30 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 31 | ca-certificates \ 32 | gettext-base \ 33 | gnupg2 \ 34 | lsb-base \ 35 | lsb-release \ 36 | software-properties-common \ 37 | wget \ 38 | && wget -qO /tmp/pubkey.gpg ${RESTY_APT_PGP} \ 39 | && DEBIAN_FRONTEND=noninteractive apt-key add /tmp/pubkey.gpg \ 40 | && rm /tmp/pubkey.gpg \ 41 | && DEBIAN_FRONTEND=noninteractive add-apt-repository -y "deb ${RESTY_APT_REPO} $(lsb_release -sc) openresty" \ 42 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 43 | gnupg2 \ 44 | lsb-release \ 45 | software-properties-common \ 46 | wget \ 47 | && DEBIAN_FRONTEND=noninteractive apt-get update \ 48 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 49 | openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ 50 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 51 | && rm -rf /var/lib/apt/lists/* \ 52 | && mkdir -p /var/run/openresty \ 53 | && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ 54 | && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log 55 | 56 | # Add additional binaries into PATH for convenience 57 | ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" 58 | 59 | # Copy nginx configuration files 60 | COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf 61 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 62 | 63 | CMD ["/usr/bin/openresty", "-g", "daemon off;"] 64 | 65 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 66 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 67 | STOPSIGNAL SIGQUIT 68 | -------------------------------------------------------------------------------- /bullseye/Dockerfile.debug: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 11 Bullseye - DEB version - Debug variant 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="debian" 5 | ARG RESTY_IMAGE_TAG="bullseye-slim" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # RESTY_DEB_FLAVOR build argument is used to select other 12 | # OpenResty Debian package variants. 13 | # For example: "-debug" or "-valgrind" 14 | ARG RESTY_DEB_FLAVOR="-debug" 15 | ARG RESTY_DEB_VERSION="=1.27.1.2-1~bullseye1" 16 | ARG RESTY_APT_REPO="https://openresty.org/package/debian" 17 | ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" 18 | ARG RESTY_IMAGE_BASE="debian" 19 | ARG RESTY_IMAGE_TAG="bullseye-slim" 20 | 21 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 22 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 23 | LABEL resty_apt_repo="${RESTY_APT_REPO}" 24 | LABEL resty_apt_pgp="${RESTY_APT_PGP}" 25 | LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" 26 | LABEL resty_deb_version="${RESTY_DEB_VERSION}" 27 | 28 | 29 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 30 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 31 | ca-certificates \ 32 | gettext-base \ 33 | gnupg2 \ 34 | lsb-base \ 35 | lsb-release \ 36 | software-properties-common \ 37 | wget \ 38 | && wget -qO /tmp/pubkey.gpg ${RESTY_APT_PGP} \ 39 | && DEBIAN_FRONTEND=noninteractive apt-key add /tmp/pubkey.gpg \ 40 | && rm /tmp/pubkey.gpg \ 41 | && DEBIAN_FRONTEND=noninteractive add-apt-repository -y "deb ${RESTY_APT_REPO} $(lsb_release -sc) openresty" \ 42 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 43 | gnupg2 \ 44 | lsb-release \ 45 | software-properties-common \ 46 | wget \ 47 | && DEBIAN_FRONTEND=noninteractive apt-get update \ 48 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 49 | openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ 50 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 51 | && rm -rf /var/lib/apt/lists/* \ 52 | && mkdir -p /var/run/openresty \ 53 | && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ 54 | && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log 55 | 56 | # Add additional binaries into PATH for convenience 57 | ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" 58 | 59 | # Copy nginx configuration files 60 | COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf 61 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 62 | 63 | CMD ["/usr/bin/openresty-debug", "-g", "daemon off;"] 64 | 65 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 66 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 67 | STOPSIGNAL SIGQUIT 68 | -------------------------------------------------------------------------------- /bullseye/Dockerfile.fat: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 11 Bullseye Fat - DEB version 2 | # https://github.com/openresty/docker-openresty 3 | # 4 | # This builds upon the base OpenResty Bullseye image, 5 | # adding useful packages and utilities. 6 | # 7 | # Currently it just adds the openresty-opm package. 8 | # 9 | 10 | ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" 11 | ARG RESTY_FAT_IMAGE_TAG="bullseye" 12 | 13 | FROM ${RESTY_FAT_IMAGE_BASE}:${RESTY_FAT_IMAGE_TAG} 14 | 15 | ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" 16 | ARG RESTY_FAT_IMAGE_TAG="bullseye" 17 | 18 | # RESTY_FAT_DEB_FLAVOR build argument is used to select other 19 | # OpenResty Debian package variants. 20 | # For example: "-debug" or "-valgrind" 21 | ARG RESTY_FAT_DEB_FLAVOR="" 22 | ARG RESTY_FAT_DEB_VERSION="=1.27.1.2-1~bullseye1" 23 | 24 | LABEL maintainer="Evan Wies " 25 | LABEL resty_fat_deb_flavor="${RESTY_FAT_DEB_FLAVOR}" 26 | LABEL resty_fat_deb_version="${RESTY_FAT_DEB_VERSION}" 27 | LABEL resty_fat_image_base="${RESTY_FAT_IMAGE_BASE}" 28 | LABEL resty_fat_image_tag="${RESTY_FAT_IMAGE_TAG}" 29 | 30 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 31 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 32 | openresty-resty${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ 33 | openresty-opm${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ 34 | && rm -rf /var/lib/apt/lists/* 35 | -------------------------------------------------------------------------------- /bullseye/Dockerfile.valgrind: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian 11 Bullseye - DEB version - Valgrind variant 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="debian" 5 | ARG RESTY_IMAGE_TAG="bullseye-slim" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # RESTY_DEB_FLAVOR build argument is used to select other 12 | # OpenResty Debian package variants. 13 | # For example: "-debug" or "-valgrind" 14 | ARG RESTY_DEB_FLAVOR="-valgrind" 15 | ARG RESTY_DEB_VERSION="=1.27.1.2-1~bullseye1" 16 | ARG RESTY_APT_REPO="https://openresty.org/package/debian" 17 | ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" 18 | ARG RESTY_IMAGE_BASE="debian" 19 | ARG RESTY_IMAGE_TAG="bullseye-slim" 20 | 21 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 22 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 23 | LABEL resty_apt_repo="${RESTY_APT_REPO}" 24 | LABEL resty_apt_pgp="${RESTY_APT_PGP}" 25 | LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" 26 | LABEL resty_deb_version="${RESTY_DEB_VERSION}" 27 | 28 | 29 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 30 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 31 | ca-certificates \ 32 | gettext-base \ 33 | gnupg2 \ 34 | lsb-base \ 35 | lsb-release \ 36 | software-properties-common \ 37 | wget \ 38 | && wget -qO /tmp/pubkey.gpg ${RESTY_APT_PGP} \ 39 | && DEBIAN_FRONTEND=noninteractive apt-key add /tmp/pubkey.gpg \ 40 | && rm /tmp/pubkey.gpg \ 41 | && DEBIAN_FRONTEND=noninteractive add-apt-repository -y "deb ${RESTY_APT_REPO} $(lsb_release -sc) openresty" \ 42 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 43 | gnupg2 \ 44 | lsb-release \ 45 | software-properties-common \ 46 | wget \ 47 | && DEBIAN_FRONTEND=noninteractive apt-get update \ 48 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 49 | openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ 50 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 51 | && rm -rf /var/lib/apt/lists/* \ 52 | && mkdir -p /var/run/openresty \ 53 | && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ 54 | && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log 55 | 56 | # Add additional binaries into PATH for convenience 57 | ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" 58 | 59 | # Copy nginx configuration files 60 | COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf 61 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 62 | 63 | CMD ["/usr/bin/openresty-valgrind", "-g", "daemon off;"] 64 | 65 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 66 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 67 | STOPSIGNAL SIGQUIT 68 | -------------------------------------------------------------------------------- /centos/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - CentOS 8 - RPM version 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="centos" 5 | ARG RESTY_IMAGE_TAG="8" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | ARG RESTY_IMAGE_BASE="centos" 12 | ARG RESTY_IMAGE_TAG="8" 13 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 14 | ARG RESTY_YUM_REPO="https://openresty.org/package/centos/openresty.repo" 15 | ARG RESTY_RPM_FLAVOR="" 16 | ARG RESTY_RPM_VERSION="1.27.1.2-1" 17 | ARG RESTY_RPM_DIST="el8" 18 | ARG RESTY_RPM_ARCH="x86_64" 19 | 20 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 21 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 22 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" 23 | LABEL resty_yum_repo="${RESTY_YUM_REPO}" 24 | LABEL resty_rpm_flavor="${RESTY_RPM_FLAVOR}" 25 | LABEL resty_rpm_version="${RESTY_RPM_VERSION}" 26 | LABEL resty_rpm_dist="${RESTY_RPM_DIST}" 27 | LABEL resty_rpm_arch="${RESTY_RPM_ARCH}" 28 | 29 | 30 | RUN find /etc/yum.repos.d -name 'CentOS-Linux-*' -exec sed -i 's/mirrorlist/#mirrorlist/g' {} \; \ 31 | && find /etc/yum.repos.d -name 'CentOS-Linux-*' -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; \ 32 | && yum install -y yum-utils \ 33 | && yum-config-manager --add-repo ${RESTY_YUM_REPO} \ 34 | && yum install -y \ 35 | gettext \ 36 | gzip \ 37 | make \ 38 | openresty${RESTY_RPM_FLAVOR}-${RESTY_RPM_VERSION}.${RESTY_RPM_DIST}.${RESTY_RPM_ARCH} \ 39 | openresty-opm-${RESTY_RPM_VERSION}.${RESTY_RPM_DIST} \ 40 | openresty-resty-${RESTY_RPM_VERSION}.${RESTY_RPM_DIST} \ 41 | tar \ 42 | unzip \ 43 | wget \ 44 | && cd /tmp \ 45 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 46 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 47 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 48 | && ./configure \ 49 | --prefix=/usr/local/openresty/luajit \ 50 | --with-lua=/usr/local/openresty/luajit \ 51 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 52 | && make build \ 53 | && make install \ 54 | && cd /tmp \ 55 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 56 | && yum clean all \ 57 | && mkdir -p /var/run/openresty \ 58 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 59 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 60 | 61 | # Unused, present for parity with other Dockerfiles 62 | # This makes some tooling/testing easier, as specifying a build-arg 63 | # and not consuming it fails the build. 64 | ARG RESTY_J="1" 65 | 66 | # Add additional binaries into PATH for convenience 67 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 68 | 69 | # Add LuaRocks paths 70 | # If OpenResty changes, these may need updating: 71 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 72 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 73 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 74 | 75 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 76 | 77 | # Copy nginx configuration files 78 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 79 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 80 | 81 | CMD ["/usr/bin/openresty", "-g", "daemon off;"] 82 | 83 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 84 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 85 | STOPSIGNAL SIGQUIT 86 | -------------------------------------------------------------------------------- /centos/Dockerfile.expat_example: -------------------------------------------------------------------------------- 1 | ARG OPENRESTY_VERSION="1.27.1.2-0" 2 | FROM "openresty/openresty:${OPENRESTY_VERSION}-centos" # locally I needed to add "-aarch64" 3 | ARG OPENRESTY_VERSION="1.27.1.2-0" 4 | 5 | # Install dependencies 6 | RUN yum -y install gcc 7 | 8 | # Download and install Expat from source 9 | ARG EXPAT_VERSION="2.5.0" 10 | RUN cd /tmp && \ 11 | curl -fSL "https://github.com/libexpat/libexpat/releases/download/R_$(echo -n ${EXPAT_VERSION} | sed 's/\./_/g')/expat-${EXPAT_VERSION}.tar.gz" -o expat.tar.gz && \ 12 | tar xzf expat.tar.gz && \ 13 | cd expat-${EXPAT_VERSION} && \ 14 | ./configure && \ 15 | make && \ 16 | make install && \ 17 | cd /tmp && \ 18 | rm -rf expat-${EXPAT_VERSION} expat.tar.gz 19 | 20 | # Download and install LuaExpat module from source 21 | ARG LUAEXPAT_VERSION="1.5.1" 22 | RUN cd /tmp && \ 23 | curl -fSL "https://github.com/lunarmodules/luaexpat/archive/refs/tags/${LUAEXPAT_VERSION}.tar.gz" -o luaexpat.tar.gz && \ 24 | tar xzf luaexpat.tar.gz && \ 25 | cd luaexpat-${LUAEXPAT_VERSION} && \ 26 | make -e LUA_INC=-I/usr/local/openresty/luajit/include/luajit-2.1 && \ 27 | make -e LUA_INC=-I/usr/local/openresty/luajit/include/luajit-2.1 \ 28 | -e LUA_LDIR=/usr/local/openresty/lualib \ 29 | -e LUA_CDIR=/usr/local/openresty/lualib \ 30 | install && \ 31 | cd /tmp && \ 32 | rm -rf luaexpat-${LUAEXPAT_VERSION} luaexpat.tar.gz 33 | -------------------------------------------------------------------------------- /centos7/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - CentOS 7 - RPM version 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="centos" 5 | ARG RESTY_IMAGE_TAG="7" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | ARG RESTY_IMAGE_BASE="centos" 12 | ARG RESTY_IMAGE_TAG="7" 13 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 14 | ARG RESTY_YUM_REPO="https://openresty.org/package/centos/openresty.repo" 15 | ARG RESTY_RPM_FLAVOR="" 16 | ARG RESTY_RPM_VERSION="1.27.1.2-1" 17 | ARG RESTY_RPM_DIST="el7" 18 | ARG RESTY_RPM_ARCH="x86_64" 19 | 20 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 21 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 22 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" 23 | LABEL resty_yum_repo="${RESTY_YUM_REPO}" 24 | LABEL resty_rpm_flavor="${RESTY_RPM_FLAVOR}" 25 | LABEL resty_rpm_version="${RESTY_RPM_VERSION}" 26 | LABEL resty_rpm_dist="${RESTY_RPM_DIST}" 27 | LABEL resty_rpm_arch="${RESTY_RPM_ARCH}" 28 | 29 | 30 | RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \ 31 | && sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \ 32 | && sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo \ 33 | && yum install -y yum-utils \ 34 | && yum-config-manager --add-repo ${RESTY_YUM_REPO} \ 35 | && yum install -y \ 36 | gettext \ 37 | gzip \ 38 | make \ 39 | openresty${RESTY_RPM_FLAVOR}-${RESTY_RPM_VERSION}.${RESTY_RPM_DIST}.${RESTY_RPM_ARCH} \ 40 | openresty-opm-${RESTY_RPM_VERSION}.${RESTY_RPM_DIST} \ 41 | openresty-resty-${RESTY_RPM_VERSION}.${RESTY_RPM_DIST} \ 42 | tar \ 43 | unzip \ 44 | wget \ 45 | && cd /tmp \ 46 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 47 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 48 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 49 | && ./configure \ 50 | --prefix=/usr/local/openresty/luajit \ 51 | --with-lua=/usr/local/openresty/luajit \ 52 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 53 | && make build \ 54 | && make install \ 55 | && cd /tmp \ 56 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 57 | && yum clean all \ 58 | && mkdir -p /var/run/openresty \ 59 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 60 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 61 | 62 | # Unused, present for parity with other Dockerfiles 63 | # This makes some tooling/testing easier, as specifying a build-arg 64 | # and not consuming it fails the build. 65 | ARG RESTY_J="1" 66 | 67 | # Add additional binaries into PATH for convenience 68 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 69 | 70 | # Add LuaRocks paths 71 | # If OpenResty changes, these may need updating: 72 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 73 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 74 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 75 | 76 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 77 | 78 | # Copy nginx configuration files 79 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 80 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 81 | 82 | CMD ["/usr/bin/openresty", "-g", "daemon off;"] 83 | 84 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 85 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 86 | STOPSIGNAL SIGQUIT 87 | -------------------------------------------------------------------------------- /docker_build_and_push_flavor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | # Builds and pushes flavors 3 | # 4 | # ./docker_build_and_push_flavor.sh FLAVOR [DOCKERFILE_PATH] [BUILD PARAMS] 5 | # 6 | # Docker password is in a file /tmp/docker.pass 7 | # because this script uses -x for build transparency 8 | # but we don't want to leak passwords 9 | # 10 | # Requires environment variables: 11 | # DOCKER_ORG 12 | # DOCKER_USERNAME 13 | # 14 | # Optional environment variables: 15 | # DOCKER_MIRROR_REGISTRY 16 | # DOCKER_MIRROR_ORG 17 | # DOCKER_MIRROR_USERNAME 18 | # 19 | # Files: 20 | # /tmp/docker.pass 21 | # /tmp/docker_mirror.pass 22 | 23 | set -e 24 | 25 | FLAVOR="$1" 26 | shift 27 | DOCKERFILE_PATH=${1:-$FLAVOR/Dockerfile} 28 | shift 29 | DOCKER_BUILD_PARAMS="$@" 30 | 31 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin 32 | 33 | docker build --pull -t openresty:$FLAVOR -f $DOCKERFILE_PATH $DOCKER_BUILD_PARAMS . 34 | 35 | if [[ "$TRAVIS_BRANCH" == "master" ]] ; then 36 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin && 37 | docker tag openresty:$FLAVOR $DOCKER_ORG/openresty:$FLAVOR && 38 | docker push $DOCKER_ORG/openresty:$FLAVOR ; 39 | fi 40 | 41 | if [[ "$TRAVIS_TAG" ]] ; then 42 | TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ; 43 | if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then 44 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin && 45 | docker tag openresty:$FLAVOR $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$FLAVOR && 46 | docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$FLAVOR ; 47 | fi ; 48 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin && 49 | docker tag openresty:$FLAVOR $DOCKER_ORG/openresty:$TRAVIS_TAG-$FLAVOR && 50 | docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-$FLAVOR ; 51 | fi 52 | 53 | # Push to mirror registry 54 | if [[ "$DOCKER_MIRROR_REGISTRY" == "" ]] ; then 55 | exit 0 ; 56 | fi 57 | 58 | DOCKER_MIRROR="$DOCKER_MIRROR_REGISTRY/$DOCKER_MIRROR_ORG" 59 | 60 | if [[ "$TRAVIS_BRANCH" == "master" ]] ; then 61 | cat /tmp/docker_mirror.pass | docker login -u="$DOCKER_MIRROR_USERNAME" --password-stdin "$DOCKER_MIRROR_REGISTRY" && 62 | docker tag openresty:$FLAVOR $DOCKER_MIRROR/openresty:$FLAVOR && 63 | docker push $DOCKER_MIRROR/openresty:$FLAVOR ; 64 | fi 65 | 66 | if [[ "$TRAVIS_TAG" ]] ; then 67 | TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ; 68 | if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then 69 | cat /tmp/docker_mirror.pass | docker login -u="$DOCKER_MIRROR_USERNAME" --password-stdin "$DOCKER_MIRROR_REGISTRY" && 70 | docker tag openresty:$FLAVOR $DOCKER_MIRROR/openresty:$TRAVIS_TAG_BASE-$FLAVOR && 71 | docker push $DOCKER_MIRROR/openresty:$TRAVIS_TAG_BASE-$FLAVOR ; 72 | fi ; 73 | cat /tmp/docker_mirror.pass | docker login -u="$DOCKER_MIRROR_USERNAME" --password-stdin "$DOCKER_MIRROR_REGISTRY" && 74 | docker tag openresty:$FLAVOR $DOCKER_MIRROR/openresty:$TRAVIS_TAG-$FLAVOR && 75 | docker push $DOCKER_MIRROR/openresty:$TRAVIS_TAG-$FLAVOR ; 76 | fi 77 | -------------------------------------------------------------------------------- /docker_build_and_push_flavor_fat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | # Builds and pushes FAT flavors 3 | # 4 | # This script ensures that the RESTY_FAT_IMAGE_TAG corresponds to the flavor's current build 5 | # 6 | # ./docker_build_and_push_flavor_fat.sh FLAVOR [DOCKERFILE_PATH] [BUILD PARAMS] 7 | # 8 | # Docker password is in a file /tmp/docker.pass 9 | # because this script uses -x for build transparency 10 | # but we don't want to leak passwords 11 | # 12 | # Requires environment variables: 13 | # DOCKER_ORG 14 | # DOCKER_USERNAME 15 | # 16 | # Optional environment variables: 17 | # DOCKER_MIRROR_REGISTRY 18 | # DOCKER_MIRROR_ORG 19 | # DOCKER_MIRROR_USERNAME 20 | # 21 | # Files: 22 | # /tmp/docker.pass 23 | # /tmp/docker_mirror.pass 24 | 25 | set -e 26 | 27 | FLAVOR="$1" 28 | shift 29 | DOCKERFILE_PATH=${1:-$FLAVOR/Dockerfile} 30 | shift 31 | DOCKER_BUILD_PARAMS="$@" 32 | 33 | # Compute RESTY_FAT_IMAGE_TAG 34 | FATLESS_FLAVOR=$(echo -n "$FLAVOR" | sed 's/-fat//g') 35 | RESTY_FAT_IMAGE_BASE="$DOCKER_ORG/openresty" 36 | RESTY_FAT_IMAGE_TAG="$FATLESS_FLAVOR" 37 | if [[ "$TRAVIS_TAG" ]] ; then 38 | RESTY_FAT_IMAGE_TAG="$TRAVIS_TAG-$FATLESS_FLAVOR" 39 | TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ; 40 | if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then 41 | RESTY_FAT_IMAGE_TAG="$TRAVIS_TAG_BASE-$FATLESS_FLAVOR" 42 | fi 43 | fi 44 | 45 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin 46 | 47 | docker pull "$RESTY_FAT_IMAGE_BASE:$RESTY_FAT_IMAGE_TAG" || true 48 | 49 | docker build --pull -t openresty:$FLAVOR -f $DOCKERFILE_PATH \ 50 | --build-arg "RESTY_FAT_IMAGE_BASE=$RESTY_FAT_IMAGE_BASE" \ 51 | --build-arg "RESTY_FAT_IMAGE_TAG=$RESTY_FAT_IMAGE_TAG" \ 52 | $DOCKER_BUILD_PARAMS . 53 | 54 | if [[ "$TRAVIS_BRANCH" == "master" ]] ; then 55 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin && 56 | docker tag openresty:$FLAVOR $DOCKER_ORG/openresty:$FLAVOR && 57 | docker push $DOCKER_ORG/openresty:$FLAVOR ; 58 | fi 59 | 60 | if [[ "$TRAVIS_TAG" ]] ; then 61 | TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ; 62 | if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then 63 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin && 64 | docker tag openresty:$FLAVOR $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$FLAVOR && 65 | docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$FLAVOR ; 66 | fi ; 67 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin && 68 | docker tag openresty:$FLAVOR $DOCKER_ORG/openresty:$TRAVIS_TAG-$FLAVOR && 69 | docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-$FLAVOR ; 70 | fi 71 | 72 | # Push to mirror registry 73 | if [[ "$DOCKER_MIRROR_REGISTRY" == "" ]] ; then 74 | exit 0 ; 75 | fi 76 | 77 | DOCKER_MIRROR="$DOCKER_MIRROR_REGISTRY/$DOCKER_MIRROR_ORG" 78 | 79 | if [[ "$TRAVIS_BRANCH" == "master" ]] ; then 80 | cat /tmp/docker_mirror.pass | docker login -u="$DOCKER_MIRROR_USERNAME" --password-stdin "$DOCKER_MIRROR_REGISTRY" && 81 | docker tag openresty:$FLAVOR $DOCKER_MIRROR/openresty:$FLAVOR && 82 | docker push $DOCKER_MIRROR/openresty:$FLAVOR ; 83 | fi 84 | 85 | if [[ "$TRAVIS_TAG" ]] ; then 86 | TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ; 87 | if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then 88 | cat /tmp/docker_mirror.pass | docker login -u="$DOCKER_MIRROR_USERNAME" --password-stdin "$DOCKER_MIRROR_REGISTRY" && 89 | docker tag openresty:$FLAVOR $DOCKER_MIRROR/openresty:$TRAVIS_TAG_BASE-$FLAVOR && 90 | docker push $DOCKER_MIRROR/openresty:$TRAVIS_TAG_BASE-$FLAVOR ; 91 | fi ; 92 | cat /tmp/docker_mirror.pass | docker login -u="$DOCKER_MIRROR_USERNAME" --password-stdin "$DOCKER_MIRROR_REGISTRY" && 93 | docker tag openresty:$FLAVOR $DOCKER_MIRROR/openresty:$TRAVIS_TAG-$FLAVOR && 94 | docker push $DOCKER_MIRROR/openresty:$TRAVIS_TAG-$FLAVOR ; 95 | fi 96 | -------------------------------------------------------------------------------- /docker_manifest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | # Creates and pushes manifests for flavors 3 | # 4 | # ./docker_manifest.sh FLAVOR TAG1 .... 5 | # 6 | # Docker password is in a file /tmp/docker.pass 7 | # because this script uses -x for build transparency 8 | # but we don't want to leak passwords 9 | # 10 | # Requires environment variables: 11 | # DOCKER_ORG 12 | # DOCKER_USERNAME 13 | # 14 | # Optional environment variables: 15 | # DOCKER_MIRROR_REGISTRY 16 | # DOCKER_MIRROR_ORG 17 | # DOCKER_MIRROR_USERNAME 18 | # 19 | # Files: 20 | # /tmp/docker.pass 21 | # /tmp/docker_mirror.pass 22 | 23 | set -e 24 | 25 | FLAVOR="$1" 26 | shift 27 | 28 | AMENDS="" 29 | for TAG in "$@"; do 30 | AMENDS="$AMENDS --amend $DOCKER_ORG/openresty:$TAG" 31 | done 32 | 33 | export DOCKER_CLI_EXPERIMENTAL=enabled 34 | 35 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin 36 | 37 | if [[ "$TRAVIS_BRANCH" == "master" ]] ; then 38 | docker manifest create $DOCKER_ORG/openresty:$FLAVOR $AMENDS && 39 | docker manifest push $DOCKER_ORG/openresty:$FLAVOR ; 40 | fi 41 | 42 | if [[ "$TRAVIS_TAG" ]] ; then 43 | TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ; 44 | if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then 45 | AMENDS_TAG_BASE="" 46 | for TAG in "$@"; do 47 | AMENDS_TAG_BASE="$AMENDS_TAG_BASE --amend $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$TAG" 48 | done 49 | docker manifest create $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$FLAVOR $AMENDS_TAG_BASE && 50 | docker manifest push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$FLAVOR ; 51 | fi ; 52 | AMENDS_TAG="" 53 | for TAG in "$@"; do 54 | AMENDS_TAG="$AMENDS_TAG --amend $DOCKER_ORG/openresty:$TRAVIS_TAG-$TAG" 55 | done 56 | docker manifest create $DOCKER_ORG/openresty:$TRAVIS_TAG-$FLAVOR $AMENDS_TAG && 57 | docker manifest push $DOCKER_ORG/openresty:$TRAVIS_TAG-$FLAVOR ; 58 | fi 59 | 60 | # Push to mirror registry 61 | if [[ "$DOCKER_MIRROR_REGISTRY" == "" ]] ; then 62 | exit 0 ; 63 | fi 64 | 65 | cat /tmp/docker_mirror.pass | docker login -u="$DOCKER_MIRROR_USERNAME" --password-stdin "$DOCKER_MIRROR_REGISTRY" 66 | 67 | DOCKER_MIRROR="$DOCKER_MIRROR_REGISTRY/$DOCKER_MIRROR_ORG" 68 | 69 | AMENDS="" 70 | for TAG in "$@"; do 71 | AMENDS="$AMENDS --amend $DOCKER_MIRROR/openresty:$TAG" 72 | done 73 | 74 | if [[ "$TRAVIS_BRANCH" == "master" ]] ; then 75 | docker manifest create $DOCKER_MIRROR/openresty:$FLAVOR $AMENDS && 76 | docker manifest push $DOCKER_MIRROR/openresty:$FLAVOR ; 77 | fi 78 | 79 | if [[ "$TRAVIS_TAG" ]] ; then 80 | TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ; 81 | if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then 82 | AMENDS_TAG_BASE="" 83 | for TAG in "$@"; do 84 | AMENDS_TAG_BASE="$AMENDS_TAG_BASE --amend $DOCKER_MIRROR/openresty:$TRAVIS_TAG_BASE-$TAG" 85 | done 86 | docker manifest create $DOCKER_MIRROR/openresty:$TRAVIS_TAG_BASE-$FLAVOR $AMENDS_TAG_BASE && 87 | docker manifest push $DOCKER_MIRROR/openresty:$TRAVIS_TAG_BASE-$FLAVOR ; 88 | fi ; 89 | AMENDS_TAG="" 90 | for TAG in "$@"; do 91 | AMENDS_TAG="$AMENDS_TAG --amend $DOCKER_MIRROR/openresty:$TRAVIS_TAG-$TAG" 92 | done 93 | docker manifest create $DOCKER_MIRROR/openresty:$TRAVIS_TAG-$FLAVOR $AMENDS_TAG && 94 | docker manifest push $DOCKER_MIRROR/openresty:$TRAVIS_TAG-$FLAVOR ; 95 | fi 96 | -------------------------------------------------------------------------------- /docker_tag_alias.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | # Tags an image FLAVOR as ALIAS 3 | # 4 | # ./docker_tag_alias.sh FLAVOR ALIAS 5 | # 6 | # Docker password is in a file /tmp/docker.pass 7 | # because this script uses -x for build transparency 8 | # but we don't want to leak passwords 9 | 10 | set -e 11 | 12 | FLAVOR="$1" 13 | ALIAS="$2" 14 | 15 | cat /tmp/docker.pass | docker login -u="$DOCKER_USERNAME" --password-stdin 16 | 17 | if [[ "$TRAVIS_BRANCH" == "master" ]] ; then 18 | docker pull $DOCKER_ORG/openresty:$FLAVOR && 19 | docker tag $DOCKER_ORG/openresty:$FLAVOR $DOCKER_ORG/openresty:$ALIAS && 20 | docker push $DOCKER_ORG/openresty:$ALIAS ; 21 | fi 22 | 23 | if [[ "$TRAVIS_TAG" ]] ; then 24 | TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ; 25 | if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then 26 | docker pull $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$FLAVOR && 27 | docker tag $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$FLAVOR $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$ALIAS && 28 | docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-$ALIAS ; 29 | fi ; 30 | docker pull $DOCKER_ORG/openresty:$TRAVIS_TAG-$FLAVOR && 31 | docker tag $DOCKER_ORG/openresty:$TRAVIS_TAG-$FLAVOR $DOCKER_ORG/openresty:$TRAVIS_TAG-$ALIAS && 32 | docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-$ALIAS ; 33 | fi 34 | 35 | -------------------------------------------------------------------------------- /fedora/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Fedora 36 - RPM version 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="fedora" 5 | ARG RESTY_IMAGE_TAG="36" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | ARG RESTY_IMAGE_BASE="fedora" 12 | ARG RESTY_IMAGE_TAG="36" 13 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 14 | ARG RESTY_YUM_REPO="https://openresty.org/package/fedora/openresty.repo" 15 | ARG RESTY_RPM_FLAVOR="" 16 | ARG RESTY_RPM_VERSION="1.27.1.2-1" 17 | ARG RESTY_RPM_DIST="fc36" 18 | ARG RESTY_RPM_ARCH="x86_64" 19 | 20 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 21 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 22 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" 23 | LABEL resty_yum_repo="${RESTY_YUM_REPO}" 24 | LABEL resty_rpm_flavor="${RESTY_RPM_FLAVOR}" 25 | LABEL resty_rpm_version="${RESTY_RPM_VERSION}" 26 | LABEL resty_rpm_dist="${RESTY_RPM_DIST}" 27 | LABEL resty_rpm_arch="${RESTY_RPM_ARCH}" 28 | 29 | RUN dnf install -y wget \ 30 | && wget ${RESTY_YUM_REPO} \ 31 | && dnf install -y dnf-plugins-core \ 32 | && dnf config-manager --add-repo ${RESTY_YUM_REPO} \ 33 | && dnf install -y \ 34 | gettext \ 35 | make \ 36 | openresty${RESTY_RPM_FLAVOR}-${RESTY_RPM_VERSION}.${RESTY_RPM_DIST}.${RESTY_RPM_ARCH} \ 37 | openresty-opm-${RESTY_RPM_VERSION}.${RESTY_RPM_DIST} \ 38 | openresty-resty-${RESTY_RPM_VERSION}.${RESTY_RPM_DIST} \ 39 | tar \ 40 | unzip \ 41 | wget \ 42 | && cd /tmp \ 43 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 44 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 45 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 46 | && ./configure \ 47 | --prefix=/usr/local/openresty/luajit \ 48 | --with-lua=/usr/local/openresty/luajit \ 49 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 50 | && make build \ 51 | && make install \ 52 | && cd /tmp \ 53 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 54 | && dnf clean all \ 55 | && mkdir -p /var/run/openresty \ 56 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 57 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 58 | 59 | # Unused, present for parity with other Dockerfiles 60 | # This makes some tooling/testing easier, as specifying a build-arg 61 | # and not consuming it fails the build. 62 | ARG RESTY_J="1" 63 | 64 | # Add additional binaries into PATH for convenience 65 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 66 | 67 | # Add LuaRocks paths 68 | # If OpenResty changes, these may need updating: 69 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 70 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 71 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 72 | 73 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 74 | 75 | # Copy nginx configuration files 76 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 77 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 78 | 79 | CMD ["/usr/bin/openresty", "-g", "daemon off;"] 80 | 81 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 82 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 83 | STOPSIGNAL SIGQUIT 84 | -------------------------------------------------------------------------------- /focal/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Focal 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="ubuntu" 5 | ARG RESTY_IMAGE_TAG="focal" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # Docker Build Arguments 12 | ARG RESTY_IMAGE_BASE="ubuntu" 13 | ARG RESTY_IMAGE_TAG="focal" 14 | ARG RESTY_VERSION="1.27.1.2" 15 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 16 | 17 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty-openssl3/debian/rules 18 | ARG RESTY_OPENSSL_VERSION="3.4.1" 19 | ARG RESTY_OPENSSL_PATCH_VERSION="3.4.1" 20 | ARG RESTY_OPENSSL_URL_BASE="https://github.com/openssl/openssl/releases/download/openssl-${RESTY_OPENSSL_VERSION}" 21 | # LEGACY: "https://www.openssl.org/source/old/1.1.1" 22 | ARG RESTY_OPENSSL_BUILD_OPTIONS="enable-camellia enable-seed enable-rfc3779 enable-cms enable-md2 enable-rc5 \ 23 | enable-weak-ssl-ciphers enable-ssl3 enable-ssl3-method enable-md2 enable-ktls enable-fips \ 24 | " 25 | 26 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty-pcre2/debian/rules 27 | ARG RESTY_PCRE_VERSION="10.44" 28 | ARG RESTY_PCRE_SHA256="86b9cb0aa3bcb7994faa88018292bc704cdbb708e785f7c74352ff6ea7d3175b" 29 | ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit --enable-pcre2grep-jit --disable-bsr-anycrlf --disable-coverage --disable-ebcdic --disable-fuzz-support \ 30 | --disable-jit-sealloc --disable-never-backslash-C --enable-newline-is-lf --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 \ 31 | --enable-pcre2grep-callout --enable-pcre2grep-callout-fork --disable-pcre2grep-libbz2 --disable-pcre2grep-libz --disable-pcre2test-libedit \ 32 | --enable-percent-zt --disable-rebuild-chartables --enable-shared --disable-static --disable-silent-rules --enable-unicode --disable-valgrind \ 33 | " 34 | 35 | ARG RESTY_J="1" 36 | 37 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty/debian/rules 38 | ARG RESTY_CONFIG_OPTIONS="\ 39 | --with-compat \ 40 | --without-http_rds_json_module \ 41 | --without-http_rds_csv_module \ 42 | --without-lua_rds_parser \ 43 | --without-mail_pop3_module \ 44 | --without-mail_imap_module \ 45 | --without-mail_smtp_module \ 46 | --with-http_addition_module \ 47 | --with-http_auth_request_module \ 48 | --with-http_dav_module \ 49 | --with-http_flv_module \ 50 | --with-http_geoip_module=dynamic \ 51 | --with-http_gunzip_module \ 52 | --with-http_gzip_static_module \ 53 | --with-http_image_filter_module=dynamic \ 54 | --with-http_mp4_module \ 55 | --with-http_random_index_module \ 56 | --with-http_realip_module \ 57 | --with-http_secure_link_module \ 58 | --with-http_slice_module \ 59 | --with-http_ssl_module \ 60 | --with-http_stub_status_module \ 61 | --with-http_sub_module \ 62 | --with-http_v2_module \ 63 | --with-http_v3_module \ 64 | --with-http_xslt_module=dynamic \ 65 | --with-ipv6 \ 66 | --with-mail \ 67 | --with-mail_ssl_module \ 68 | --with-md5-asm \ 69 | --with-sha1-asm \ 70 | --with-stream \ 71 | --with-stream_ssl_module \ 72 | --with-stream_ssl_preread_module \ 73 | --with-threads \ 74 | " 75 | ARG RESTY_CONFIG_OPTIONS_MORE="" 76 | ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'" 77 | ARG RESTY_PCRE_OPTIONS="--with-pcre-jit" 78 | 79 | ARG RESTY_ADD_PACKAGE_BUILDDEPS="" 80 | ARG RESTY_ADD_PACKAGE_RUNDEPS="" 81 | ARG RESTY_EVAL_PRE_CONFIGURE="" 82 | ARG RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE="" 83 | ARG RESTY_EVAL_PRE_MAKE="" 84 | ARG RESTY_EVAL_POST_MAKE="" 85 | 86 | # These are not intended to be user-specified 87 | ARG _RESTY_CONFIG_DEPS="--with-pcre \ 88 | --with-cc-opt='-DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/pcre2/include -I/usr/local/openresty/openssl3/include' \ 89 | --with-ld-opt='-L/usr/local/openresty/pcre2/lib -L/usr/local/openresty/openssl3/lib -Wl,-rpath,/usr/local/openresty/pcre2/lib:/usr/local/openresty/openssl3/lib' \ 90 | " 91 | 92 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 93 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 94 | LABEL resty_version="${RESTY_VERSION}" 95 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" 96 | LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}" 97 | LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}" 98 | LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}" 99 | LABEL resty_openssl_build_options="${RESTY_OPENSSL_BUILD_OPTIONS}" 100 | LABEL resty_pcre_version="${RESTY_PCRE_VERSION}" 101 | LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}" 102 | LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}" 103 | LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}" 104 | LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}" 105 | LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}" 106 | LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}" 107 | LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}" 108 | LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}" 109 | LABEL resty_eval_post_download_pre_configure="${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" 110 | LABEL resty_eval_pre_make="${RESTY_EVAL_PRE_MAKE}" 111 | LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}" 112 | LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}" 113 | LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}" 114 | 115 | 116 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 117 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 118 | build-essential \ 119 | ca-certificates \ 120 | curl \ 121 | gettext-base \ 122 | libgd-dev \ 123 | libgeoip-dev \ 124 | libncurses5-dev \ 125 | libperl-dev \ 126 | libreadline-dev \ 127 | libxslt1-dev \ 128 | make \ 129 | perl \ 130 | unzip \ 131 | wget \ 132 | zlib1g-dev \ 133 | ${RESTY_ADD_PACKAGE_BUILDDEPS} \ 134 | ${RESTY_ADD_PACKAGE_RUNDEPS} \ 135 | && cd /tmp \ 136 | && if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \ 137 | && curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 138 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 139 | && cd openssl-${RESTY_OPENSSL_VERSION} \ 140 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-2) = "3." ] ; then \ 141 | echo 'patching OpenSSL 3.x for OpenResty' \ 142 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 143 | fi \ 144 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.1" ] ; then \ 145 | echo 'patching OpenSSL 1.1.1 for OpenResty' \ 146 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 147 | fi \ 148 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.0" ] ; then \ 149 | echo 'patching OpenSSL 1.1.0 for OpenResty' \ 150 | && curl -s https://raw.githubusercontent.com/openresty/openresty/ed328977028c3ec3033bc25873ee360056e247cd/patches/openssl-1.1.0j-parallel_build_fix.patch | patch -p1 \ 151 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 152 | fi \ 153 | && ./config \ 154 | shared zlib -g \ 155 | --prefix=/usr/local/openresty/openssl3 \ 156 | --libdir=lib \ 157 | -Wl,-rpath,/usr/local/openresty/openssl3/lib \ 158 | ${RESTY_OPENSSL_BUILD_OPTIONS} \ 159 | && make -j${RESTY_J} \ 160 | && make -j${RESTY_J} install_sw \ 161 | && cd /tmp \ 162 | && curl -fSL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${RESTY_PCRE_VERSION}/pcre2-${RESTY_PCRE_VERSION}.tar.gz" -o pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 163 | && echo "${RESTY_PCRE_SHA256} pcre2-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \ 164 | && tar xzf pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 165 | && cd /tmp/pcre2-${RESTY_PCRE_VERSION} \ 166 | && CFLAGS="-g -O3" ./configure \ 167 | --prefix=/usr/local/openresty/pcre2 \ 168 | --libdir=/usr/local/openresty/pcre2/lib \ 169 | ${RESTY_PCRE_BUILD_OPTIONS} \ 170 | && CFLAGS="-g -O3" make -j${RESTY_J} \ 171 | && CFLAGS="-g -O3" make -j${RESTY_J} install \ 172 | && cd /tmp \ 173 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 174 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 175 | && cd /tmp/openresty-${RESTY_VERSION} \ 176 | && if [ -n "${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}); fi \ 177 | && eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \ 178 | && if [ -n "${RESTY_EVAL_PRE_MAKE}" ]; then eval $(echo ${RESTY_EVAL_PRE_MAKE}); fi \ 179 | && make -j${RESTY_J} \ 180 | && make -j${RESTY_J} install \ 181 | && cd /tmp \ 182 | && rm -rf \ 183 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz openssl-${RESTY_OPENSSL_VERSION} \ 184 | pcre2-${RESTY_PCRE_VERSION}.tar.gz pcre2-${RESTY_PCRE_VERSION} \ 185 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 186 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 187 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 188 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 189 | && ./configure \ 190 | --prefix=/usr/local/openresty/luajit \ 191 | --with-lua=/usr/local/openresty/luajit \ 192 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 193 | && make build \ 194 | && make install \ 195 | && cd /tmp \ 196 | && if [ -n "${RESTY_EVAL_POST_MAKE}" ]; then eval $(echo ${RESTY_EVAL_POST_MAKE}); fi \ 197 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 198 | && if [ -n "${RESTY_ADD_PACKAGE_BUILDDEPS}" ]; then DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge ${RESTY_ADD_PACKAGE_BUILDDEPS} ; fi \ 199 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 200 | && mkdir -p /var/run/openresty \ 201 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 202 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 203 | 204 | # Add additional binaries into PATH for convenience 205 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 206 | 207 | # Add LuaRocks paths 208 | # If OpenResty changes, these may need updating: 209 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 210 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 211 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 212 | 213 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 214 | 215 | # Copy nginx configuration files 216 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 217 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 218 | 219 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 220 | 221 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 222 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 223 | STOPSIGNAL SIGQUIT 224 | -------------------------------------------------------------------------------- /jammy/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Jammy 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="ubuntu" 5 | ARG RESTY_IMAGE_TAG="jammy" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # Docker Build Arguments 12 | ARG RESTY_IMAGE_BASE="ubuntu" 13 | ARG RESTY_IMAGE_TAG="jammy" 14 | ARG RESTY_VERSION="1.27.1.2" 15 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 16 | 17 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty-openssl3/debian/rules 18 | ARG RESTY_OPENSSL_VERSION="3.4.1" 19 | ARG RESTY_OPENSSL_PATCH_VERSION="3.4.1" 20 | ARG RESTY_OPENSSL_URL_BASE="https://github.com/openssl/openssl/releases/download/openssl-${RESTY_OPENSSL_VERSION}" 21 | # LEGACY: "https://www.openssl.org/source/old/1.1.1" 22 | ARG RESTY_OPENSSL_BUILD_OPTIONS="enable-camellia enable-seed enable-rfc3779 enable-cms enable-md2 enable-rc5 \ 23 | enable-weak-ssl-ciphers enable-ssl3 enable-ssl3-method enable-md2 enable-ktls enable-fips \ 24 | " 25 | 26 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty-pcre2/debian/rules 27 | ARG RESTY_PCRE_VERSION="10.44" 28 | ARG RESTY_PCRE_SHA256="86b9cb0aa3bcb7994faa88018292bc704cdbb708e785f7c74352ff6ea7d3175b" 29 | ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit --enable-pcre2grep-jit --disable-bsr-anycrlf --disable-coverage --disable-ebcdic --disable-fuzz-support \ 30 | --disable-jit-sealloc --disable-never-backslash-C --enable-newline-is-lf --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 \ 31 | --enable-pcre2grep-callout --enable-pcre2grep-callout-fork --disable-pcre2grep-libbz2 --disable-pcre2grep-libz --disable-pcre2test-libedit \ 32 | --enable-percent-zt --disable-rebuild-chartables --enable-shared --disable-static --disable-silent-rules --enable-unicode --disable-valgrind \ 33 | " 34 | 35 | ARG RESTY_J="1" 36 | 37 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty/debian/rules 38 | ARG RESTY_CONFIG_OPTIONS="\ 39 | --with-compat \ 40 | --without-http_rds_json_module \ 41 | --without-http_rds_csv_module \ 42 | --without-lua_rds_parser \ 43 | --without-mail_pop3_module \ 44 | --without-mail_imap_module \ 45 | --without-mail_smtp_module \ 46 | --with-http_addition_module \ 47 | --with-http_auth_request_module \ 48 | --with-http_dav_module \ 49 | --with-http_flv_module \ 50 | --with-http_geoip_module=dynamic \ 51 | --with-http_gunzip_module \ 52 | --with-http_gzip_static_module \ 53 | --with-http_image_filter_module=dynamic \ 54 | --with-http_mp4_module \ 55 | --with-http_random_index_module \ 56 | --with-http_realip_module \ 57 | --with-http_secure_link_module \ 58 | --with-http_slice_module \ 59 | --with-http_ssl_module \ 60 | --with-http_stub_status_module \ 61 | --with-http_sub_module \ 62 | --with-http_v2_module \ 63 | --with-http_v3_module \ 64 | --with-http_xslt_module=dynamic \ 65 | --with-ipv6 \ 66 | --with-mail \ 67 | --with-mail_ssl_module \ 68 | --with-md5-asm \ 69 | --with-sha1-asm \ 70 | --with-stream \ 71 | --with-stream_ssl_module \ 72 | --with-stream_ssl_preread_module \ 73 | --with-threads \ 74 | " 75 | ARG RESTY_CONFIG_OPTIONS_MORE="" 76 | ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'" 77 | ARG RESTY_PCRE_OPTIONS="--with-pcre-jit" 78 | 79 | ARG RESTY_ADD_PACKAGE_BUILDDEPS="" 80 | ARG RESTY_ADD_PACKAGE_RUNDEPS="" 81 | ARG RESTY_EVAL_PRE_CONFIGURE="" 82 | ARG RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE="" 83 | ARG RESTY_EVAL_PRE_MAKE="" 84 | ARG RESTY_EVAL_POST_MAKE="" 85 | 86 | # These are not intended to be user-specified 87 | ARG _RESTY_CONFIG_DEPS="--with-pcre \ 88 | --with-cc-opt='-DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/pcre2/include -I/usr/local/openresty/openssl3/include' \ 89 | --with-ld-opt='-L/usr/local/openresty/pcre2/lib -L/usr/local/openresty/openssl3/lib -Wl,-rpath,/usr/local/openresty/pcre2/lib:/usr/local/openresty/openssl3/lib' \ 90 | " 91 | 92 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 93 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 94 | LABEL resty_version="${RESTY_VERSION}" 95 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" 96 | LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}" 97 | LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}" 98 | LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}" 99 | LABEL resty_openssl_build_options="${RESTY_OPENSSL_BUILD_OPTIONS}" 100 | LABEL resty_pcre_version="${RESTY_PCRE_VERSION}" 101 | LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}" 102 | LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}" 103 | LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}" 104 | LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}" 105 | LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}" 106 | LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}" 107 | LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}" 108 | LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}" 109 | LABEL resty_eval_post_download_pre_configure="${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" 110 | LABEL resty_eval_pre_make="${RESTY_EVAL_PRE_MAKE}" 111 | LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}" 112 | LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}" 113 | LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}" 114 | 115 | 116 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 117 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 118 | build-essential \ 119 | ca-certificates \ 120 | curl \ 121 | gettext-base \ 122 | libgd-dev \ 123 | libgeoip-dev \ 124 | libncurses5-dev \ 125 | libperl-dev \ 126 | libreadline-dev \ 127 | libxslt1-dev \ 128 | make \ 129 | perl \ 130 | unzip \ 131 | wget \ 132 | zlib1g-dev \ 133 | ${RESTY_ADD_PACKAGE_BUILDDEPS} \ 134 | ${RESTY_ADD_PACKAGE_RUNDEPS} \ 135 | && cd /tmp \ 136 | && if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \ 137 | && curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 138 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 139 | && cd openssl-${RESTY_OPENSSL_VERSION} \ 140 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-2) = "3." ] ; then \ 141 | echo 'patching OpenSSL 3.x for OpenResty' \ 142 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 143 | fi \ 144 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.1" ] ; then \ 145 | echo 'patching OpenSSL 1.1.1 for OpenResty' \ 146 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 147 | fi \ 148 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.0" ] ; then \ 149 | echo 'patching OpenSSL 1.1.0 for OpenResty' \ 150 | && curl -s https://raw.githubusercontent.com/openresty/openresty/ed328977028c3ec3033bc25873ee360056e247cd/patches/openssl-1.1.0j-parallel_build_fix.patch | patch -p1 \ 151 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 152 | fi \ 153 | && ./config \ 154 | shared zlib -g \ 155 | --prefix=/usr/local/openresty/openssl3 \ 156 | --libdir=lib \ 157 | -Wl,-rpath,/usr/local/openresty/openssl3/lib \ 158 | ${RESTY_OPENSSL_BUILD_OPTIONS} \ 159 | && make -j${RESTY_J} \ 160 | && make -j${RESTY_J} install_sw \ 161 | && cd /tmp \ 162 | && curl -fSL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${RESTY_PCRE_VERSION}/pcre2-${RESTY_PCRE_VERSION}.tar.gz" -o pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 163 | && echo "${RESTY_PCRE_SHA256} pcre2-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \ 164 | && tar xzf pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 165 | && cd /tmp/pcre2-${RESTY_PCRE_VERSION} \ 166 | && CFLAGS="-g -O3" ./configure \ 167 | --prefix=/usr/local/openresty/pcre2 \ 168 | --libdir=/usr/local/openresty/pcre2/lib \ 169 | ${RESTY_PCRE_BUILD_OPTIONS} \ 170 | && CFLAGS="-g -O3" make -j${RESTY_J} \ 171 | && CFLAGS="-g -O3" make -j${RESTY_J} install \ 172 | && cd /tmp \ 173 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 174 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 175 | && cd /tmp/openresty-${RESTY_VERSION} \ 176 | && if [ -n "${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}); fi \ 177 | && eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \ 178 | && if [ -n "${RESTY_EVAL_PRE_MAKE}" ]; then eval $(echo ${RESTY_EVAL_PRE_MAKE}); fi \ 179 | && make -j${RESTY_J} \ 180 | && make -j${RESTY_J} install \ 181 | && cd /tmp \ 182 | && rm -rf \ 183 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz openssl-${RESTY_OPENSSL_VERSION} \ 184 | pcre2-${RESTY_PCRE_VERSION}.tar.gz pcre2-${RESTY_PCRE_VERSION} \ 185 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 186 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 187 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 188 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 189 | && ./configure \ 190 | --prefix=/usr/local/openresty/luajit \ 191 | --with-lua=/usr/local/openresty/luajit \ 192 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 193 | && make build \ 194 | && make install \ 195 | && cd /tmp \ 196 | && if [ -n "${RESTY_EVAL_POST_MAKE}" ]; then eval $(echo ${RESTY_EVAL_POST_MAKE}); fi \ 197 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 198 | && if [ -n "${RESTY_ADD_PACKAGE_BUILDDEPS}" ]; then DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge ${RESTY_ADD_PACKAGE_BUILDDEPS} ; fi \ 199 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 200 | && mkdir -p /var/run/openresty \ 201 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 202 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 203 | 204 | # Add additional binaries into PATH for convenience 205 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 206 | 207 | # Add LuaRocks paths 208 | # If OpenResty changes, these may need updating: 209 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 210 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 211 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 212 | 213 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 214 | 215 | # Copy nginx configuration files 216 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 217 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 218 | 219 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 220 | 221 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 222 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 223 | STOPSIGNAL SIGQUIT 224 | -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | # nginx.conf -- docker-openresty 2 | # 3 | # This file is installed to: 4 | # `/usr/local/openresty/nginx/conf/nginx.conf` 5 | # and is the file loaded by nginx at startup, 6 | # unless the user specifies otherwise. 7 | # 8 | # It tracks the upstream OpenResty's `nginx.conf`, but removes the `server` 9 | # section and adds this directive: 10 | # `include /etc/nginx/conf.d/*.conf;` 11 | # 12 | # The `docker-openresty` file `nginx.vh.default.conf` is copied to 13 | # `/etc/nginx/conf.d/default.conf`. It contains the `server section 14 | # of the upstream `nginx.conf`. 15 | # 16 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#nginx-config-files 17 | # 18 | 19 | #user nobody; 20 | #worker_processes 1; 21 | 22 | # Enables the use of JIT for regular expressions to speed-up their processing. 23 | pcre_jit on; 24 | 25 | 26 | 27 | #error_log logs/error.log; 28 | #error_log logs/error.log notice; 29 | #error_log logs/error.log info; 30 | 31 | #pid logs/nginx.pid; 32 | 33 | 34 | events { 35 | worker_connections 1024; 36 | } 37 | 38 | 39 | http { 40 | include mime.types; 41 | default_type application/octet-stream; 42 | 43 | # Enables or disables the use of underscores in client request header fields. 44 | # When the use of underscores is disabled, request header fields whose names contain underscores are marked as invalid and become subject to the ignore_invalid_headers directive. 45 | # underscores_in_headers off; 46 | 47 | #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 48 | # '$status $body_bytes_sent "$http_referer" ' 49 | # '"$http_user_agent" "$http_x_forwarded_for"'; 50 | 51 | #access_log logs/access.log main; 52 | 53 | # Log in JSON Format 54 | # log_format nginxlog_json escape=json '{ "timestamp": "$time_iso8601", ' 55 | # '"remote_addr": "$remote_addr", ' 56 | # '"body_bytes_sent": $body_bytes_sent, ' 57 | # '"request_time": $request_time, ' 58 | # '"response_status": $status, ' 59 | # '"request": "$request", ' 60 | # '"request_method": "$request_method", ' 61 | # '"host": "$host",' 62 | # '"upstream_addr": "$upstream_addr",' 63 | # '"http_x_forwarded_for": "$http_x_forwarded_for",' 64 | # '"http_referrer": "$http_referer", ' 65 | # '"http_user_agent": "$http_user_agent", ' 66 | # '"http_version": "$server_protocol", ' 67 | # '"nginx_access": true }'; 68 | # access_log /dev/stdout nginxlog_json; 69 | 70 | # See Move default writable paths to a dedicated directory (#119) 71 | # https://github.com/openresty/docker-openresty/issues/119 72 | client_body_temp_path /var/run/openresty/nginx-client-body; 73 | proxy_temp_path /var/run/openresty/nginx-proxy; 74 | fastcgi_temp_path /var/run/openresty/nginx-fastcgi; 75 | uwsgi_temp_path /var/run/openresty/nginx-uwsgi; 76 | scgi_temp_path /var/run/openresty/nginx-scgi; 77 | 78 | sendfile on; 79 | #tcp_nopush on; 80 | 81 | #keepalive_timeout 0; 82 | keepalive_timeout 65; 83 | 84 | #gzip on; 85 | 86 | include /etc/nginx/conf.d/*.conf; 87 | 88 | # Don't reveal OpenResty version to clients. 89 | # server_tokens off; 90 | } 91 | 92 | include /etc/nginx/conf.d/*.main; 93 | -------------------------------------------------------------------------------- /nginx.vh.default.conf: -------------------------------------------------------------------------------- 1 | # nginx.vh.default.conf -- docker-openresty 2 | # 3 | # This file is installed to: 4 | # `/etc/nginx/conf.d/default.conf` 5 | # 6 | # It tracks the `server` section of the upstream OpenResty's `nginx.conf`. 7 | # 8 | # This config (and any other configs in `etc/nginx/conf.d/`) is loaded by 9 | # default by the `include` directive in `/usr/local/openresty/nginx/conf/nginx.conf`. 10 | # 11 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#nginx-config-files 12 | # 13 | 14 | 15 | server { 16 | listen 80; 17 | server_name localhost; 18 | 19 | #charset koi8-r; 20 | #access_log /var/log/nginx/host.access.log main; 21 | 22 | location / { 23 | root /usr/local/openresty/nginx/html; 24 | index index.html index.htm; 25 | } 26 | 27 | #error_page 404 /404.html; 28 | 29 | # redirect server error pages to the static page /50x.html 30 | # 31 | error_page 500 502 503 504 /50x.html; 32 | location = /50x.html { 33 | root /usr/local/openresty/nginx/html; 34 | } 35 | 36 | # proxy the PHP scripts to Apache listening on 127.0.0.1:80 37 | # 38 | #location ~ \.php$ { 39 | # proxy_pass http://127.0.0.1; 40 | #} 41 | 42 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 43 | # 44 | #location ~ \.php$ { 45 | # root /usr/local/openresty/nginx/html; 46 | # fastcgi_pass 127.0.0.1:9000; 47 | # fastcgi_index index.php; 48 | # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 49 | # include fastcgi_params; 50 | #} 51 | 52 | # deny access to .htaccess files, if Apache's document root 53 | # concurs with nginx's one 54 | # 55 | #location ~ /\.ht { 56 | # deny all; 57 | #} 58 | } 59 | -------------------------------------------------------------------------------- /noble/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Noble 2 | # https://github.com/openresty/docker-openresty 3 | 4 | ARG RESTY_IMAGE_BASE="ubuntu" 5 | ARG RESTY_IMAGE_TAG="noble" 6 | 7 | FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} 8 | 9 | LABEL maintainer="Evan Wies " 10 | 11 | # Docker Build Arguments 12 | ARG RESTY_IMAGE_BASE="ubuntu" 13 | ARG RESTY_IMAGE_TAG="noble" 14 | ARG RESTY_VERSION="1.27.1.2" 15 | ARG RESTY_LUAROCKS_VERSION="3.11.1" 16 | 17 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty-openssl3/debian/rules 18 | ARG RESTY_OPENSSL_VERSION="3.4.1" 19 | ARG RESTY_OPENSSL_PATCH_VERSION="3.4.1" 20 | ARG RESTY_OPENSSL_URL_BASE="https://github.com/openssl/openssl/releases/download/openssl-${RESTY_OPENSSL_VERSION}" 21 | # LEGACY: "https://www.openssl.org/source/old/1.1.1" 22 | ARG RESTY_OPENSSL_BUILD_OPTIONS="enable-camellia enable-seed enable-rfc3779 enable-cms enable-md2 enable-rc5 \ 23 | enable-weak-ssl-ciphers enable-ssl3 enable-ssl3-method enable-md2 enable-ktls enable-fips \ 24 | " 25 | 26 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty-pcre2/debian/rules 27 | ARG RESTY_PCRE_VERSION="10.44" 28 | ARG RESTY_PCRE_SHA256="86b9cb0aa3bcb7994faa88018292bc704cdbb708e785f7c74352ff6ea7d3175b" 29 | ARG RESTY_PCRE_BUILD_OPTIONS="--enable-jit --enable-pcre2grep-jit --disable-bsr-anycrlf --disable-coverage --disable-ebcdic --disable-fuzz-support \ 30 | --disable-jit-sealloc --disable-never-backslash-C --enable-newline-is-lf --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 \ 31 | --enable-pcre2grep-callout --enable-pcre2grep-callout-fork --disable-pcre2grep-libbz2 --disable-pcre2grep-libz --disable-pcre2test-libedit \ 32 | --enable-percent-zt --disable-rebuild-chartables --enable-shared --disable-static --disable-silent-rules --enable-unicode --disable-valgrind \ 33 | " 34 | 35 | ARG RESTY_J="1" 36 | 37 | # https://github.com/openresty/openresty-packaging/blob/master/deb/openresty/debian/rules 38 | ARG RESTY_CONFIG_OPTIONS="\ 39 | --with-compat \ 40 | --without-http_rds_json_module \ 41 | --without-http_rds_csv_module \ 42 | --without-lua_rds_parser \ 43 | --without-mail_pop3_module \ 44 | --without-mail_imap_module \ 45 | --without-mail_smtp_module \ 46 | --with-http_addition_module \ 47 | --with-http_auth_request_module \ 48 | --with-http_dav_module \ 49 | --with-http_flv_module \ 50 | --with-http_geoip_module=dynamic \ 51 | --with-http_gunzip_module \ 52 | --with-http_gzip_static_module \ 53 | --with-http_image_filter_module=dynamic \ 54 | --with-http_mp4_module \ 55 | --with-http_random_index_module \ 56 | --with-http_realip_module \ 57 | --with-http_secure_link_module \ 58 | --with-http_slice_module \ 59 | --with-http_ssl_module \ 60 | --with-http_stub_status_module \ 61 | --with-http_sub_module \ 62 | --with-http_v2_module \ 63 | --with-http_v3_module \ 64 | --with-http_xslt_module=dynamic \ 65 | --with-ipv6 \ 66 | --with-mail \ 67 | --with-mail_ssl_module \ 68 | --with-md5-asm \ 69 | --with-sha1-asm \ 70 | --with-stream \ 71 | --with-stream_ssl_module \ 72 | --with-stream_ssl_preread_module \ 73 | --with-threads \ 74 | " 75 | ARG RESTY_CONFIG_OPTIONS_MORE="" 76 | ARG RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT'" 77 | ARG RESTY_PCRE_OPTIONS="--with-pcre-jit" 78 | 79 | ARG RESTY_ADD_PACKAGE_BUILDDEPS="" 80 | ARG RESTY_ADD_PACKAGE_RUNDEPS="" 81 | ARG RESTY_EVAL_PRE_CONFIGURE="" 82 | ARG RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE="" 83 | ARG RESTY_EVAL_PRE_MAKE="" 84 | ARG RESTY_EVAL_POST_MAKE="" 85 | 86 | # These are not intended to be user-specified 87 | ARG _RESTY_CONFIG_DEPS="--with-pcre \ 88 | --with-cc-opt='-DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/pcre2/include -I/usr/local/openresty/openssl3/include' \ 89 | --with-ld-opt='-L/usr/local/openresty/pcre2/lib -L/usr/local/openresty/openssl3/lib -Wl,-rpath,/usr/local/openresty/pcre2/lib:/usr/local/openresty/openssl3/lib' \ 90 | " 91 | 92 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 93 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 94 | LABEL resty_version="${RESTY_VERSION}" 95 | LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" 96 | LABEL resty_openssl_version="${RESTY_OPENSSL_VERSION}" 97 | LABEL resty_openssl_patch_version="${RESTY_OPENSSL_PATCH_VERSION}" 98 | LABEL resty_openssl_url_base="${RESTY_OPENSSL_URL_BASE}" 99 | LABEL resty_openssl_build_options="${RESTY_OPENSSL_BUILD_OPTIONS}" 100 | LABEL resty_pcre_version="${RESTY_PCRE_VERSION}" 101 | LABEL resty_pcre_build_options="${RESTY_PCRE_BUILD_OPTIONS}" 102 | LABEL resty_pcre_sha256="${RESTY_PCRE_SHA256}" 103 | LABEL resty_config_options="${RESTY_CONFIG_OPTIONS}" 104 | LABEL resty_config_options_more="${RESTY_CONFIG_OPTIONS_MORE}" 105 | LABEL resty_config_deps="${_RESTY_CONFIG_DEPS}" 106 | LABEL resty_add_package_builddeps="${RESTY_ADD_PACKAGE_BUILDDEPS}" 107 | LABEL resty_add_package_rundeps="${RESTY_ADD_PACKAGE_RUNDEPS}" 108 | LABEL resty_eval_pre_configure="${RESTY_EVAL_PRE_CONFIGURE}" 109 | LABEL resty_eval_post_download_pre_configure="${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" 110 | LABEL resty_eval_pre_make="${RESTY_EVAL_PRE_MAKE}" 111 | LABEL resty_eval_post_make="${RESTY_EVAL_POST_MAKE}" 112 | LABEL resty_luajit_options="${RESTY_LUAJIT_OPTIONS}" 113 | LABEL resty_pcre_options="${RESTY_PCRE_OPTIONS}" 114 | 115 | 116 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ 117 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 118 | build-essential \ 119 | ca-certificates \ 120 | curl \ 121 | gettext-base \ 122 | libgd-dev \ 123 | libgeoip-dev \ 124 | libncurses5-dev \ 125 | libperl-dev \ 126 | libreadline-dev \ 127 | libxslt1-dev \ 128 | make \ 129 | perl \ 130 | unzip \ 131 | wget \ 132 | zlib1g-dev \ 133 | ${RESTY_ADD_PACKAGE_BUILDDEPS} \ 134 | ${RESTY_ADD_PACKAGE_RUNDEPS} \ 135 | && cd /tmp \ 136 | && if [ -n "${RESTY_EVAL_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_PRE_CONFIGURE}); fi \ 137 | && curl -fSL "${RESTY_OPENSSL_URL_BASE}/openssl-${RESTY_OPENSSL_VERSION}.tar.gz" -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 138 | && tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \ 139 | && cd openssl-${RESTY_OPENSSL_VERSION} \ 140 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-2) = "3." ] ; then \ 141 | echo 'patching OpenSSL 3.x for OpenResty' \ 142 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 143 | fi \ 144 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.1" ] ; then \ 145 | echo 'patching OpenSSL 1.1.1 for OpenResty' \ 146 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 147 | fi \ 148 | && if [ $(echo ${RESTY_OPENSSL_VERSION} | cut -c 1-5) = "1.1.0" ] ; then \ 149 | echo 'patching OpenSSL 1.1.0 for OpenResty' \ 150 | && curl -s https://raw.githubusercontent.com/openresty/openresty/ed328977028c3ec3033bc25873ee360056e247cd/patches/openssl-1.1.0j-parallel_build_fix.patch | patch -p1 \ 151 | && curl -s https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-${RESTY_OPENSSL_PATCH_VERSION}-sess_set_get_cb_yield.patch | patch -p1 ; \ 152 | fi \ 153 | && ./config \ 154 | shared zlib -g \ 155 | --prefix=/usr/local/openresty/openssl3 \ 156 | --libdir=lib \ 157 | -Wl,-rpath,/usr/local/openresty/openssl3/lib \ 158 | ${RESTY_OPENSSL_BUILD_OPTIONS} \ 159 | && make -j${RESTY_J} \ 160 | && make -j${RESTY_J} install_sw \ 161 | && cd /tmp \ 162 | && curl -fSL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${RESTY_PCRE_VERSION}/pcre2-${RESTY_PCRE_VERSION}.tar.gz" -o pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 163 | && echo "${RESTY_PCRE_SHA256} pcre2-${RESTY_PCRE_VERSION}.tar.gz" | shasum -a 256 --check \ 164 | && tar xzf pcre2-${RESTY_PCRE_VERSION}.tar.gz \ 165 | && cd /tmp/pcre2-${RESTY_PCRE_VERSION} \ 166 | && CFLAGS="-g -O3" ./configure \ 167 | --prefix=/usr/local/openresty/pcre2 \ 168 | --libdir=/usr/local/openresty/pcre2/lib \ 169 | ${RESTY_PCRE_BUILD_OPTIONS} \ 170 | && CFLAGS="-g -O3" make -j${RESTY_J} \ 171 | && CFLAGS="-g -O3" make -j${RESTY_J} install \ 172 | && cd /tmp \ 173 | && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \ 174 | && tar xzf openresty-${RESTY_VERSION}.tar.gz \ 175 | && cd /tmp/openresty-${RESTY_VERSION} \ 176 | && if [ -n "${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}" ]; then eval $(echo ${RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE}); fi \ 177 | && eval ./configure -j${RESTY_J} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} ${RESTY_LUAJIT_OPTIONS} ${RESTY_PCRE_OPTIONS} \ 178 | && if [ -n "${RESTY_EVAL_PRE_MAKE}" ]; then eval $(echo ${RESTY_EVAL_PRE_MAKE}); fi \ 179 | && make -j${RESTY_J} \ 180 | && make -j${RESTY_J} install \ 181 | && cd /tmp \ 182 | && rm -rf \ 183 | openssl-${RESTY_OPENSSL_VERSION}.tar.gz openssl-${RESTY_OPENSSL_VERSION} \ 184 | pcre2-${RESTY_PCRE_VERSION}.tar.gz pcre2-${RESTY_PCRE_VERSION} \ 185 | openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \ 186 | && curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 187 | && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 188 | && cd luarocks-${RESTY_LUAROCKS_VERSION} \ 189 | && ./configure \ 190 | --prefix=/usr/local/openresty/luajit \ 191 | --with-lua=/usr/local/openresty/luajit \ 192 | --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ 193 | && make build \ 194 | && make install \ 195 | && cd /tmp \ 196 | && if [ -n "${RESTY_EVAL_POST_MAKE}" ]; then eval $(echo ${RESTY_EVAL_POST_MAKE}); fi \ 197 | && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ 198 | && if [ -n "${RESTY_ADD_PACKAGE_BUILDDEPS}" ]; then DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge ${RESTY_ADD_PACKAGE_BUILDDEPS} ; fi \ 199 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ 200 | && mkdir -p /var/run/openresty \ 201 | && ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ 202 | && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log 203 | 204 | # Add additional binaries into PATH for convenience 205 | ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin 206 | 207 | # Add LuaRocks paths 208 | # If OpenResty changes, these may need updating: 209 | # /usr/local/openresty/bin/resty -e 'print(package.path)' 210 | # /usr/local/openresty/bin/resty -e 'print(package.cpath)' 211 | ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" 212 | 213 | ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" 214 | 215 | # Copy nginx configuration files 216 | COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf 217 | COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf 218 | 219 | CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] 220 | 221 | # Use SIGQUIT instead of default SIGTERM to cleanly drain requests 222 | # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls 223 | STOPSIGNAL SIGQUIT 224 | -------------------------------------------------------------------------------- /windows/Dockerfile: -------------------------------------------------------------------------------- 1 | # escape=` 2 | # Dockerfile - Windows 3 | # https://github.com/openresty/docker-openresty 4 | 5 | ARG RESTY_INSTALL_BASE="mcr.microsoft.com/dotnet/framework/runtime" 6 | ARG RESTY_INSTALL_TAG="4.8-windowsservercore-ltsc2019" 7 | ARG RESTY_IMAGE_BASE="mcr.microsoft.com/windows/nanoserver" 8 | ARG RESTY_IMAGE_TAG="1809" 9 | 10 | FROM "${RESTY_INSTALL_BASE}:${RESTY_INSTALL_TAG}" AS downloader 11 | 12 | ARG RESTY_VERSION="1.27.1.2" 13 | 14 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; $env:chocolateyUseWindowsCompression = 'true'; "] 15 | 16 | WORKDIR C:/dl 17 | 18 | # Download Perl and OpenResty 19 | RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; ` 20 | Invoke-WebRequest -Uri "https://chocolatey.org/install.ps1" -UseBasicParsing | iex ; ` 21 | choco install strawberryperl -y --no-progress ; ` 22 | mv C:\Strawberry\ C:\dl\ ; ` 23 | Write-Host "Downloading OpenResty.." ; ` 24 | Invoke-WebRequest "https://openresty.org/download/openresty-$($env:RESTY_VERSION)-win64.zip" -OutFile C:\openresty.zip ; ` 25 | Expand-Archive C:\openresty.zip . ; ` 26 | mv .\openresty-*\ .\openresty 27 | 28 | 29 | ############################################################################### 30 | # Runtime Image Build 31 | ############################################################################### 32 | 33 | FROM "${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG}" 34 | 35 | ARG RESTY_INSTALL_BASE="mcr.microsoft.com/dotnet/framework/runtime" 36 | ARG RESTY_INSTALL_TAG="4.8-windowsservercore-ltsc2019" 37 | ARG RESTY_IMAGE_BASE="mcr.microsoft.com/windows/nanoserver" 38 | ARG RESTY_IMAGE_TAG="1809" 39 | ARG RESTY_VERSION="1.27.1.2" 40 | 41 | LABEL maintainer="Evan Wies " 42 | LABEL resty_install_base="${RESTY_INSTALL_BASE}" 43 | LABEL resty_install_tag="${RESTY_INSTALL_TAG}" 44 | LABEL resty_image_base="${RESTY_IMAGE_BASE}" 45 | LABEL resty_image_tag="${RESTY_IMAGE_TAG}" 46 | LABEL resty_version="${RESTY_VERSION}" 47 | 48 | WORKDIR C:/openresty 49 | 50 | # "ERROR: Access to the registry path is denied." 51 | USER ContainerAdministrator 52 | RUN setx /M PATH "%PATH%;C:\Strawberry\perl\bin;C:\openresty" 53 | USER ContainerUser 54 | 55 | CMD ["nginx", "-g", "daemon off;"] 56 | 57 | COPY --from=downloader C:/dl/ C:/ 58 | 59 | # nginx config is not overwritten as paths in the Windows distribution are already fine 60 | 61 | # we do not move writeable temp paths for Windows (#119) 62 | --------------------------------------------------------------------------------