From 5fe984487322fc8c0cfd21323f009c50585ebdac Mon Sep 17 00:00:00 2001 From: Oh My Felix Date: Fri, 29 May 2026 07:58:47 +0000 Subject: [PATCH 1/6] chore: add CI rollout baseline --- .github/workflows/docker.yml | 117 +++++++++++++++++++++-------------- Makefile | 48 ++++++++++++++ README.md | 22 ++++--- 3 files changed, 131 insertions(+), 56 deletions(-) create mode 100644 Makefile diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e041b54..b91d604 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,66 +1,91 @@ -name: Docker +name: "Docker" on: + workflow_dispatch: + push: - branches: [master] + branches: ["master"] permissions: contents: read jobs: - docker: - runs-on: ubuntu-latest + test: + name: "Test (${{ matrix.version }})" + runs-on: "ubuntu-latest" strategy: matrix: - include: - #- version: "3.1" - #- version: "3.2" - #- version: "3.3" - #- version: "3.4" - #- version: "3.5" - #- version: "3.6" - - version: "3.7" - - version: "3.8" - - version: "3.9" - - version: "3.10" - - version: "3.11" - - version: "3.12" - - version: "3.13" - - version: "3.14" - - version: "3.15" - - version: "3.16" - - version: "3.17" - - version: "3.18" - - version: "3.19" - - version: "3.20" - - version: "3.21" - - version: "3.22" - - version: "edge" - + version: ["3.22", "3.21", "edge"] fail-fast: false - name: Docker (dockette/alpine:${{ matrix.version }}) - steps: - - name: Checkout + - name: "Checkout" uses: actions/checkout@v4 - - name: Login to DockerHub - uses: docker/login-action@v3 + - name: "Set up Docker Buildx" + uses: docker/setup-buildx-action@v3 + + - name: "Build image" + uses: docker/build-push-action@v6 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + context: "${{ matrix.version }}" + load: true + tags: "dockette/alpine:${{ matrix.version }}" - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + - name: "Test image" + run: "make test VERSION=${{ matrix.version }}" - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + build: + name: "Build (${{ matrix.version }})" + needs: ["test"] + strategy: + matrix: + version: + #- "3.1" + #- "3.2" + #- "3.3" + #- "3.4" + #- "3.5" + #- "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - "3.14" + - "3.15" + - "3.16" + - "3.17" + - "3.18" + - "3.19" + - "3.20" + - "3.21" + - "3.22" + - "edge" - - name: Build and push - uses: docker/build-push-action@v6 + fail-fast: false + uses: dockette/.github/.github/workflows/docker.yml@master + secrets: inherit + with: + image: "dockette/alpine" + tag: "${{ matrix.version }}" + context: "${{ matrix.version }}" + + 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: - context: ./${{ matrix.version }} - push: true - tags: dockette/alpine:${{ matrix.version }} - platforms: linux/amd64,linux/arm64 + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: "dockette/alpine" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8e20bb3 --- /dev/null +++ b/Makefile @@ -0,0 +1,48 @@ +IMAGE ?= dockette/alpine +VERSION ?= 3.22 +TAG ?= $(VERSION) + +MAINTAINED_VERSIONS := 3.22 3.21 edge + +.PHONY: build test run $(addprefix build-,$(MAINTAINED_VERSIONS)) $(addprefix test-,$(MAINTAINED_VERSIONS)) $(addprefix run-,$(MAINTAINED_VERSIONS)) + +build: + docker build -t $(IMAGE):$(TAG) $(VERSION) + +test: + docker run --rm $(IMAGE):$(TAG) /bin/sh -c 'set -eu; \ + if [ "$(VERSION)" != "edge" ]; then grep -Eq "^$(VERSION)(\\.|$$)" /etc/alpine-release; else test -s /etc/alpine-release; fi; \ + test "$$(id -u dfx)" = "1000"; \ + test "$${USER_UID}" = "1000"; \ + test "$${USER_NAME}" = "dfx"; \ + test "$${USER_HOME}" = "/home/dfx"' + +run: + docker run --rm -it $(IMAGE):$(TAG) + +build-3.22: + $(MAKE) build VERSION=3.22 + +test-3.22: + $(MAKE) test VERSION=3.22 + +run-3.22: + $(MAKE) run VERSION=3.22 + +build-3.21: + $(MAKE) build VERSION=3.21 + +test-3.21: + $(MAKE) test VERSION=3.21 + +run-3.21: + $(MAKE) run VERSION=3.21 + +build-edge: + $(MAKE) build VERSION=edge + +test-edge: + $(MAKE) test VERSION=edge + +run-edge: + $(MAKE) run VERSION=edge diff --git a/README.md b/README.md index 0a4f035..20513c6 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ -# Alpine +

