短描述

The Apache HTTP Server Project

Docker Pull 命令

docker pull library/httpd

完整描述

# Supported tags and respective `Dockerfile` links\n\n-\t[`2.4.34`, `2.4`, `2`, `latest` (*2.4/Dockerfile*)](https://github.com/docker-library/httpd/blob/38842a5d4cdd44ff4888e8540c0da99009790d01/2.4/Dockerfile)\n-\t[`2.4.34-alpine`, `2.4-alpine`, `2-alpine`, `alpine` (*2.4/alpine/Dockerfile*)](https://github.com/docker-library/httpd/blob/38842a5d4cdd44ff4888e8540c0da99009790d01/2.4/alpine/Dockerfile)\n\n# Quick reference\n\n-\t**Where to get help**: \n\t[the Docker Community Forums](https://forums.docker.com/), [the Docker Community Slack](https://blog.docker.com/2016/11/introducing-docker-community-directory-docker-community-slack/), or [Stack Overflow](https://stackoverflow.com/search?tab=newest&q=docker)\n\n-\t**Where to file issues**: \n\t[https://github.com/docker-library/httpd/issues](https://github.com/docker-library/httpd/issues)\n\n-\t**Maintained by**: \n\t[the Docker Community](https://github.com/docker-library/httpd)\n\n-\t**Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) \n\t[`amd64`](https://hub.docker.com/r/amd64/httpd/), [`arm32v5`](https://hub.docker.com/r/arm32v5/httpd/), [`arm32v6`](https://hub.docker.com/r/arm32v6/httpd/), [`arm32v7`](https://hub.docker.com/r/arm32v7/httpd/), [`arm64v8`](https://hub.docker.com/r/arm64v8/httpd/), [`i386`](https://hub.docker.com/r/i386/httpd/), [`ppc64le`](https://hub.docker.com/r/ppc64le/httpd/), [`s390x`](https://hub.docker.com/r/s390x/httpd/)\n\n-\t**Published image artifact details**: \n\t[repo-info repo\'s `repos/httpd/` directory](https://github.com/docker-library/repo-info/blob/master/repos/httpd) ([history](https://github.com/docker-library/repo-info/commits/master/repos/httpd)) \n\t(image metadata, transfer size, etc)\n\n-\t**Image updates**: \n\t[official-images PRs with label `library/httpd`](https://github.com/docker-library/official-images/pulls?q=label%3Alibrary%2Fhttpd) \n\t[official-images repo\'s `library/httpd` file](https://github.com/docker-library/official-images/blob/master/library/httpd) ([history](https://github.com/docker-library/official-images/commits/master/library/httpd))\n\n-\t**Source of this description**: \n\t[docs repo\'s `httpd/` directory](https://github.com/docker-library/docs/tree/master/httpd) ([history](https://github.com/docker-library/docs/commits/master/httpd))\n\n-\t**Supported Docker versions**: \n\t[the latest release](https://github.com/docker/docker-ce/releases/latest) (down to 1.6 on a best-effort basis)\n\n# What is httpd?\n\nThe Apache HTTP Server, colloquially called Apache, is a Web server application notable for playing a key role in the initial growth of the World Wide Web. Originally based on the NCSA HTTPd server, development of Apache began in early 1995 after work on the NCSA code stalled. Apache quickly overtook NCSA HTTPd as the dominant HTTP server, and has remained the most popular HTTP server in use since April 1996.\n\n> [wikipedia.org/wiki/Apache_HTTP_Server](http://en.wikipedia.org/wiki/Apache_HTTP_Server)\n\n![logo](https://raw.githubusercontent.com/docker-library/docs/8e367edd887f5fe876890a0ab4d08806527a1571/httpd/logo.png)\n\n# How to use this image.\n\nThis image only contains Apache httpd with the defaults from upstream. There is no PHP installed, but it should not be hard to extend. On the other hand, if you just want PHP with Apache httpd see the [PHP image](https://registry.hub.docker.com/_/php/) and look at the `-apache` tags. If you want to run a simple HTML server, add a simple Dockerfile to your project where `public-html/` is the directory containing all your HTML.\n\n### Create a `Dockerfile` in your project\n\n```dockerfile\nFROM httpd:2.4\nCOPY ./public-html/ /usr/local/apache2/htdocs/\n```\n\nThen, run the commands to build and run the Docker image:\n\n```console\n$ docker build -t my-apache2 .\n$ docker run -dit --name my-running-app -p 8080:80 my-apache2\n```\n\nVisit http://localhost:8080 and you will see It works!\n\n### Without a `Dockerfile`\n\nIf you don\'t want to include a `Dockerfile` in your project, it is sufficient to do the following:\n\n```console\n$ docker run -dit --name my-apache-app -p 8080:80 -v "$PWD":/usr/local/apache2/htdocs/ httpd:2.4\n```\n\n### Configuration\n\nTo customize the configuration of the httpd server, just `COPY` your custom configuration in as `/usr/local/apache2/conf/httpd.conf`.\n\n```dockerfile\nFROM httpd:2.4\nCOPY ./my-httpd.conf /usr/local/apache2/conf/httpd.conf\n```\n\n#### SSL/HTTPS\n\nIf you want to run your web traffic over SSL, the simplest setup is to `COPY` or mount (`-v`) your `server.crt` and `server.key` into `/usr/local/apache2/conf/` and then customize the `/usr/local/apache2/conf/httpd.conf` by removing the comment symbol from the following lines:\n\n```apacheconf\n...\n#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so\n...\n#LoadModule ssl_module modules/mod_ssl.so\n...\n#Include conf/extra/httpd-ssl.conf\n...\n```\n\nThe `conf/extra/httpd-ssl.conf` configuration file will use the certificate files previously added and tell the daemon to also listen on port 443. Be sure to also add something like `-p 443:443` to your `docker run` to forward the https port.\n\nThis could be accomplished with a `sed` line similar to the following:\n\n```dockerfile\nRUN sed -i \\\n\t\t-e \'s/^#\\(Include .*httpd-ssl.conf\\)/\\1/\' \\\n\t\t-e \'s/^#\\(LoadModule .*mod_ssl.so\\)/\\1/\' \\\n\t\t-e \'s/^#\\(LoadModule .*mod_socache_shmcb.so\\)/\\1/\' \\\n\t\tconf/httpd.conf\n```\n\nThe previous steps should work well for development, but we recommend customizing your conf files for production, see [httpd.apache.org](https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html) for more information about SSL setup.\n\n# Image Variants\n\nThe `httpd` images come in many flavors, each designed for a specific use case.\n\n## `httpd:<version>`\n\nThis is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.\n\n## `httpd:alpine`\n\nThis image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.\n\nThis variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn\'t have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.\n\nTo minimize image size, it\'s uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar).\n\n# License\n\nView [license information](https://www.apache.org/licenses/) for the software contained in this image.\n\nAs with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).\n\nSome additional license information which was able to be auto-detected might be found in [the `repo-info` repository\'s `httpd/` directory](https://github.com/docker-library/repo-info/tree/master/repos/httpd).\n\nAs for any pre-built image usage, it is the image user\'s responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
版本名称 创建时间 最后更新时间
latest 2018年9月4日 19:13 2018年8月1日 20:43
2 2018年9月4日 19:13 2018年8月1日 20:43
2.4 2018年9月4日 19:13 2018年8月1日 20:43
2.4.34 2018年9月4日 19:13 2018年8月1日 20:43
alpine 2018年9月4日 19:13 2018年8月1日 19:48
2-alpine 2018年9月4日 19:13 2018年8月1日 19:48
2.4-alpine 2018年9月4日 19:13 2018年8月1日 19:48
2.4.34-alpine 2018年9月4日 19:13 2018年8月1日 19:48
2.4.33-alpine 2018年9月4日 19:13 2018年7月6日 23:43
2.4.33 2018年9月4日 19:13 2018年6月27日 20:43
2.4.32-alpine 2018年9月4日 19:13 2018年3月20日 22:43
2.4.32 2018年9月4日 19:13 2018年3月20日 20:44
2.4.29 2018年9月4日 19:13 2018年3月15日 05:43
2.4.29-alpine 2018年9月4日 19:13 2018年3月8日 23:43
2.2 2018年9月4日 19:13 2018年1月19日 20:50
2.2.34 2018年9月4日 19:13 2018年1月19日 20:50
2.2-alpine 2018年9月4日 19:13 2018年1月19日 10:43
2.2.34-alpine 2018年9月4日 19:13 2018年1月19日 10:43
2.4.28 2018年9月4日 19:13 2017年10月14日 05:43
2.4.28-alpine 2018年9月4日 19:13 2017年10月13日 06:44
2.4.27 2018年9月4日 19:13 2017年9月27日 23:43
2.4.27-alpine 2018年9月4日 19:13 2017年9月26日 09:42
2.4.25-alpine 2018年9月4日 19:13 2017年7月26日 13:53
2.2.32-alpine 2018年9月4日 19:13 2017年6月30日 05:10
2.4.25 2018年9月4日 19:13 2017年6月24日 19:04
2.2.32 2018年9月4日 19:13 2017年6月24日 19:02
2.2.31-alpine 2018年9月4日 19:13 2017年1月6日 07:57
2.2.31 2018年9月4日 19:13 2017年1月6日 07:56
2.4.23 2018年9月4日 19:13 2016年12月20日 06:42
2.4.23-alpine 2018年9月4日 19:13 2016年12月7日 04:47
2.4.20 2018年9月4日 19:13 2016年6月9日 06:32
2.4.18 2018年9月4日 19:13 2016年3月30日 07:32
2.4.17 2018年9月4日 19:13 2015年12月9日 09:02
2.4.16 2018年9月4日 19:13 1970年1月1日 08:00
2.2.29 2018年9月4日 19:13 1970年1月1日 08:00
2.4.10 2018年9月4日 19:13 1970年1月1日 08:00
2.4.12 2018年9月4日 19:13 1970年1月1日 08:00
No Dockerfiles