├── .github └── workflows │ └── ci.yml ├── 2.4 ├── Dockerfile ├── alpine │ ├── Dockerfile │ └── httpd-foreground └── httpd-foreground ├── LICENSE ├── README.md ├── generate-stackbrew-library.sh └── update.sh /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: GitHub CI 2 | 3 | on: 4 | pull_request: 5 | push: 6 | schedule: 7 | - cron: 0 0 * * 0 8 | 9 | defaults: 10 | run: 11 | shell: 'bash -Eeuo pipefail -x {0}' 12 | 13 | jobs: 14 | 15 | generate-jobs: 16 | name: Generate Jobs 17 | runs-on: ubuntu-latest 18 | outputs: 19 | strategy: ${{ steps.generate-jobs.outputs.strategy }} 20 | steps: 21 | - uses: actions/checkout@v4 22 | - uses: docker-library/bashbrew@HEAD 23 | - id: generate-jobs 24 | name: Generate Jobs 25 | run: | 26 | strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")" 27 | echo "strategy=$strategy" >> "$GITHUB_OUTPUT" 28 | jq . <<<"$strategy" # sanity check / debugging aid 29 | 30 | test: 31 | needs: generate-jobs 32 | strategy: ${{ fromJson(needs.generate-jobs.outputs.strategy) }} 33 | name: ${{ matrix.name }} 34 | runs-on: ${{ matrix.os }} 35 | steps: 36 | - uses: actions/checkout@v4 37 | - name: Prepare Environment 38 | run: ${{ matrix.runs.prepare }} 39 | - name: Pull Dependencies 40 | run: ${{ matrix.runs.pull }} 41 | - name: Build ${{ matrix.name }} 42 | run: ${{ matrix.runs.build }} 43 | - name: History ${{ matrix.name }} 44 | run: ${{ matrix.runs.history }} 45 | - name: Test ${{ matrix.name }} 46 | run: ${{ matrix.runs.test }} 47 | - name: '"docker images"' 48 | run: ${{ matrix.runs.images }} 49 | -------------------------------------------------------------------------------- /2.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bookworm-slim 2 | 3 | # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added 4 | #RUN groupadd -r www-data && useradd -r --create-home -g www-data www-data 5 | 6 | ENV HTTPD_PREFIX /usr/local/apache2 7 | ENV PATH $HTTPD_PREFIX/bin:$PATH 8 | RUN mkdir -p "$HTTPD_PREFIX" \ 9 | && chown www-data:www-data "$HTTPD_PREFIX" 10 | WORKDIR $HTTPD_PREFIX 11 | 12 | # install httpd runtime dependencies 13 | # https://httpd.apache.org/docs/2.4/install.html#requirements 14 | RUN set -eux; \ 15 | apt-get update; \ 16 | apt-get install -y --no-install-recommends \ 17 | # https://github.com/docker-library/httpd/issues/214 18 | ca-certificates \ 19 | libaprutil1-ldap \ 20 | # https://github.com/docker-library/httpd/issues/209 21 | libldap-common \ 22 | ; \ 23 | rm -rf /var/lib/apt/lists/* 24 | 25 | ENV HTTPD_VERSION 2.4.63 26 | ENV HTTPD_SHA256 88fc236ab99b2864b248de7d49a008ec2afd7551e64dce8b95f58f32f94c46ab 27 | 28 | # https://httpd.apache.org/security/vulnerabilities_24.html 29 | ENV HTTPD_PATCHES="" 30 | 31 | # see https://httpd.apache.org/docs/2.4/install.html#requirements 32 | RUN set -eux; \ 33 | \ 34 | # mod_http2 mod_lua mod_proxy_html mod_xml2enc 35 | # https://anonscm.debian.org/cgit/pkg-apache/apache2.git/tree/debian/control?id=adb6f181257af28ee67af15fc49d2699a0080d4c 36 | savedAptMark="$(apt-mark showmanual)"; \ 37 | apt-get update; \ 38 | apt-get install -y --no-install-recommends \ 39 | bzip2 \ 40 | dpkg-dev \ 41 | gcc \ 42 | gnupg \ 43 | libapr1-dev \ 44 | libaprutil1-dev \ 45 | libbrotli-dev \ 46 | libcurl4-openssl-dev \ 47 | libjansson-dev \ 48 | liblua5.2-dev \ 49 | libnghttp2-dev \ 50 | libpcre3-dev \ 51 | libssl-dev \ 52 | libxml2-dev \ 53 | make \ 54 | patch \ 55 | wget \ 56 | zlib1g-dev \ 57 | ; \ 58 | rm -r /var/lib/apt/lists/*; \ 59 | \ 60 | ddist() { \ 61 | local f="$1"; shift; \ 62 | local distFile="$1"; shift; \ 63 | local success=; \ 64 | local distUrl=; \ 65 | for distUrl in \ 66 | # https://apache.org/history/mirror-history.html 67 | https://dlcdn.apache.org/ \ 68 | # if the version is outdated, we have to pull from the archive 69 | https://archive.apache.org/dist/ \ 70 | ; do \ 71 | if wget -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ 72 | success=1; \ 73 | break; \ 74 | fi; \ 75 | done; \ 76 | [ -n "$success" ]; \ 77 | }; \ 78 | \ 79 | ddist 'httpd.tar.bz2' "httpd/httpd-$HTTPD_VERSION.tar.bz2"; \ 80 | echo "$HTTPD_SHA256 *httpd.tar.bz2" | sha256sum -c -; \ 81 | \ 82 | # see https://httpd.apache.org/download.cgi#verify 83 | ddist 'httpd.tar.bz2.asc' "httpd/httpd-$HTTPD_VERSION.tar.bz2.asc"; \ 84 | export GNUPGHOME="$(mktemp -d)"; \ 85 | # $ docker run --rm buildpack-deps:bookworm-curl bash -c 'wget -qO- https://downloads.apache.org/httpd/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t\t" fpr " \\"; pub = 0 }' 86 | for key in \ 87 | # Rodent of Unusual Size (DSA) 88 | DE29FB3971E71543FD2DC049508EAEC5302DA568 \ 89 | # Rodent of Unusual Size 90 | 13155B0E9E634F42BF6C163FDDBA64BA2C312D2F \ 91 | # Jim Jagielski 92 | 8B39757B1D8A994DF2433ED58B3A601F08C975E5 \ 93 | # Dean Gaudet 94 | 31EE1A81B8D066548156D37B7D6DBFD1F08E012A \ 95 | # Cliff Woolley 96 | A10208FEC3152DD7C0C9B59B361522D782AB7BD1 \ 97 | # Cliff Woolley 98 | 3DE024AFDA7A4B15CB6C14410F81AA8AB0D5F771 \ 99 | # Graham Leggett 100 | EB138C6AF0FC691001B16D93344A844D751D7F27 \ 101 | # Roy T. Fielding 102 | CBA5A7C21EC143314C41393E5B968010E04F9A89 \ 103 | # Justin R. Erenkrantz 104 | 3C016F2B764621BB549C66B516A96495E2226795 \ 105 | # Aaron Bannert 106 | 937FB3994A242BA9BF49E93021454AF0CC8B0F7E \ 107 | # Brad Nicholes 108 | EAD1359A4C0F2D37472AAF28F55DF0293A4E7AC9 \ 109 | # Sander Striker 110 | 4C1EADADB4EF5007579C919C6635B6C0DE885DD3 \ 111 | # Greg Stein 112 | 01E475360FCCF1D0F24B9D145D414AE1E005C9CB \ 113 | # Andre Malo 114 | 92CCEF0AA7DD46AC3A0F498BCA6939748103A37E \ 115 | # Erik Abele 116 | D395C7573A68B9796D38C258153FA0CD75A67692 \ 117 | # Astrid Kessler (Kess) 118 | FA39B617B61493FD283503E7EED1EA392261D073 \ 119 | # Joe Schaefer 120 | 984FB3350C1D5C7A3282255BB31B213D208F5064 \ 121 | # Stas Bekman 122 | FE7A49DAA875E890B4167F76CCB2EB46E76CF6D0 \ 123 | # Paul Querna 124 | 39F6691A0ECF0C50E8BB849CF78875F642721F00 \ 125 | # Colm MacCarthaigh 126 | 29A2BA848177B73878277FA475CAA2A3F39B3750 \ 127 | # Ruediger Pluem 128 | 120A8667241AEDD4A78B46104C042818311A3DE5 \ 129 | # Nick Kew 130 | 453510BDA6C5855624E009236D0BC73A40581837 \ 131 | # Philip M. Gollucci 132 | 0DE5C55C6BF3B2352DABB89E13249B4FEC88A0BF \ 133 | # Bojan Smojver 134 | 7CDBED100806552182F98844E8E7E00B4DAA1988 \ 135 | # Issac Goldstand 136 | A8BA9617EF3BCCAC3B29B869EDB105896F9522D8 \ 137 | # "Guenter Knauf" ("CODE SIGNING KEY") 138 | 3E6AC004854F3A7F03566B592FF06894E55B0D0E \ 139 | # Jeff Trawick (CODE SIGNING KEY) 140 | 5B5181C2C0AB13E59DA3F7A3EC582EB639FF092C \ 141 | # Jim Jagielski (Release Signing Key) 142 | A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ 143 | # Eric Covener 144 | 65B2D44FE74BD5E3DE3AC3F082781DE46D5954FA \ 145 | # Yann Ylavic 146 | 8935926745E1CE7E3ED748F6EC99EE267EB5F61A \ 147 | # Daniel Ruggeri (http\x3a//home.apache.org/~druggeri/) 148 | E3480043595621FE56105F112AB12A7ADC55C003 \ 149 | # Joe Orton (Release Signing Key) 150 | 93525CFCF6FDFFB3FD9700DD5A4B10AE43B56A27 \ 151 | # Christophe JAILLET 152 | C55AB7B9139EB2263CD1AABC19B033D1760C227B \ 153 | # Stefan Eissing (icing) 154 | 26F51EF9A82F4ACB43F1903ED377C9E7D1944C66 \ 155 | ; do \ 156 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ 157 | done; \ 158 | gpg --batch --verify httpd.tar.bz2.asc httpd.tar.bz2; \ 159 | gpgconf --kill all; \ 160 | rm -rf "$GNUPGHOME" httpd.tar.bz2.asc; \ 161 | \ 162 | mkdir -p src; \ 163 | tar -xf httpd.tar.bz2 -C src --strip-components=1; \ 164 | rm httpd.tar.bz2; \ 165 | cd src; \ 166 | \ 167 | patches() { \ 168 | while [ "$#" -gt 0 ]; do \ 169 | local patchFile="$1"; shift; \ 170 | local patchSha256="$1"; shift; \ 171 | ddist "$patchFile" "httpd/patches/apply_to_$HTTPD_VERSION/$patchFile"; \ 172 | echo "$patchSha256 *$patchFile" | sha256sum -c -; \ 173 | patch -p0 < "$patchFile"; \ 174 | rm -f "$patchFile"; \ 175 | done; \ 176 | }; \ 177 | patches $HTTPD_PATCHES; \ 178 | \ 179 | gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ 180 | CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ 181 | CPPFLAGS="$(dpkg-buildflags --get CPPFLAGS)"; \ 182 | LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ 183 | ./configure \ 184 | --build="$gnuArch" \ 185 | --prefix="$HTTPD_PREFIX" \ 186 | --enable-mods-shared=reallyall \ 187 | --enable-mpms-shared=all \ 188 | # enable the same hardening flags as Debian 189 | # - https://salsa.debian.org/apache-team/apache2/blob/87db7de4e59683fb03e97900f078d06ef2292748/debian/rules#L19-21 190 | # - https://salsa.debian.org/apache-team/apache2/blob/87db7de4e59683fb03e97900f078d06ef2292748/debian/rules#L115 191 | --enable-pie \ 192 | CFLAGS="-pipe $CFLAGS" \ 193 | CPPFLAGS="$CPPFLAGS" \ 194 | LDFLAGS="-Wl,--as-needed $LDFLAGS" \ 195 | ; \ 196 | make -j "$(nproc)"; \ 197 | make install; \ 198 | \ 199 | cd ..; \ 200 | rm -r src man manual; \ 201 | \ 202 | sed -ri \ 203 | -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ 204 | -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ 205 | -e 's!^(\s*TransferLog)\s+\S+!\1 /proc/self/fd/1!g' \ 206 | -e 's!^(\s*User)\s+daemon\s*$!\1 www-data!g' \ 207 | -e 's!^(\s*Group)\s+daemon\s*$!\1 www-data!g' \ 208 | "$HTTPD_PREFIX/conf/httpd.conf" \ 209 | "$HTTPD_PREFIX/conf/extra/httpd-ssl.conf" \ 210 | ; \ 211 | grep -E '^\s*User www-data$' "$HTTPD_PREFIX/conf/httpd.conf"; \ 212 | grep -E '^\s*Group www-data$' "$HTTPD_PREFIX/conf/httpd.conf"; \ 213 | \ 214 | # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies 215 | apt-mark auto '.*' > /dev/null; \ 216 | [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ 217 | find /usr/local -type f -executable -exec ldd '{}' ';' \ 218 | | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ 219 | | sort -u \ 220 | | xargs -r dpkg-query --search \ 221 | | cut -d: -f1 \ 222 | | sort -u \ 223 | | xargs -r apt-mark manual \ 224 | ; \ 225 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 226 | \ 227 | # smoke test 228 | httpd -v 229 | 230 | # https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop 231 | STOPSIGNAL SIGWINCH 232 | 233 | COPY httpd-foreground /usr/local/bin/ 234 | 235 | EXPOSE 80 236 | CMD ["httpd-foreground"] 237 | -------------------------------------------------------------------------------- /2.4/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.22 2 | 3 | # ensure www-data user exists 4 | RUN set -x \ 5 | && adduser -u 82 -D -S -G www-data www-data 6 | # 82 is the standard uid/gid for "www-data" in Alpine 7 | # https://git.alpinelinux.org/cgit/aports/tree/main/apache2/apache2.pre-install?h=v3.14.0 8 | # https://git.alpinelinux.org/cgit/aports/tree/main/lighttpd/lighttpd.pre-install?h=v3.14.0 9 | # https://git.alpinelinux.org/cgit/aports/tree/main/nginx/nginx.pre-install?h=v3.14.0 10 | 11 | ENV HTTPD_PREFIX /usr/local/apache2 12 | ENV PATH $HTTPD_PREFIX/bin:$PATH 13 | RUN mkdir -p "$HTTPD_PREFIX" \ 14 | && chown www-data:www-data "$HTTPD_PREFIX" 15 | WORKDIR $HTTPD_PREFIX 16 | 17 | # install httpd runtime dependencies 18 | # https://httpd.apache.org/docs/2.4/install.html#requirements 19 | RUN set -eux; \ 20 | apk add --no-cache \ 21 | apr \ 22 | apr-util \ 23 | apr-util-ldap \ 24 | # https://github.com/docker-library/httpd/issues/214 25 | ca-certificates \ 26 | perl \ 27 | ; 28 | 29 | ENV HTTPD_VERSION 2.4.63 30 | ENV HTTPD_SHA256 88fc236ab99b2864b248de7d49a008ec2afd7551e64dce8b95f58f32f94c46ab 31 | 32 | # https://httpd.apache.org/security/vulnerabilities_24.html 33 | ENV HTTPD_PATCHES="" 34 | 35 | # see https://httpd.apache.org/docs/2.4/install.html#requirements 36 | RUN set -eux; \ 37 | \ 38 | apk add --no-cache --virtual .build-deps \ 39 | apr-dev \ 40 | apr-util-dev \ 41 | coreutils \ 42 | dpkg-dev dpkg \ 43 | gcc \ 44 | gnupg \ 45 | libc-dev \ 46 | patch \ 47 | # mod_md 48 | curl-dev \ 49 | jansson-dev \ 50 | # mod_proxy_html mod_xml2enc 51 | libxml2-dev \ 52 | # mod_lua 53 | lua-dev \ 54 | make \ 55 | # mod_http2 56 | nghttp2-dev \ 57 | # mod_session_crypto 58 | openssl \ 59 | openssl-dev \ 60 | pcre-dev \ 61 | tar \ 62 | # mod_deflate 63 | zlib-dev \ 64 | # mod_brotli 65 | brotli-dev \ 66 | ; \ 67 | \ 68 | ddist() { \ 69 | local f="$1"; shift; \ 70 | local distFile="$1"; shift; \ 71 | local success=; \ 72 | local distUrl=; \ 73 | for distUrl in \ 74 | # https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 75 | 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ 76 | # if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ 77 | https://downloads.apache.org/ \ 78 | https://www-us.apache.org/dist/ \ 79 | https://www.apache.org/dist/ \ 80 | https://archive.apache.org/dist/ \ 81 | ; do \ 82 | if wget -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ 83 | success=1; \ 84 | break; \ 85 | fi; \ 86 | done; \ 87 | [ -n "$success" ]; \ 88 | }; \ 89 | \ 90 | ddist 'httpd.tar.bz2' "httpd/httpd-$HTTPD_VERSION.tar.bz2"; \ 91 | echo "$HTTPD_SHA256 *httpd.tar.bz2" | sha256sum -c -; \ 92 | \ 93 | # see https://httpd.apache.org/download.cgi#verify 94 | ddist 'httpd.tar.bz2.asc' "httpd/httpd-$HTTPD_VERSION.tar.bz2.asc"; \ 95 | export GNUPGHOME="$(mktemp -d)"; \ 96 | # $ docker run --rm buildpack-deps:bookworm-curl bash -c 'wget -qO- https://downloads.apache.org/httpd/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t\t" fpr " \\"; pub = 0 }' 97 | for key in \ 98 | # Rodent of Unusual Size (DSA) 99 | DE29FB3971E71543FD2DC049508EAEC5302DA568 \ 100 | # Rodent of Unusual Size 101 | 13155B0E9E634F42BF6C163FDDBA64BA2C312D2F \ 102 | # Jim Jagielski 103 | 8B39757B1D8A994DF2433ED58B3A601F08C975E5 \ 104 | # Dean Gaudet 105 | 31EE1A81B8D066548156D37B7D6DBFD1F08E012A \ 106 | # Cliff Woolley 107 | A10208FEC3152DD7C0C9B59B361522D782AB7BD1 \ 108 | # Cliff Woolley 109 | 3DE024AFDA7A4B15CB6C14410F81AA8AB0D5F771 \ 110 | # Graham Leggett 111 | EB138C6AF0FC691001B16D93344A844D751D7F27 \ 112 | # Roy T. Fielding 113 | CBA5A7C21EC143314C41393E5B968010E04F9A89 \ 114 | # Justin R. Erenkrantz 115 | 3C016F2B764621BB549C66B516A96495E2226795 \ 116 | # Aaron Bannert 117 | 937FB3994A242BA9BF49E93021454AF0CC8B0F7E \ 118 | # Brad Nicholes 119 | EAD1359A4C0F2D37472AAF28F55DF0293A4E7AC9 \ 120 | # Sander Striker 121 | 4C1EADADB4EF5007579C919C6635B6C0DE885DD3 \ 122 | # Greg Stein 123 | 01E475360FCCF1D0F24B9D145D414AE1E005C9CB \ 124 | # Andre Malo 125 | 92CCEF0AA7DD46AC3A0F498BCA6939748103A37E \ 126 | # Erik Abele 127 | D395C7573A68B9796D38C258153FA0CD75A67692 \ 128 | # Astrid Kessler (Kess) 129 | FA39B617B61493FD283503E7EED1EA392261D073 \ 130 | # Joe Schaefer 131 | 984FB3350C1D5C7A3282255BB31B213D208F5064 \ 132 | # Stas Bekman 133 | FE7A49DAA875E890B4167F76CCB2EB46E76CF6D0 \ 134 | # Paul Querna 135 | 39F6691A0ECF0C50E8BB849CF78875F642721F00 \ 136 | # Colm MacCarthaigh 137 | 29A2BA848177B73878277FA475CAA2A3F39B3750 \ 138 | # Ruediger Pluem 139 | 120A8667241AEDD4A78B46104C042818311A3DE5 \ 140 | # Nick Kew 141 | 453510BDA6C5855624E009236D0BC73A40581837 \ 142 | # Philip M. Gollucci 143 | 0DE5C55C6BF3B2352DABB89E13249B4FEC88A0BF \ 144 | # Bojan Smojver 145 | 7CDBED100806552182F98844E8E7E00B4DAA1988 \ 146 | # Issac Goldstand 147 | A8BA9617EF3BCCAC3B29B869EDB105896F9522D8 \ 148 | # "Guenter Knauf" ("CODE SIGNING KEY") 149 | 3E6AC004854F3A7F03566B592FF06894E55B0D0E \ 150 | # Jeff Trawick (CODE SIGNING KEY) 151 | 5B5181C2C0AB13E59DA3F7A3EC582EB639FF092C \ 152 | # Jim Jagielski (Release Signing Key) 153 | A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ 154 | # Eric Covener 155 | 65B2D44FE74BD5E3DE3AC3F082781DE46D5954FA \ 156 | # Yann Ylavic 157 | 8935926745E1CE7E3ED748F6EC99EE267EB5F61A \ 158 | # Daniel Ruggeri (http\x3a//home.apache.org/~druggeri/) 159 | E3480043595621FE56105F112AB12A7ADC55C003 \ 160 | # Joe Orton (Release Signing Key) 161 | 93525CFCF6FDFFB3FD9700DD5A4B10AE43B56A27 \ 162 | # Christophe JAILLET 163 | C55AB7B9139EB2263CD1AABC19B033D1760C227B \ 164 | # Stefan Eissing (icing) 165 | 26F51EF9A82F4ACB43F1903ED377C9E7D1944C66 \ 166 | ; do \ 167 | gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ 168 | done; \ 169 | gpg --batch --verify httpd.tar.bz2.asc httpd.tar.bz2; \ 170 | command -v gpgconf && gpgconf --kill all || :; \ 171 | rm -rf "$GNUPGHOME" httpd.tar.bz2.asc; \ 172 | \ 173 | mkdir -p src; \ 174 | tar -xf httpd.tar.bz2 -C src --strip-components=1; \ 175 | rm httpd.tar.bz2; \ 176 | cd src; \ 177 | \ 178 | patches() { \ 179 | while [ "$#" -gt 0 ]; do \ 180 | local patchFile="$1"; shift; \ 181 | local patchSha256="$1"; shift; \ 182 | ddist "$patchFile" "httpd/patches/apply_to_$HTTPD_VERSION/$patchFile"; \ 183 | echo "$patchSha256 *$patchFile" | sha256sum -c -; \ 184 | patch -p0 < "$patchFile"; \ 185 | rm -f "$patchFile"; \ 186 | done; \ 187 | }; \ 188 | patches $HTTPD_PATCHES; \ 189 | \ 190 | gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ 191 | ./configure \ 192 | --build="$gnuArch" \ 193 | --prefix="$HTTPD_PREFIX" \ 194 | --enable-mods-shared=reallyall \ 195 | --enable-mpms-shared=all \ 196 | # PIE and hardening flags are unnecessary as Alpine enables them automatically (https://alpinelinux.org/about/) 197 | ; \ 198 | make -j "$(nproc)"; \ 199 | make install; \ 200 | \ 201 | cd ..; \ 202 | rm -r src man manual; \ 203 | \ 204 | sed -ri \ 205 | -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ 206 | -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ 207 | -e 's!^(\s*TransferLog)\s+\S+!\1 /proc/self/fd/1!g' \ 208 | -e 's!^(\s*User)\s+daemon\s*$!\1 www-data!g' \ 209 | -e 's!^(\s*Group)\s+daemon\s*$!\1 www-data!g' \ 210 | "$HTTPD_PREFIX/conf/httpd.conf" \ 211 | "$HTTPD_PREFIX/conf/extra/httpd-ssl.conf" \ 212 | ; \ 213 | grep -E '^\s*User www-data$' "$HTTPD_PREFIX/conf/httpd.conf"; \ 214 | grep -E '^\s*Group www-data$' "$HTTPD_PREFIX/conf/httpd.conf"; \ 215 | \ 216 | deps="$( \ 217 | scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ 218 | | tr ',' '\n' \ 219 | | sort -u \ 220 | | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ 221 | )"; \ 222 | apk add --no-network --virtual .httpd-so-deps $deps; \ 223 | apk del --no-network .build-deps; \ 224 | \ 225 | # smoke test 226 | httpd -v 227 | 228 | # https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop 229 | STOPSIGNAL SIGWINCH 230 | 231 | COPY httpd-foreground /usr/local/bin/ 232 | 233 | EXPOSE 80 234 | CMD ["httpd-foreground"] 235 | -------------------------------------------------------------------------------- /2.4/alpine/httpd-foreground: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Apache gets grumpy about PID files pre-existing 5 | rm -f /usr/local/apache2/logs/httpd.pid 6 | 7 | exec httpd -DFOREGROUND "$@" 8 | -------------------------------------------------------------------------------- /2.4/httpd-foreground: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Apache gets grumpy about PID files pre-existing 5 | rm -f /usr/local/apache2/logs/httpd.pid 6 | 7 | exec httpd -DFOREGROUND "$@" 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | 204 | 205 | APACHE HTTP SERVER SUBCOMPONENTS: 206 | 207 | The Apache HTTP Server includes a number of subcomponents with 208 | separate copyright notices and license terms. Your use of the source 209 | code for the these subcomponents is subject to the terms and 210 | conditions of the following licenses. 211 | 212 | For the mod_mime_magic component: 213 | 214 | /* 215 | * mod_mime_magic: MIME type lookup via file magic numbers 216 | * Copyright (c) 1996-1997 Cisco Systems, Inc. 217 | * 218 | * This software was submitted by Cisco Systems to the Apache Group in July 219 | * 1997. Future revisions and derivatives of this source code must 220 | * acknowledge Cisco Systems as the original contributor of this module. 221 | * All other licensing and usage conditions are those of the Apache Group. 222 | * 223 | * Some of this code is derived from the free version of the file command 224 | * originally posted to comp.sources.unix. Copyright info for that program 225 | * is included below as required. 226 | * --------------------------------------------------------------------------- 227 | * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin. 228 | * 229 | * This software is not subject to any license of the American Telephone and 230 | * Telegraph Company or of the Regents of the University of California. 231 | * 232 | * Permission is granted to anyone to use this software for any purpose on any 233 | * computer system, and to alter it and redistribute it freely, subject to 234 | * the following restrictions: 235 | * 236 | * 1. The author is not responsible for the consequences of use of this 237 | * software, no matter how awful, even if they arise from flaws in it. 238 | * 239 | * 2. The origin of this software must not be misrepresented, either by 240 | * explicit claim or by omission. Since few users ever read sources, credits 241 | * must appear in the documentation. 242 | * 243 | * 3. Altered versions must be plainly marked as such, and must not be 244 | * misrepresented as being the original software. Since few users ever read 245 | * sources, credits must appear in the documentation. 246 | * 247 | * 4. This notice may not be removed or altered. 248 | * ------------------------------------------------------------------------- 249 | * 250 | */ 251 | 252 | 253 | For the modules\mappers\mod_imagemap.c component: 254 | 255 | "macmartinized" polygon code copyright 1992 by Eric Haines, erich@eye.com 256 | 257 | For the server\util_md5.c component: 258 | 259 | /************************************************************************ 260 | * NCSA HTTPd Server 261 | * Software Development Group 262 | * National Center for Supercomputing Applications 263 | * University of Illinois at Urbana-Champaign 264 | * 605 E. Springfield, Champaign, IL 61820 265 | * httpd@ncsa.uiuc.edu 266 | * 267 | * Copyright (C) 1995, Board of Trustees of the University of Illinois 268 | * 269 | ************************************************************************ 270 | * 271 | * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code 272 | * 273 | * Original Code Copyright (C) 1994, Jeff Hostetler, Spyglass, Inc. 274 | * Portions of Content-MD5 code Copyright (C) 1993, 1994 by Carnegie Mellon 275 | * University (see Copyright below). 276 | * Portions of Content-MD5 code Copyright (C) 1991 Bell Communications 277 | * Research, Inc. (Bellcore) (see Copyright below). 278 | * Portions extracted from mpack, John G. Myers - jgm+@cmu.edu 279 | * Content-MD5 Code contributed by Martin Hamilton (martin@net.lut.ac.uk) 280 | * 281 | */ 282 | 283 | 284 | /* these portions extracted from mpack, John G. Myers - jgm+@cmu.edu */ 285 | /* (C) Copyright 1993,1994 by Carnegie Mellon University 286 | * All Rights Reserved. 287 | * 288 | * Permission to use, copy, modify, distribute, and sell this software 289 | * and its documentation for any purpose is hereby granted without 290 | * fee, provided that the above copyright notice appear in all copies 291 | * and that both that copyright notice and this permission notice 292 | * appear in supporting documentation, and that the name of Carnegie 293 | * Mellon University not be used in advertising or publicity 294 | * pertaining to distribution of the software without specific, 295 | * written prior permission. Carnegie Mellon University makes no 296 | * representations about the suitability of this software for any 297 | * purpose. It is provided "as is" without express or implied 298 | * warranty. 299 | * 300 | * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO 301 | * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 302 | * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE 303 | * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 304 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 305 | * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 306 | * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 307 | * SOFTWARE. 308 | */ 309 | 310 | /* 311 | * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) 312 | * 313 | * Permission to use, copy, modify, and distribute this material 314 | * for any purpose and without fee is hereby granted, provided 315 | * that the above copyright notice and this permission notice 316 | * appear in all copies, and that the name of Bellcore not be 317 | * used in advertising or publicity pertaining to this 318 | * material without the specific, prior written permission 319 | * of an authorized representative of Bellcore. BELLCORE 320 | * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 321 | * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", 322 | * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. 323 | */ 324 | 325 | For the srclib\apr\include\apr_md5.h component: 326 | /* 327 | * This is work is derived from material Copyright RSA Data Security, Inc. 328 | * 329 | * The RSA copyright statement and Licence for that original material is 330 | * included below. This is followed by the Apache copyright statement and 331 | * licence for the modifications made to that material. 332 | */ 333 | 334 | /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 335 | rights reserved. 336 | 337 | License to copy and use this software is granted provided that it 338 | is identified as the "RSA Data Security, Inc. MD5 Message-Digest 339 | Algorithm" in all material mentioning or referencing this software 340 | or this function. 341 | 342 | License is also granted to make and use derivative works provided 343 | that such works are identified as "derived from the RSA Data 344 | Security, Inc. MD5 Message-Digest Algorithm" in all material 345 | mentioning or referencing the derived work. 346 | 347 | RSA Data Security, Inc. makes no representations concerning either 348 | the merchantability of this software or the suitability of this 349 | software for any particular purpose. It is provided "as is" 350 | without express or implied warranty of any kind. 351 | 352 | These notices must be retained in any copies of any part of this 353 | documentation and/or software. 354 | */ 355 | 356 | For the srclib\apr\passwd\apr_md5.c component: 357 | 358 | /* 359 | * This is work is derived from material Copyright RSA Data Security, Inc. 360 | * 361 | * The RSA copyright statement and Licence for that original material is 362 | * included below. This is followed by the Apache copyright statement and 363 | * licence for the modifications made to that material. 364 | */ 365 | 366 | /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm 367 | */ 368 | 369 | /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 370 | rights reserved. 371 | 372 | License to copy and use this software is granted provided that it 373 | is identified as the "RSA Data Security, Inc. MD5 Message-Digest 374 | Algorithm" in all material mentioning or referencing this software 375 | or this function. 376 | 377 | License is also granted to make and use derivative works provided 378 | that such works are identified as "derived from the RSA Data 379 | Security, Inc. MD5 Message-Digest Algorithm" in all material 380 | mentioning or referencing the derived work. 381 | 382 | RSA Data Security, Inc. makes no representations concerning either 383 | the merchantability of this software or the suitability of this 384 | software for any particular purpose. It is provided "as is" 385 | without express or implied warranty of any kind. 386 | 387 | These notices must be retained in any copies of any part of this 388 | documentation and/or software. 389 | */ 390 | /* 391 | * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0 392 | * MD5 crypt() function, which is licenced as follows: 393 | * ---------------------------------------------------------------------------- 394 | * "THE BEER-WARE LICENSE" (Revision 42): 395 | * wrote this file. As long as you retain this notice you 396 | * can do whatever you want with this stuff. If we meet some day, and you think 397 | * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 398 | * ---------------------------------------------------------------------------- 399 | */ 400 | 401 | For the srclib\apr-util\crypto\apr_md4.c component: 402 | 403 | * This is derived from material copyright RSA Data Security, Inc. 404 | * Their notice is reproduced below in its entirety. 405 | * 406 | * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 407 | * rights reserved. 408 | * 409 | * License to copy and use this software is granted provided that it 410 | * is identified as the "RSA Data Security, Inc. MD4 Message-Digest 411 | * Algorithm" in all material mentioning or referencing this software 412 | * or this function. 413 | * 414 | * License is also granted to make and use derivative works provided 415 | * that such works are identified as "derived from the RSA Data 416 | * Security, Inc. MD4 Message-Digest Algorithm" in all material 417 | * mentioning or referencing the derived work. 418 | * 419 | * RSA Data Security, Inc. makes no representations concerning either 420 | * the merchantability of this software or the suitability of this 421 | * software for any particular purpose. It is provided "as is" 422 | * without express or implied warranty of any kind. 423 | * 424 | * These notices must be retained in any copies of any part of this 425 | * documentation and/or software. 426 | */ 427 | 428 | For the srclib\apr-util\include\apr_md4.h component: 429 | 430 | * 431 | * This is derived from material copyright RSA Data Security, Inc. 432 | * Their notice is reproduced below in its entirety. 433 | * 434 | * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 435 | * rights reserved. 436 | * 437 | * License to copy and use this software is granted provided that it 438 | * is identified as the "RSA Data Security, Inc. MD4 Message-Digest 439 | * Algorithm" in all material mentioning or referencing this software 440 | * or this function. 441 | * 442 | * License is also granted to make and use derivative works provided 443 | * that such works are identified as "derived from the RSA Data 444 | * Security, Inc. MD4 Message-Digest Algorithm" in all material 445 | * mentioning or referencing the derived work. 446 | * 447 | * RSA Data Security, Inc. makes no representations concerning either 448 | * the merchantability of this software or the suitability of this 449 | * software for any particular purpose. It is provided "as is" 450 | * without express or implied warranty of any kind. 451 | * 452 | * These notices must be retained in any copies of any part of this 453 | * documentation and/or software. 454 | */ 455 | 456 | 457 | For the srclib\apr-util\test\testmd4.c component: 458 | 459 | * 460 | * This is derived from material copyright RSA Data Security, Inc. 461 | * Their notice is reproduced below in its entirety. 462 | * 463 | * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All 464 | * rights reserved. 465 | * 466 | * RSA Data Security, Inc. makes no representations concerning either 467 | * the merchantability of this software or the suitability of this 468 | * software for any particular purpose. It is provided "as is" 469 | * without express or implied warranty of any kind. 470 | * 471 | * These notices must be retained in any copies of any part of this 472 | * documentation and/or software. 473 | */ 474 | 475 | For the srclib\apr-util\xml\expat\conftools\install-sh component: 476 | 477 | # 478 | # install - install a program, script, or datafile 479 | # This comes from X11R5 (mit/util/scripts/install.sh). 480 | # 481 | # Copyright 1991 by the Massachusetts Institute of Technology 482 | # 483 | # Permission to use, copy, modify, distribute, and sell this software and its 484 | # documentation for any purpose is hereby granted without fee, provided that 485 | # the above copyright notice appear in all copies and that both that 486 | # copyright notice and this permission notice appear in supporting 487 | # documentation, and that the name of M.I.T. not be used in advertising or 488 | # publicity pertaining to distribution of the software without specific, 489 | # written prior permission. M.I.T. makes no representations about the 490 | # suitability of this software for any purpose. It is provided "as is" 491 | # without express or implied warranty. 492 | # 493 | 494 | For the test\zb.c component: 495 | 496 | /* ZeusBench V1.01 497 | =============== 498 | 499 | This program is Copyright (C) Zeus Technology Limited 1996. 500 | 501 | This program may be used and copied freely providing this copyright notice 502 | is not removed. 503 | 504 | This software is provided "as is" and any express or implied waranties, 505 | including but not limited to, the implied warranties of merchantability and 506 | fitness for a particular purpose are disclaimed. In no event shall 507 | Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, 508 | exemplary, or consequential damaged (including, but not limited to, 509 | procurement of substitute good or services; loss of use, data, or profits; 510 | or business interruption) however caused and on theory of liability. Whether 511 | in contract, strict liability or tort (including negligence or otherwise) 512 | arising in any way out of the use of this software, even if advised of the 513 | possibility of such damage. 514 | 515 | Written by Adam Twiss (adam@zeus.co.uk). March 1996 516 | 517 | Thanks to the following people for their input: 518 | Mike Belshe (mbelshe@netscape.com) 519 | Michael Campanella (campanella@stevms.enet.dec.com) 520 | 521 | */ 522 | 523 | For the expat xml parser component: 524 | 525 | Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd 526 | and Clark Cooper 527 | 528 | Permission is hereby granted, free of charge, to any person obtaining 529 | a copy of this software and associated documentation files (the 530 | "Software"), to deal in the Software without restriction, including 531 | without limitation the rights to use, copy, modify, merge, publish, 532 | distribute, sublicense, and/or sell copies of the Software, and to 533 | permit persons to whom the Software is furnished to do so, subject to 534 | the following conditions: 535 | 536 | The above copyright notice and this permission notice shall be included 537 | in all copies or substantial portions of the Software. 538 | 539 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 540 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 541 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 542 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 543 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 544 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 545 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 546 | 547 | 548 | ==================================================================== 549 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # https://github.com/docker-library/httpd 2 | 3 | ## Maintained by: [the Docker Community](https://github.com/docker-library/httpd) 4 | 5 | This is the Git repo of the [Docker "Official Image"](https://github.com/docker-library/official-images#what-are-official-images) for [`httpd`](https://hub.docker.com/_/httpd/) (not to be confused with any official `httpd` image provided by `httpd` upstream). See [the Docker Hub page](https://hub.docker.com/_/httpd/) for the full readme on how to use this Docker image and for information regarding contributing and issues. 6 | 7 | The [full image description on Docker Hub](https://hub.docker.com/_/httpd/) is generated/maintained over in [the docker-library/docs repository](https://github.com/docker-library/docs), specifically in [the `httpd` directory](https://github.com/docker-library/docs/tree/master/httpd). 8 | 9 | ## See a change merged here that doesn't show up on Docker Hub yet? 10 | 11 | For more information about the full official images change lifecycle, see [the "An image's source changed in Git, now what?" FAQ entry](https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what). 12 | 13 | For outstanding `httpd` image PRs, check [PRs with the "library/httpd" label on the official-images repository](https://github.com/docker-library/official-images/labels/library%2Fhttpd). For the current "source of truth" for [`httpd`](https://hub.docker.com/_/httpd/), see [the `library/httpd` file in the official-images repository](https://github.com/docker-library/official-images/blob/master/library/httpd). 14 | 15 | 16 | -------------------------------------------------------------------------------- /generate-stackbrew-library.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | declare -A aliases=( 5 | [2.4]='2 latest' 6 | ) 7 | 8 | self="$(basename "$BASH_SOURCE")" 9 | cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" 10 | 11 | versions=( */ ) 12 | versions=( "${versions[@]%/}" ) 13 | 14 | # get the most recent commit which modified any of "$@" 15 | fileCommit() { 16 | git log -1 --format='format:%H' HEAD -- "$@" 17 | } 18 | 19 | # get the most recent commit which modified "$1/Dockerfile" or any file COPY'd from "$1/Dockerfile" 20 | dirCommit() { 21 | local dir="$1"; shift 22 | ( 23 | cd "$dir" 24 | fileCommit \ 25 | Dockerfile \ 26 | $(git show HEAD:./Dockerfile | awk ' 27 | toupper($1) == "COPY" { 28 | for (i = 2; i < NF; i++) { 29 | print $i 30 | } 31 | } 32 | ') 33 | ) 34 | } 35 | 36 | getArches() { 37 | local repo="$1"; shift 38 | local officialImagesBase="${BASHBREW_LIBRARY:-https://github.com/docker-library/official-images/raw/HEAD/library}/" 39 | 40 | local parentRepoToArchesStr 41 | parentRepoToArchesStr="$( 42 | find -name 'Dockerfile' -exec awk -v officialImagesBase="$officialImagesBase" ' 43 | toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|.*\/.*)(:|$)/ { 44 | printf "%s%s\n", officialImagesBase, $2 45 | } 46 | ' '{}' + \ 47 | | sort -u \ 48 | | xargs -r bashbrew cat --format '["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"' 49 | )" 50 | eval "declare -g -A parentRepoToArches=( $parentRepoToArchesStr )" 51 | } 52 | getArches 'httpd' 53 | 54 | cat <<-EOH 55 | # this file is generated via https://github.com/docker-library/httpd/blob/$(fileCommit "$self")/$self 56 | 57 | Maintainers: Tianon Gravi (@tianon), 58 | Joseph Ferguson (@yosifkit) 59 | GitRepo: https://github.com/docker-library/httpd.git 60 | EOH 61 | 62 | # prints "$2$1$3$1...$N" 63 | join() { 64 | local sep="$1"; shift 65 | local out; printf -v out "${sep//%/%%}%s" "$@" 66 | echo "${out#$sep}" 67 | } 68 | 69 | for version in "${versions[@]}"; do 70 | for variant in '' alpine; do 71 | dir="$version${variant:+/$variant}" 72 | [ -f "$dir/Dockerfile" ] || continue 73 | 74 | commit="$(dirCommit "$dir")" 75 | 76 | fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "HTTPD_VERSION" { print $3; exit }')" 77 | 78 | versionAliases=( 79 | $fullVersion 80 | $version 81 | ${aliases[$version]:-} 82 | ) 83 | 84 | if [ -z "$variant" ]; then 85 | variantAliases=( "${versionAliases[@]}" ) 86 | else 87 | variantAliases=( "${versionAliases[@]/%/-$variant}" ) 88 | variantAliases=( "${variantAliases[@]//latest-/}" ) 89 | fi 90 | 91 | variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")" 92 | 93 | suite="${variantParent#*:}" # "bookworm-slim", "bookworm" 94 | suite="${suite%-slim}" # "bookworm" 95 | 96 | if [ "$variant" = 'alpine' ]; then 97 | suite="alpine$suite" # "alpine3.15" 98 | suiteAliases=( "${versionAliases[@]/%/-$suite}" ) 99 | else 100 | suiteAliases=( "${variantAliases[@]/%/-$suite}" ) 101 | fi 102 | suiteAliases=( "${suiteAliases[@]//latest-/}" ) 103 | variantAliases+=( "${suiteAliases[@]}" ) 104 | 105 | variantArches="${parentRepoToArches[$variantParent]}" 106 | 107 | echo 108 | cat <<-EOE 109 | Tags: $(join ', ' "${variantAliases[@]}") 110 | Architectures: $(join ', ' $variantArches) 111 | GitCommit: $commit 112 | Directory: $dir 113 | EOE 114 | done 115 | done 116 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail 3 | 4 | cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" 5 | 6 | versions=( "$@" ) 7 | if [ ${#versions[@]} -eq 0 ]; then 8 | versions=( */ ) 9 | fi 10 | versions=( "${versions[@]%/}" ) 11 | 12 | for version in "${versions[@]}"; do 13 | fullVersion="$( 14 | wget -qO- 'https://downloads.apache.org/httpd/' \ 15 | | grep -E '