https://github.com/cmdjulian/httpd-docker
minimal multi-arch httpd docker image based on scratch 🐋
https://github.com/cmdjulian/httpd-docker
busybox docker docker-image httpd httpd-server tini
Last synced: 11 months ago
JSON representation
minimal multi-arch httpd docker image based on scratch 🐋
- Host: GitHub
- URL: https://github.com/cmdjulian/httpd-docker
- Owner: cmdjulian
- License: mit
- Created: 2022-10-22T21:28:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-20T02:59:28.000Z (11 months ago)
- Last Synced: 2025-02-20T03:31:35.217Z (11 months ago)
- Topics: busybox, docker, docker-image, httpd, httpd-server, tini
- Language: Dockerfile
- Homepage:
- Size: 340 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://hub.docker.com/r/cmdjulian/httpd/)
[](https://hub.docker.com/r/cmdjulian/httpd/)
[](https://hub.docker.com/r/cmdjulian/httpd/)
# minimal multi arch `httpd` docker image

Minimal `httpd` shell-less multi-arch docker image based on scratch.
The image is based on scratch and contains a static striped busybox binary just including `httpd` applet.
The image is published on docker hub under `cmdjulian/httpd:{version}`. It supports `arm/v6`, `arm/v7`, `arm64`, `i386`, `amd64`, `ppc64le` and `s390x`
architectures.
Per default, it runs as a non-root user `httpd(id=65532)`. Alternatively, you can also switch to `root(id=0)`.
The http process is started by [tini](https://github.com/krallin/tini), a small init wrapper. It takes responsibility in
forwarding the correct termination signals to the underlying `httpd` process.
The container does not contain a shell.
## Usage
Per default the config file for `httpd` is empty. It's located under `/etc/httpd/httpd.conf`.
Per default the server listens on port `8080`.
The served root folder is `/opt/httpd`.
Commandline arguments can be easily overridden via cli: `docker run --rm -p 3000:3000 docu:latest -v -p 3000`.
Here we keep verbose output and change the port to 3000. We don't need the config file, so we don't provide the cli
option either.
### Example
The following Dockerfile is an example for an angular app.
The first copy instruction moves the compiled angular ap into the content root.
The second one copies a custom config file to redirects every sub-path to the index.html.
```Dockerfile
# syntax = docker/dockerfile:1.5.2
FROM cmdjulian/httpd:v1.36.0
COPY --link ./dist/app/ /opt/httpd
COPY --link <