Dockette / Alpine

-Base docker image based on Alpine Linux. +

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

------ - -[![Docker Stars](https://img.shields.io/docker/stars/dockette/alpine.svg?style=flat)](https://hub.docker.com/r/dockette/alpine/) -[![Docker Pulls](https://img.shields.io/docker/pulls/dockette/alpine.svg?style=flat)](https://hub.docker.com/r/dockette/alpine/) +

+ Base docker image based on Alpine Linux. +

-## Discussion / Help - -[![Join the chat](https://img.shields.io/gitter/room/dockette/dockette.svg?style=flat-square)](https://gitter.im/contributte/contributte?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +----- ## Image @@ -25,7 +27,7 @@ Base docker image based on Alpine Linux. |--------|-------------------------|------------| | edge | `dockette/alpine:edge` | [edge](https://hub.docker.com/r/dockette/alpine) | | v3.22 | `dockette/alpine:v3.22` | [v3.22](https://hub.docker.com/r/dockette/alpine) | -| v3.21 | `dockette/alpine:v3.21` | [v3.20](https://hub.docker.com/r/dockette/alpine) | +| v3.21 | `dockette/alpine:v3.21` | [v3.21](https://hub.docker.com/r/dockette/alpine) | | v3.20 | `dockette/alpine:v3.20` | [v3.20](https://hub.docker.com/r/dockette/alpine) | | v3.19 | `dockette/alpine:v3.19` | [v3.19](https://hub.docker.com/r/dockette/alpine) | | v3.18 | `dockette/alpine:v3.18` | [v3.18](https://hub.docker.com/r/dockette/alpine) | From a7ce7bf97de00305346df98a0d2449954b46e11b Mon Sep 17 00:00:00 2001 From: Oh My Felix Date: Wed, 3 Jun 2026 14:05:57 +0000 Subject: [PATCH 2/6] chore: align Makefile Docker variables --- Makefile | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 8e20bb3..6e63bb0 100644 --- a/Makefile +++ b/Makefile @@ -1,48 +1,48 @@ -IMAGE ?= dockette/alpine -VERSION ?= 3.22 -TAG ?= $(VERSION) +DOCKER_IMAGE?=dockette/alpine +DOCKER_VERSION?=3.22 +DOCKER_TAG?=${DOCKER_VERSION} MAINTAINED_VERSIONS := 3.22 3.21 edge .PHONY: build test run $(addprefix build-,$(MAINTAINED_VERSIONS)) $(addprefix test-,$(MAINTAINED_VERSIONS)) $(addprefix run-,$(MAINTAINED_VERSIONS)) build: - docker build -t $(IMAGE):$(TAG) $(VERSION) + docker build -t ${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_VERSION} test: - docker run --rm $(IMAGE):$(TAG) /bin/sh -c 'set -eu; \ - if [ "$(VERSION)" != "edge" ]; then grep -Eq "^$(VERSION)(\\.|$$)" /etc/alpine-release; else test -s /etc/alpine-release; fi; \ + docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} /bin/sh -c 'set -eu; \ + if [ "${DOCKER_VERSION}" != "edge" ]; then grep -Eq "^${DOCKER_VERSION}(\.|$$)" /etc/alpine-release; else test -s /etc/alpine-release; fi; \ test "$$(id -u dfx)" = "1000"; \ test "$${USER_UID}" = "1000"; \ test "$${USER_NAME}" = "dfx"; \ test "$${USER_HOME}" = "/home/dfx"' run: - docker run --rm -it $(IMAGE):$(TAG) + docker run --rm -it ${DOCKER_IMAGE}:${DOCKER_TAG} build-3.22: - $(MAKE) build VERSION=3.22 + $(MAKE) build DOCKER_VERSION=3.22 test-3.22: - $(MAKE) test VERSION=3.22 + $(MAKE) test DOCKER_VERSION=3.22 run-3.22: - $(MAKE) run VERSION=3.22 + $(MAKE) run DOCKER_VERSION=3.22 build-3.21: - $(MAKE) build VERSION=3.21 + $(MAKE) build DOCKER_VERSION=3.21 test-3.21: - $(MAKE) test VERSION=3.21 + $(MAKE) test DOCKER_VERSION=3.21 run-3.21: - $(MAKE) run VERSION=3.21 + $(MAKE) run DOCKER_VERSION=3.21 build-edge: - $(MAKE) build VERSION=edge + $(MAKE) build DOCKER_VERSION=edge test-edge: - $(MAKE) test VERSION=edge + $(MAKE) test DOCKER_VERSION=edge run-edge: - $(MAKE) run VERSION=edge + $(MAKE) run DOCKER_VERSION=edge From 0457f2e059fea1800ca438a5195a6a83700b4982 Mon Sep 17 00:00:00 2001 From: Oh My Felix Date: Wed, 3 Jun 2026 14:19:32 +0000 Subject: [PATCH 3/6] chore: place PHONY declarations above targets --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6e63bb0..fea6c4b 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,12 @@ DOCKER_TAG?=${DOCKER_VERSION} MAINTAINED_VERSIONS := 3.22 3.21 edge -.PHONY: build test run $(addprefix build-,$(MAINTAINED_VERSIONS)) $(addprefix test-,$(MAINTAINED_VERSIONS)) $(addprefix run-,$(MAINTAINED_VERSIONS)) +.PHONY: build build: docker build -t ${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_VERSION} +.PHONY: test test: docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} /bin/sh -c 'set -eu; \ if [ "${DOCKER_VERSION}" != "edge" ]; then grep -Eq "^${DOCKER_VERSION}(\.|$$)" /etc/alpine-release; else test -s /etc/alpine-release; fi; \ @@ -17,32 +18,42 @@ test: test "$${USER_NAME}" = "dfx"; \ test "$${USER_HOME}" = "/home/dfx"' +.PHONY: run run: docker run --rm -it ${DOCKER_IMAGE}:${DOCKER_TAG} +.PHONY: build-3.22 build-3.22: $(MAKE) build DOCKER_VERSION=3.22 +.PHONY: test-3.22 test-3.22: $(MAKE) test DOCKER_VERSION=3.22 +.PHONY: run-3.22 run-3.22: $(MAKE) run DOCKER_VERSION=3.22 +.PHONY: build-3.21 build-3.21: $(MAKE) build DOCKER_VERSION=3.21 +.PHONY: test-3.21 test-3.21: $(MAKE) test DOCKER_VERSION=3.21 +.PHONY: run-3.21 run-3.21: $(MAKE) run DOCKER_VERSION=3.21 +.PHONY: build-edge build-edge: $(MAKE) build DOCKER_VERSION=edge +.PHONY: test-edge test-edge: $(MAKE) test DOCKER_VERSION=edge +.PHONY: run-edge run-edge: $(MAKE) run DOCKER_VERSION=edge From 975e0ed90d451bf72200a01a06e111222abafded Mon Sep 17 00:00:00 2001 From: Oh My Felix Date: Wed, 3 Jun 2026 14:23:10 +0000 Subject: [PATCH 4/6] chore: add AI agent instructions --- AGENTS.md | 19 +++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 20 insertions(+) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e84c2d7 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,19 @@ +# AGENTS.md + +## Project + +Docker image repository in the Dockette organization. + +## Commands + +- `make build` builds the default Docker image. +- `make test` runs the repository smoke tests. +- `make run` starts the image for local use. + +## Guidelines + +- Keep Dockerfiles, `Makefile`, README, and GitHub Actions workflow changes 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. +- Do not introduce unrelated formatting or structural changes. 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 From f1b5e76baf83ee57f5a6fd608e5bdebe8fc8d0a4 Mon Sep 17 00:00:00 2001 From: Oh My Felix Date: Wed, 3 Jun 2026 14:29:13 +0000 Subject: [PATCH 5/6] chore: specialize AI agent instructions --- AGENTS.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e84c2d7..c3b40d6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,18 +2,34 @@ ## Project -Docker image repository in the Dockette organization. +Dockette Alpine builds `dockette/alpine`, a family of Alpine Linux base images with a predefined `dfx` user. Each image exposes `USER_UID=1000`, `USER_NAME=dfx`, and `USER_HOME=/home/dfx`. + +## Images + +- Default image: `dockette/alpine:3.22` from build context `3.22/`. +- Maintained test targets in `Makefile`: `3.22`, `3.21`, and `edge`. +- Published tags in the workflow include `3.7` through `3.22` plus `edge`; older `3.1` through `3.6` Dockerfiles remain in the repo but are commented out in publishing. +- Each version directory is its own Docker build context and contains a matching `Dockerfile` based on `alpine:` or `alpine:edge`. +- GitHub Actions builds and tests the maintained matrix, then publishes each configured version through the shared Dockette Docker workflow on `master`. ## Commands -- `make build` builds the default Docker image. -- `make test` runs the repository smoke tests. -- `make run` starts the image for local use. +- `make build` builds `${DOCKER_IMAGE}:${DOCKER_TAG}` from `${DOCKER_VERSION}`. +- `make test` runs the image and checks `/etc/alpine-release`, the `dfx` user, and exported user constants. +- `make run` opens an interactive shell in the current tag. +- `make build-3.22`, `make test-3.22`, and `make run-3.22` target Alpine 3.22 explicitly; equivalent targets exist for `3.21` and `edge`. + +## Testing Notes + +- Run `make test DOCKER_VERSION= DOCKER_TAG=` after changing a version Dockerfile. +- Use `make -n build test run` to dry-run command wiring without requiring Docker. +- The workflow currently passes `VERSION=...` to `make test`; this Makefile uses `DOCKER_VERSION`, so keep any workflow edits aligned with Makefile variable names. ## Guidelines -- Keep Dockerfiles, `Makefile`, README, and GitHub Actions workflow changes aligned. +- Keep version directories, `Makefile` targets, README image table, and `.github/workflows/docker.yml` matrices aligned when adding or removing Alpine versions. - 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. +- Preserve the `dfx` user contract unless a coordinated breaking change is requested. - Do not introduce unrelated formatting or structural changes. From c3e029df4fcdbb805c958f13b34170d0b52ff77c Mon Sep 17 00:00:00 2001 From: Oh My Felix Date: Fri, 5 Jun 2026 11:35:32 +0000 Subject: [PATCH 6/6] docs: clarify Alpine image tags Co-authored-by: Felix --- README.md | 57 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 20513c6..110133f 100644 --- a/README.md +++ b/README.md @@ -23,31 +23,38 @@ ## Usage -| Alpine | Image | Docker Hub | -|--------|-------------------------|------------| -| edge | `dockette/alpine:edge` | [edge](https://hub.docker.com/r/dockette/alpine) | -| v3.22 | `dockette/alpine:v3.22` | [v3.22](https://hub.docker.com/r/dockette/alpine) | -| v3.21 | `dockette/alpine:v3.21` | [v3.21](https://hub.docker.com/r/dockette/alpine) | -| v3.20 | `dockette/alpine:v3.20` | [v3.20](https://hub.docker.com/r/dockette/alpine) | -| v3.19 | `dockette/alpine:v3.19` | [v3.19](https://hub.docker.com/r/dockette/alpine) | -| v3.18 | `dockette/alpine:v3.18` | [v3.18](https://hub.docker.com/r/dockette/alpine) | -| v3.17 | `dockette/alpine:v3.17` | [v3.17](https://hub.docker.com/r/dockette/alpine) | -| v3.16 | `dockette/alpine:v3.16` | [v3.16](https://hub.docker.com/r/dockette/alpine) | -| v3.15 | `dockette/alpine:v3.15` | [v3.15](https://hub.docker.com/r/dockette/alpine) | -| v3.14 | `dockette/alpine:v3.14` | [v3.14](https://hub.docker.com/r/dockette/alpine) | -| v3.13 | `dockette/alpine:v3.13` | [v3.13](https://hub.docker.com/r/dockette/alpine) | -| v3.12 | `dockette/alpine:v3.12` | [v3.12](https://hub.docker.com/r/dockette/alpine) | -| v3.11 | `dockette/alpine:v3.11` | [v3.11](https://hub.docker.com/r/dockette/alpine) | -| v3.10 | `dockette/alpine:v3.10` | [v3.10](https://hub.docker.com/r/dockette/alpine) | -| v3.9 | `dockette/alpine:v3.9` | [v3.9](https://hub.docker.com/r/dockette/alpine) | -| v3.8 | `dockette/alpine:v3.8` | [v3.8](https://hub.docker.com/r/dockette/alpine) | -| v3.7 | `dockette/alpine:v3.7` | [v3.7](https://hub.docker.com/r/dockette/alpine) | -| v3.6 | `dockette/alpine:v3.6` | [v3.6](https://hub.docker.com/r/dockette/alpine) | -| v3.5 | `dockette/alpine:v3.5` | [v3.5](https://hub.docker.com/r/dockette/alpine) | -| v3.4 | `dockette/alpine:v3.4` | [v3.4](https://hub.docker.com/r/dockette/alpine) | -| v3.3 | `dockette/alpine:v3.3` | [v3.3](https://hub.docker.com/r/dockette/alpine) | -| v3.2 | `dockette/alpine:v3.2` | [v3.2](https://hub.docker.com/r/dockette/alpine) | -| v3.1 | `dockette/alpine:v3.1` | [v3.1](https://hub.docker.com/r/dockette/alpine) | +The `edge` tag tracks Alpine edge. It is rolling and unstable, so prefer a pinned `3.x` tag for reproducible builds. + +### Maintained Images + +| Alpine | Image | Docker Hub | +|--------|------------------------|------------| +| edge | `dockette/alpine:edge` | [edge](https://hub.docker.com/r/dockette/alpine/tags?name=edge) | +| 3.22 | `dockette/alpine:3.22` | [3.22](https://hub.docker.com/r/dockette/alpine/tags?name=3.22) | +| 3.21 | `dockette/alpine:3.21` | [3.21](https://hub.docker.com/r/dockette/alpine/tags?name=3.21) | + +### Legacy Images + +These tags are published for compatibility, but are not part of the maintained test matrix. + +| Alpine | Image | Docker Hub | +|--------|------------------------|------------| +| 3.20 | `dockette/alpine:3.20` | [3.20](https://hub.docker.com/r/dockette/alpine/tags?name=3.20) | +| 3.19 | `dockette/alpine:3.19` | [3.19](https://hub.docker.com/r/dockette/alpine/tags?name=3.19) | +| 3.18 | `dockette/alpine:3.18` | [3.18](https://hub.docker.com/r/dockette/alpine/tags?name=3.18) | +| 3.17 | `dockette/alpine:3.17` | [3.17](https://hub.docker.com/r/dockette/alpine/tags?name=3.17) | +| 3.16 | `dockette/alpine:3.16` | [3.16](https://hub.docker.com/r/dockette/alpine/tags?name=3.16) | +| 3.15 | `dockette/alpine:3.15` | [3.15](https://hub.docker.com/r/dockette/alpine/tags?name=3.15) | +| 3.14 | `dockette/alpine:3.14` | [3.14](https://hub.docker.com/r/dockette/alpine/tags?name=3.14) | +| 3.13 | `dockette/alpine:3.13` | [3.13](https://hub.docker.com/r/dockette/alpine/tags?name=3.13) | +| 3.12 | `dockette/alpine:3.12` | [3.12](https://hub.docker.com/r/dockette/alpine/tags?name=3.12) | +| 3.11 | `dockette/alpine:3.11` | [3.11](https://hub.docker.com/r/dockette/alpine/tags?name=3.11) | +| 3.10 | `dockette/alpine:3.10` | [3.10](https://hub.docker.com/r/dockette/alpine/tags?name=3.10) | +| 3.9 | `dockette/alpine:3.9` | [3.9](https://hub.docker.com/r/dockette/alpine/tags?name=3.9) | +| 3.8 | `dockette/alpine:3.8` | [3.8](https://hub.docker.com/r/dockette/alpine/tags?name=3.8) | +| 3.7 | `dockette/alpine:3.7` | [3.7](https://hub.docker.com/r/dockette/alpine/tags?name=3.7) | + +Alpine `3.1` through `3.6` directories remain in this repository, but their tags are not published by the current workflow. ## Maintenance