diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..d1a43c0 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,62 @@ +name: "Docker" + +on: + workflow_dispatch: + + push: + branches: ["master"] + + schedule: + - cron: "0 8 * * 1" + +permissions: + contents: read + +jobs: + test: + name: "Test" + runs-on: "ubuntu-latest" + + steps: + - name: "Checkout" + uses: actions/checkout@v4 + + - name: "Set up Docker Buildx" + uses: docker/setup-buildx-action@v3 + + - name: "Build image" + uses: docker/build-push-action@v6 + with: + context: "." + load: true + tags: "dockette/pound:latest" + + - name: "Test image" + run: "make test" + + build: + name: "Build" + needs: ["test"] + uses: dockette/.github/.github/workflows/docker.yml@master + secrets: inherit + with: + image: "dockette/pound" + tag: "latest" + context: "." + + docs: + name: "Docs" + runs-on: "ubuntu-latest" + needs: ["build"] + if: github.ref == 'refs/heads/master' + + steps: + - name: "Checkout" + uses: actions/checkout@v4 + + - name: "Update Docker Hub description" + uses: peter-evans/dockerhub-description@v5 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: "dockette/pound" diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..9b892aa --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,33 @@ +# AGENTS.md + +## Project + +Dockette Pound builds `dockette/pound`, a legacy Pound HTTP/HTTPS reverse proxy and load balancer image. The image listens on port `80` and uses `/etc/pound/config.cfg` copied from `pound/pound.cfg`. + +## Images + +- Default image: `dockette/pound:latest`. +- Build context: repository root `.` with `Dockerfile` and `pound/pound.cfg`. +- Base image: `dockette/debian:jessie`. +- The image installs the Debian Jessie `pound` package and starts `pound -f /etc/pound/config.cfg`. +- GitHub Actions builds `linux/amd64` for tests, then publishes `linux/amd64,linux/arm64` through the shared Dockette Docker workflow on `master` and the weekly schedule. + +## Commands + +- `make build` builds `${DOCKER_IMAGE}:${DOCKER_TAG}` from `.`. +- `make test` runs `pound -V` and validates `/etc/pound/config.cfg` with `pound -c -f` inside the built image. +- `make run` starts the image locally with `80:80` published. + +## Testing Notes + +- Prefer `make test` after Dockerfile or `pound/pound.cfg` changes. +- Use `make -n build test run` to dry-run command wiring without requiring Docker. +- The smoke test requires Docker and the image to be built first. + +## Guidelines + +- Keep changes focused on maintaining the legacy image; avoid broad modernization unless needed for build viability. +- Keep `Dockerfile`, `Makefile`, README, `pound/pound.cfg`, and `.github/workflows/docker.yml` aligned. +- Prefer `DOCKER_*` names for Docker-related Makefile variables. +- Place `.PHONY: ` directly above each Makefile target. +- Keep README badges and maintenance sections consistent with other Dockette image repos. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6dbb47d --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +DOCKER_IMAGE=dockette/pound +DOCKER_TAG?=latest + +.PHONY: build +build: + docker build -t ${DOCKER_IMAGE}:${DOCKER_TAG} . + +.PHONY: test +test: + docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} pound -V + docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} pound -c -f /etc/pound/config.cfg + +.PHONY: run +run: + docker run --rm -it -p 80:80 ${DOCKER_IMAGE}:${DOCKER_TAG} diff --git a/README.md b/README.md new file mode 100644 index 0000000..f02a990 --- /dev/null +++ b/README.md @@ -0,0 +1,55 @@ +

Dockette / Pound

+ +

+ GitHub Actions + Docker Hub pulls + GitHub Sponsors + Support/Discussions +

+ +

+ Legacy Docker image for Pound, an HTTP/HTTPS reverse proxy and load balancer. +

+ +----- + +## Usage + +```bash +docker run --rm -it \ + -p 80:80 \ + dockette/pound:latest +``` + +The image starts Pound in the foreground with `/etc/pound/config.cfg`. + +## Configuration + +The bundled configuration listens on port `80` and forwards requests with host headers matching `*.local.dev` to backend host `app` on port `80`. + +To use your own configuration: + +```bash +docker run --rm -it \ + -p 80:80 \ + -v "$(pwd)/pound.cfg:/etc/pound/config.cfg:ro" \ + dockette/pound:latest +``` + +## Legacy Constraints + +This image is intentionally kept close to the original legacy setup. It uses the historical `dockette/debian:jessie` base image and Debian Jessie `pound` package, so changes should stay focused on keeping the existing image buildable and testable. + +## Development + +Build a local image before running tests or starting the container: + +```bash +make build +make test +make run +``` + +## Maintenance + +See [how to contribute](https://github.com/dockette/.github/blob/master/CONTRIBUTING.md) to this package. Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Thank you for using this package.