Repository: docker-library/httpd Branch: master Commit: f13d02eacbfa Files: 9 Total size: 48.7 KB Directory structure: gitextract_tk3sufrx/ ├── .github/ │ └── workflows/ │ └── ci.yml ├── 2.4/ │ ├── Dockerfile │ ├── alpine/ │ │ ├── Dockerfile │ │ └── httpd-foreground │ └── httpd-foreground ├── LICENSE ├── README.md ├── generate-stackbrew-library.sh └── update.sh ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/workflows/ci.yml ================================================ name: GitHub CI on: pull_request: push: schedule: - cron: 0 0 * * 0 defaults: run: shell: 'bash -Eeuo pipefail -x {0}' jobs: generate-jobs: name: Generate Jobs runs-on: ubuntu-latest outputs: strategy: ${{ steps.generate-jobs.outputs.strategy }} steps: - uses: actions/checkout@v4 - uses: docker-library/bashbrew@HEAD - id: generate-jobs name: Generate Jobs run: | strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")" echo "strategy=$strategy" >> "$GITHUB_OUTPUT" jq . <<<"$strategy" # sanity check / debugging aid test: needs: generate-jobs strategy: ${{ fromJson(needs.generate-jobs.outputs.strategy) }} name: ${{ matrix.name }} runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Prepare Environment run: ${{ matrix.runs.prepare }} - name: Pull Dependencies run: ${{ matrix.runs.pull }} - name: Build ${{ matrix.name }} run: ${{ matrix.runs.build }} - name: History ${{ matrix.name }} run: ${{ matrix.runs.history }} - name: Test ${{ matrix.name }} run: ${{ matrix.runs.test }} - name: '"docker images"' run: ${{ matrix.runs.images }} ================================================ FILE: 2.4/Dockerfile ================================================ FROM debian:trixie-slim # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added #RUN groupadd -r www-data && useradd -r --create-home -g www-data www-data ENV HTTPD_PREFIX /usr/local/apache2 ENV PATH $HTTPD_PREFIX/bin:$PATH RUN mkdir -p "$HTTPD_PREFIX" \ && chown www-data:www-data "$HTTPD_PREFIX" WORKDIR $HTTPD_PREFIX # install httpd runtime dependencies # https://httpd.apache.org/docs/2.4/install.html#requirements RUN set -eux; \ apt-get install --update -y --no-install-recommends \ # https://github.com/docker-library/httpd/issues/214 ca-certificates \ libaprutil1-ldap \ # https://github.com/docker-library/httpd/issues/209 libldap-common \ ; \ apt-get dist-clean ENV HTTPD_VERSION 2.4.66 ENV HTTPD_SHA256 94d7ff2b42acbb828e870ba29e4cbad48e558a79c623ad3596e4116efcfea25a # https://httpd.apache.org/security/vulnerabilities_24.html ENV HTTPD_PATCHES="" # see https://httpd.apache.org/docs/2.4/install.html#requirements RUN set -eux; \ \ # mod_http2 mod_lua mod_proxy_html mod_xml2enc # https://anonscm.debian.org/cgit/pkg-apache/apache2.git/tree/debian/control?id=adb6f181257af28ee67af15fc49d2699a0080d4c savedAptMark="$(apt-mark showmanual)"; \ apt-get install --update -y --no-install-recommends \ bzip2 \ dpkg-dev \ gcc \ gnupg \ libapr1-dev \ libaprutil1-dev \ libbrotli-dev \ libcurl4-openssl-dev \ libjansson-dev \ liblua5.2-dev \ libnghttp2-dev \ libpcre2-dev \ libssl-dev \ libxml2-dev \ make \ patch \ wget \ zlib1g-dev \ ; \ \ ddist() { \ local f="$1"; shift; \ local distFile="$1"; shift; \ local success=; \ local distUrl=; \ for distUrl in \ # https://apache.org/history/mirror-history.html https://dlcdn.apache.org/ \ # if the version is outdated, we have to pull from the archive https://archive.apache.org/dist/ \ ; do \ if wget -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ success=1; \ break; \ fi; \ done; \ [ -n "$success" ]; \ }; \ \ ddist 'httpd.tar.bz2' "httpd/httpd-$HTTPD_VERSION.tar.bz2"; \ echo "$HTTPD_SHA256 *httpd.tar.bz2" | sha256sum -c -; \ \ # see https://httpd.apache.org/download.cgi#verify ddist 'httpd.tar.bz2.asc' "httpd/httpd-$HTTPD_VERSION.tar.bz2.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ # $ 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 }' for key in \ # Rodent of Unusual Size (DSA) DE29FB3971E71543FD2DC049508EAEC5302DA568 \ # Rodent of Unusual Size 13155B0E9E634F42BF6C163FDDBA64BA2C312D2F \ # Jim Jagielski 8B39757B1D8A994DF2433ED58B3A601F08C975E5 \ # Dean Gaudet 31EE1A81B8D066548156D37B7D6DBFD1F08E012A \ # Cliff Woolley A10208FEC3152DD7C0C9B59B361522D782AB7BD1 \ # Cliff Woolley 3DE024AFDA7A4B15CB6C14410F81AA8AB0D5F771 \ # Graham Leggett EB138C6AF0FC691001B16D93344A844D751D7F27 \ # Roy T. Fielding CBA5A7C21EC143314C41393E5B968010E04F9A89 \ # Justin R. Erenkrantz 3C016F2B764621BB549C66B516A96495E2226795 \ # Aaron Bannert 937FB3994A242BA9BF49E93021454AF0CC8B0F7E \ # Brad Nicholes EAD1359A4C0F2D37472AAF28F55DF0293A4E7AC9 \ # Sander Striker 4C1EADADB4EF5007579C919C6635B6C0DE885DD3 \ # Greg Stein 01E475360FCCF1D0F24B9D145D414AE1E005C9CB \ # Andre Malo 92CCEF0AA7DD46AC3A0F498BCA6939748103A37E \ # Erik Abele D395C7573A68B9796D38C258153FA0CD75A67692 \ # Astrid Kessler (Kess) FA39B617B61493FD283503E7EED1EA392261D073 \ # Joe Schaefer 984FB3350C1D5C7A3282255BB31B213D208F5064 \ # Stas Bekman FE7A49DAA875E890B4167F76CCB2EB46E76CF6D0 \ # Paul Querna 39F6691A0ECF0C50E8BB849CF78875F642721F00 \ # Colm MacCarthaigh 29A2BA848177B73878277FA475CAA2A3F39B3750 \ # Ruediger Pluem 120A8667241AEDD4A78B46104C042818311A3DE5 \ # Nick Kew 453510BDA6C5855624E009236D0BC73A40581837 \ # Philip M. Gollucci 0DE5C55C6BF3B2352DABB89E13249B4FEC88A0BF \ # Bojan Smojver 7CDBED100806552182F98844E8E7E00B4DAA1988 \ # Issac Goldstand A8BA9617EF3BCCAC3B29B869EDB105896F9522D8 \ # "Guenter Knauf" ("CODE SIGNING KEY") 3E6AC004854F3A7F03566B592FF06894E55B0D0E \ # Jeff Trawick (CODE SIGNING KEY) 5B5181C2C0AB13E59DA3F7A3EC582EB639FF092C \ # Jim Jagielski (Release Signing Key) A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ # Eric Covener 65B2D44FE74BD5E3DE3AC3F082781DE46D5954FA \ # Yann Ylavic 8935926745E1CE7E3ED748F6EC99EE267EB5F61A \ # Daniel Ruggeri (http\x3a//home.apache.org/~druggeri/) E3480043595621FE56105F112AB12A7ADC55C003 \ # Joe Orton (Release Signing Key) 93525CFCF6FDFFB3FD9700DD5A4B10AE43B56A27 \ # Christophe JAILLET C55AB7B9139EB2263CD1AABC19B033D1760C227B \ # Stefan Eissing (icing) 26F51EF9A82F4ACB43F1903ED377C9E7D1944C66 \ ; do \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ done; \ gpg --batch --verify httpd.tar.bz2.asc httpd.tar.bz2; \ gpgconf --kill all; \ rm -rf "$GNUPGHOME" httpd.tar.bz2.asc; \ \ mkdir -p src; \ tar -xf httpd.tar.bz2 -C src --strip-components=1; \ rm httpd.tar.bz2; \ cd src; \ \ patches() { \ while [ "$#" -gt 0 ]; do \ local patchFile="$1"; shift; \ local patchSha256="$1"; shift; \ ddist "$patchFile" "httpd/patches/apply_to_$HTTPD_VERSION/$patchFile"; \ echo "$patchSha256 *$patchFile" | sha256sum -c -; \ patch -p0 < "$patchFile"; \ rm -f "$patchFile"; \ done; \ }; \ patches $HTTPD_PATCHES; \ \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ CPPFLAGS="$(dpkg-buildflags --get CPPFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ ./configure \ --build="$gnuArch" \ --prefix="$HTTPD_PREFIX" \ --enable-mods-shared=reallyall \ --enable-mpms-shared=all \ # enable the same hardening flags as Debian # - https://salsa.debian.org/apache-team/apache2/blob/87db7de4e59683fb03e97900f078d06ef2292748/debian/rules#L19-21 # - https://salsa.debian.org/apache-team/apache2/blob/87db7de4e59683fb03e97900f078d06ef2292748/debian/rules#L115 --enable-pie \ CFLAGS="-pipe $CFLAGS" \ CPPFLAGS="$CPPFLAGS" \ LDFLAGS="-Wl,--as-needed $LDFLAGS" \ ; \ make -j "$(nproc)"; \ make install; \ \ cd ..; \ rm -r src man manual; \ \ sed -ri \ -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ -e 's!^(\s*TransferLog)\s+\S+!\1 /proc/self/fd/1!g' \ -e 's!^(\s*User)\s+daemon\s*$!\1 www-data!g' \ -e 's!^(\s*Group)\s+daemon\s*$!\1 www-data!g' \ "$HTTPD_PREFIX/conf/httpd.conf" \ "$HTTPD_PREFIX/conf/extra/httpd-ssl.conf" \ ; \ grep -E '^\s*User www-data$' "$HTTPD_PREFIX/conf/httpd.conf"; \ grep -E '^\s*Group www-data$' "$HTTPD_PREFIX/conf/httpd.conf"; \ \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies apt-mark auto '.*' > /dev/null; \ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ find /usr/local -type f -executable -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ | xargs -r dpkg-query --search \ | cut -d: -f1 \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ apt-get dist-clean; \ \ # smoke test httpd -v # https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop STOPSIGNAL SIGWINCH COPY httpd-foreground /usr/local/bin/ EXPOSE 80 CMD ["httpd-foreground"] ================================================ FILE: 2.4/alpine/Dockerfile ================================================ FROM alpine:3.23 # ensure www-data user exists RUN set -x \ && adduser -u 82 -D -S -G www-data www-data # 82 is the standard uid/gid for "www-data" in Alpine # https://git.alpinelinux.org/cgit/aports/tree/main/apache2/apache2.pre-install?h=v3.14.0 # https://git.alpinelinux.org/cgit/aports/tree/main/lighttpd/lighttpd.pre-install?h=v3.14.0 # https://git.alpinelinux.org/cgit/aports/tree/main/nginx/nginx.pre-install?h=v3.14.0 ENV HTTPD_PREFIX /usr/local/apache2 ENV PATH $HTTPD_PREFIX/bin:$PATH RUN mkdir -p "$HTTPD_PREFIX" \ && chown www-data:www-data "$HTTPD_PREFIX" WORKDIR $HTTPD_PREFIX # install httpd runtime dependencies # https://httpd.apache.org/docs/2.4/install.html#requirements RUN set -eux; \ apk add --no-cache \ apr \ apr-util \ apr-util-ldap \ # https://github.com/docker-library/httpd/issues/214 ca-certificates \ perl \ ; ENV HTTPD_VERSION 2.4.66 ENV HTTPD_SHA256 94d7ff2b42acbb828e870ba29e4cbad48e558a79c623ad3596e4116efcfea25a # https://httpd.apache.org/security/vulnerabilities_24.html ENV HTTPD_PATCHES="" # see https://httpd.apache.org/docs/2.4/install.html#requirements RUN set -eux; \ \ apk add --no-cache --virtual .build-deps \ apr-dev \ apr-util-dev \ coreutils \ dpkg-dev dpkg \ gcc \ gnupg \ libc-dev \ patch \ # mod_md curl-dev \ jansson-dev \ # mod_proxy_html mod_xml2enc libxml2-dev \ # mod_lua lua-dev \ make \ # mod_http2 nghttp2-dev \ # mod_session_crypto openssl \ openssl-dev \ pcre-dev \ tar \ # mod_deflate zlib-dev \ # mod_brotli brotli-dev \ ; \ \ ddist() { \ local f="$1"; shift; \ local distFile="$1"; shift; \ local success=; \ local distUrl=; \ for distUrl in \ # https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ # if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ https://downloads.apache.org/ \ https://www-us.apache.org/dist/ \ https://www.apache.org/dist/ \ https://archive.apache.org/dist/ \ ; do \ if wget -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ success=1; \ break; \ fi; \ done; \ [ -n "$success" ]; \ }; \ \ ddist 'httpd.tar.bz2' "httpd/httpd-$HTTPD_VERSION.tar.bz2"; \ echo "$HTTPD_SHA256 *httpd.tar.bz2" | sha256sum -c -; \ \ # see https://httpd.apache.org/download.cgi#verify ddist 'httpd.tar.bz2.asc' "httpd/httpd-$HTTPD_VERSION.tar.bz2.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ # $ 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 }' for key in \ # Rodent of Unusual Size (DSA) DE29FB3971E71543FD2DC049508EAEC5302DA568 \ # Rodent of Unusual Size 13155B0E9E634F42BF6C163FDDBA64BA2C312D2F \ # Jim Jagielski 8B39757B1D8A994DF2433ED58B3A601F08C975E5 \ # Dean Gaudet 31EE1A81B8D066548156D37B7D6DBFD1F08E012A \ # Cliff Woolley A10208FEC3152DD7C0C9B59B361522D782AB7BD1 \ # Cliff Woolley 3DE024AFDA7A4B15CB6C14410F81AA8AB0D5F771 \ # Graham Leggett EB138C6AF0FC691001B16D93344A844D751D7F27 \ # Roy T. Fielding CBA5A7C21EC143314C41393E5B968010E04F9A89 \ # Justin R. Erenkrantz 3C016F2B764621BB549C66B516A96495E2226795 \ # Aaron Bannert 937FB3994A242BA9BF49E93021454AF0CC8B0F7E \ # Brad Nicholes EAD1359A4C0F2D37472AAF28F55DF0293A4E7AC9 \ # Sander Striker 4C1EADADB4EF5007579C919C6635B6C0DE885DD3 \ # Greg Stein 01E475360FCCF1D0F24B9D145D414AE1E005C9CB \ # Andre Malo 92CCEF0AA7DD46AC3A0F498BCA6939748103A37E \ # Erik Abele D395C7573A68B9796D38C258153FA0CD75A67692 \ # Astrid Kessler (Kess) FA39B617B61493FD283503E7EED1EA392261D073 \ # Joe Schaefer 984FB3350C1D5C7A3282255BB31B213D208F5064 \ # Stas Bekman FE7A49DAA875E890B4167F76CCB2EB46E76CF6D0 \ # Paul Querna 39F6691A0ECF0C50E8BB849CF78875F642721F00 \ # Colm MacCarthaigh 29A2BA848177B73878277FA475CAA2A3F39B3750 \ # Ruediger Pluem 120A8667241AEDD4A78B46104C042818311A3DE5 \ # Nick Kew 453510BDA6C5855624E009236D0BC73A40581837 \ # Philip M. Gollucci 0DE5C55C6BF3B2352DABB89E13249B4FEC88A0BF \ # Bojan Smojver 7CDBED100806552182F98844E8E7E00B4DAA1988 \ # Issac Goldstand A8BA9617EF3BCCAC3B29B869EDB105896F9522D8 \ # "Guenter Knauf" ("CODE SIGNING KEY") 3E6AC004854F3A7F03566B592FF06894E55B0D0E \ # Jeff Trawick (CODE SIGNING KEY) 5B5181C2C0AB13E59DA3F7A3EC582EB639FF092C \ # Jim Jagielski (Release Signing Key) A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ # Eric Covener 65B2D44FE74BD5E3DE3AC3F082781DE46D5954FA \ # Yann Ylavic 8935926745E1CE7E3ED748F6EC99EE267EB5F61A \ # Daniel Ruggeri (http\x3a//home.apache.org/~druggeri/) E3480043595621FE56105F112AB12A7ADC55C003 \ # Joe Orton (Release Signing Key) 93525CFCF6FDFFB3FD9700DD5A4B10AE43B56A27 \ # Christophe JAILLET C55AB7B9139EB2263CD1AABC19B033D1760C227B \ # Stefan Eissing (icing) 26F51EF9A82F4ACB43F1903ED377C9E7D1944C66 \ ; do \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ done; \ gpg --batch --verify httpd.tar.bz2.asc httpd.tar.bz2; \ command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME" httpd.tar.bz2.asc; \ \ mkdir -p src; \ tar -xf httpd.tar.bz2 -C src --strip-components=1; \ rm httpd.tar.bz2; \ cd src; \ \ patches() { \ while [ "$#" -gt 0 ]; do \ local patchFile="$1"; shift; \ local patchSha256="$1"; shift; \ ddist "$patchFile" "httpd/patches/apply_to_$HTTPD_VERSION/$patchFile"; \ echo "$patchSha256 *$patchFile" | sha256sum -c -; \ patch -p0 < "$patchFile"; \ rm -f "$patchFile"; \ done; \ }; \ patches $HTTPD_PATCHES; \ \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ ./configure \ --build="$gnuArch" \ --prefix="$HTTPD_PREFIX" \ --enable-mods-shared=reallyall \ --enable-mpms-shared=all \ # PIE and hardening flags are unnecessary as Alpine enables them automatically (https://alpinelinux.org/about/) ; \ make -j "$(nproc)"; \ make install; \ \ cd ..; \ rm -r src man manual; \ \ sed -ri \ -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ -e 's!^(\s*TransferLog)\s+\S+!\1 /proc/self/fd/1!g' \ -e 's!^(\s*User)\s+daemon\s*$!\1 www-data!g' \ -e 's!^(\s*Group)\s+daemon\s*$!\1 www-data!g' \ "$HTTPD_PREFIX/conf/httpd.conf" \ "$HTTPD_PREFIX/conf/extra/httpd-ssl.conf" \ ; \ grep -E '^\s*User www-data$' "$HTTPD_PREFIX/conf/httpd.conf"; \ grep -E '^\s*Group www-data$' "$HTTPD_PREFIX/conf/httpd.conf"; \ \ deps="$( \ scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ | tr ',' '\n' \ | sort -u \ | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --no-network --virtual .httpd-so-deps $deps; \ apk del --no-network .build-deps; \ \ # smoke test httpd -v # https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop STOPSIGNAL SIGWINCH COPY httpd-foreground /usr/local/bin/ EXPOSE 80 CMD ["httpd-foreground"] ================================================ FILE: 2.4/alpine/httpd-foreground ================================================ #!/bin/sh set -e # Apache gets grumpy about PID files pre-existing rm -f /usr/local/apache2/logs/httpd.pid exec httpd -DFOREGROUND "$@" ================================================ FILE: 2.4/httpd-foreground ================================================ #!/bin/sh set -e # Apache gets grumpy about PID files pre-existing rm -f /usr/local/apache2/logs/httpd.pid exec httpd -DFOREGROUND "$@" ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. APACHE HTTP SERVER SUBCOMPONENTS: The Apache HTTP Server includes a number of subcomponents with separate copyright notices and license terms. Your use of the source code for the these subcomponents is subject to the terms and conditions of the following licenses. For the mod_mime_magic component: /* * mod_mime_magic: MIME type lookup via file magic numbers * Copyright (c) 1996-1997 Cisco Systems, Inc. * * This software was submitted by Cisco Systems to the Apache Group in July * 1997. Future revisions and derivatives of this source code must * acknowledge Cisco Systems as the original contributor of this module. * All other licensing and usage conditions are those of the Apache Group. * * Some of this code is derived from the free version of the file command * originally posted to comp.sources.unix. Copyright info for that program * is included below as required. * --------------------------------------------------------------------------- * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin. * * This software is not subject to any license of the American Telephone and * Telegraph Company or of the Regents of the University of California. * * Permission is granted to anyone to use this software for any purpose on any * computer system, and to alter it and redistribute it freely, subject to * the following restrictions: * * 1. The author is not responsible for the consequences of use of this * software, no matter how awful, even if they arise from flaws in it. * * 2. The origin of this software must not be misrepresented, either by * explicit claim or by omission. Since few users ever read sources, credits * must appear in the documentation. * * 3. Altered versions must be plainly marked as such, and must not be * misrepresented as being the original software. Since few users ever read * sources, credits must appear in the documentation. * * 4. This notice may not be removed or altered. * ------------------------------------------------------------------------- * */ For the modules\mappers\mod_imagemap.c component: "macmartinized" polygon code copyright 1992 by Eric Haines, erich@eye.com For the server\util_md5.c component: /************************************************************************ * NCSA HTTPd Server * Software Development Group * National Center for Supercomputing Applications * University of Illinois at Urbana-Champaign * 605 E. Springfield, Champaign, IL 61820 * httpd@ncsa.uiuc.edu * * Copyright (C) 1995, Board of Trustees of the University of Illinois * ************************************************************************ * * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code * * Original Code Copyright (C) 1994, Jeff Hostetler, Spyglass, Inc. * Portions of Content-MD5 code Copyright (C) 1993, 1994 by Carnegie Mellon * University (see Copyright below). * Portions of Content-MD5 code Copyright (C) 1991 Bell Communications * Research, Inc. (Bellcore) (see Copyright below). * Portions extracted from mpack, John G. Myers - jgm+@cmu.edu * Content-MD5 Code contributed by Martin Hamilton (martin@net.lut.ac.uk) * */ /* these portions extracted from mpack, John G. Myers - jgm+@cmu.edu */ /* (C) Copyright 1993,1994 by Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Carnegie * Mellon University not be used in advertising or publicity * pertaining to distribution of the software without specific, * written prior permission. Carnegie Mellon University makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ /* * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) * * Permission to use, copy, modify, and distribute this material * for any purpose and without fee is hereby granted, provided * that the above copyright notice and this permission notice * appear in all copies, and that the name of Bellcore not be * used in advertising or publicity pertaining to this * material without the specific, prior written permission * of an authorized representative of Bellcore. BELLCORE * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. */ For the srclib\apr\include\apr_md5.h component: /* * This is work is derived from material Copyright RSA Data Security, Inc. * * The RSA copyright statement and Licence for that original material is * included below. This is followed by the Apache copyright statement and * licence for the modifications made to that material. */ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software. */ For the srclib\apr\passwd\apr_md5.c component: /* * This is work is derived from material Copyright RSA Data Security, Inc. * * The RSA copyright statement and Licence for that original material is * included below. This is followed by the Apache copyright statement and * licence for the modifications made to that material. */ /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm */ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software. */ /* * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0 * MD5 crypt() function, which is licenced as follows: * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * wrote this file. As long as you retain this notice you * can do whatever you want with this stuff. If we meet some day, and you think * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- */ For the srclib\apr-util\crypto\apr_md4.c component: * This is derived from material copyright RSA Data Security, Inc. * Their notice is reproduced below in its entirety. * * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All * rights reserved. * * License to copy and use this software is granted provided that it * is identified as the "RSA Data Security, Inc. MD4 Message-Digest * Algorithm" in all material mentioning or referencing this software * or this function. * * License is also granted to make and use derivative works provided * that such works are identified as "derived from the RSA Data * Security, Inc. MD4 Message-Digest Algorithm" in all material * mentioning or referencing the derived work. * * RSA Data Security, Inc. makes no representations concerning either * the merchantability of this software or the suitability of this * software for any particular purpose. It is provided "as is" * without express or implied warranty of any kind. * * These notices must be retained in any copies of any part of this * documentation and/or software. */ For the srclib\apr-util\include\apr_md4.h component: * * This is derived from material copyright RSA Data Security, Inc. * Their notice is reproduced below in its entirety. * * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All * rights reserved. * * License to copy and use this software is granted provided that it * is identified as the "RSA Data Security, Inc. MD4 Message-Digest * Algorithm" in all material mentioning or referencing this software * or this function. * * License is also granted to make and use derivative works provided * that such works are identified as "derived from the RSA Data * Security, Inc. MD4 Message-Digest Algorithm" in all material * mentioning or referencing the derived work. * * RSA Data Security, Inc. makes no representations concerning either * the merchantability of this software or the suitability of this * software for any particular purpose. It is provided "as is" * without express or implied warranty of any kind. * * These notices must be retained in any copies of any part of this * documentation and/or software. */ For the srclib\apr-util\test\testmd4.c component: * * This is derived from material copyright RSA Data Security, Inc. * Their notice is reproduced below in its entirety. * * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All * rights reserved. * * RSA Data Security, Inc. makes no representations concerning either * the merchantability of this software or the suitability of this * software for any particular purpose. It is provided "as is" * without express or implied warranty of any kind. * * These notices must be retained in any copies of any part of this * documentation and/or software. */ For the srclib\apr-util\xml\expat\conftools\install-sh component: # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # For the test\zb.c component: /* ZeusBench V1.01 =============== This program is Copyright (C) Zeus Technology Limited 1996. This program may be used and copied freely providing this copyright notice is not removed. This software is provided "as is" and any express or implied waranties, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, exemplary, or consequential damaged (including, but not limited to, procurement of substitute good or services; loss of use, data, or profits; or business interruption) however caused and on 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. Written by Adam Twiss (adam@zeus.co.uk). March 1996 Thanks to the following people for their input: Mike Belshe (mbelshe@netscape.com) Michael Campanella (campanella@stevms.enet.dec.com) */ For the expat xml parser component: Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ==================================================================== ================================================ FILE: README.md ================================================ # https://github.com/docker-library/httpd ## Maintained by: [the Docker Community](https://github.com/docker-library/httpd) 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. 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). ## See a change merged here that doesn't show up on Docker Hub yet? 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). 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). ================================================ FILE: generate-stackbrew-library.sh ================================================ #!/usr/bin/env bash set -eu declare -A aliases=( [2.4]='2 latest' ) self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" versions=( */ ) versions=( "${versions[@]%/}" ) # get the most recent commit which modified any of "$@" fileCommit() { git log -1 --format='format:%H' HEAD -- "$@" } # get the most recent commit which modified "$1/Dockerfile" or any file COPY'd from "$1/Dockerfile" dirCommit() { local dir="$1"; shift ( cd "$dir" fileCommit \ Dockerfile \ $(git show HEAD:./Dockerfile | awk ' toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } } ') ) } getArches() { local repo="$1"; shift local officialImagesBase="${BASHBREW_LIBRARY:-https://github.com/docker-library/official-images/raw/HEAD/library}/" local parentRepoToArchesStr parentRepoToArchesStr="$( find -name 'Dockerfile' -exec awk -v officialImagesBase="$officialImagesBase" ' toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|.*\/.*)(:|$)/ { printf "%s%s\n", officialImagesBase, $2 } ' '{}' + \ | sort -u \ | xargs -r bashbrew cat --format '["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"' )" eval "declare -g -A parentRepoToArches=( $parentRepoToArchesStr )" } getArches 'httpd' cat <<-EOH # this file is generated via https://github.com/docker-library/httpd/blob/$(fileCommit "$self")/$self Maintainers: Tianon Gravi (@tianon), Joseph Ferguson (@yosifkit) GitRepo: https://github.com/docker-library/httpd.git EOH # prints "$2$1$3$1...$N" join() { local sep="$1"; shift local out; printf -v out "${sep//%/%%}%s" "$@" echo "${out#$sep}" } for version in "${versions[@]}"; do for variant in '' alpine; do dir="$version${variant:+/$variant}" [ -f "$dir/Dockerfile" ] || continue commit="$(dirCommit "$dir")" fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "HTTPD_VERSION" { print $3; exit }')" versionAliases=( $fullVersion $version ${aliases[$version]:-} ) if [ -z "$variant" ]; then variantAliases=( "${versionAliases[@]}" ) else variantAliases=( "${versionAliases[@]/%/-$variant}" ) variantAliases=( "${variantAliases[@]//latest-/}" ) fi variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")" suite="${variantParent#*:}" # "bookworm-slim", "bookworm" suite="${suite%-slim}" # "bookworm" if [ "$variant" = 'alpine' ]; then suite="alpine$suite" # "alpine3.15" suiteAliases=( "${versionAliases[@]/%/-$suite}" ) else suiteAliases=( "${variantAliases[@]/%/-$suite}" ) fi suiteAliases=( "${suiteAliases[@]//latest-/}" ) variantAliases+=( "${suiteAliases[@]}" ) variantArches="${parentRepoToArches[$variantParent]}" echo cat <<-EOE Tags: $(join ', ' "${variantAliases[@]}") Architectures: $(join ', ' $variantArches) GitCommit: $commit Directory: $dir EOE done done ================================================ FILE: update.sh ================================================ #!/usr/bin/env bash set -eo pipefail cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" versions=( "$@" ) if [ ${#versions[@]} -eq 0 ]; then versions=( */ ) fi versions=( "${versions[@]%/}" ) for version in "${versions[@]}"; do fullVersion="$( wget -qO- 'https://downloads.apache.org/httpd/' \ | grep -E '