diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6b2861a..3829ae7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,12 +12,13 @@ permissions: jobs: build: name: "Build" + if: github.event.workflow_run.head_branch == 'master' && github.event.workflow_run.conclusion == 'success' uses: dockette/.github/.github/workflows/docker.yml@master secrets: inherit with: - image: "dockette/vagrant" - tag: "${{ matrix.item }}" - context: "${{ matrix.item }}" + image: "dockette/vagrant" + tag: "${{ matrix.item }}" + context: "${{ matrix.item }}" strategy: matrix: include: @@ -29,3 +30,20 @@ jobs: - item: "debian-11-systemd" fail-fast: false + + docs: + name: "Docs" + runs-on: "ubuntu-latest" + needs: ["build"] + if: github.event.workflow_run.head_branch == 'master' + + steps: + - name: "Checkout" + uses: actions/checkout@v6 + + - name: "Update Docker Hub description" + uses: peter-evans/dockerhub-description@v5 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: "dockette/vagrant" diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..56759aa --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,36 @@ +# AGENTS.md + +## Project + +Dockette Vagrant publishes Docker images that behave like Vagrant boxes, including SSH-ready Debian images and systemd-enabled variants for Vagrant's Docker provider or direct Docker use. + +## Images + +- Docker image: `dockette/vagrant`. +- Default Makefile tag: `debian-13-systemd`. +- Makefile build contexts: `debian-13`, `debian-13-systemd`, `debian-12`, `debian-12-systemd`, `debian-11`, `debian-11-systemd`, `debian-10`, `debian-10-systemd`. +- Workflow publish matrix currently includes Debian 13, 12, and 11 contexts only. +- Plain variants run `sshd -D`; `*-systemd` variants run `/lib/systemd/systemd` and declare `/sys/fs/cgroup` as a volume. + +## Commands + +- `make build` builds all Makefile-listed image contexts with Docker Buildx. +- `make test` runs `vagrant validate` against `Vagrantfile`. +- `make run` starts `${DOCKER_IMAGE}:${DOCKER_TAG}` with the privileges needed for systemd. +- `make run-debian-12-systemd` and `make run-debian-13-systemd` start explicit systemd images. +- Override `DOCKER_TAG`, `DOCKER_IMAGE`, or `DOCKER_PLATFORMS` when checking a specific image or platform. + +## Runtime Notes + +- There are no compose files in this repository. +- Systemd images require `--privileged`, `--cgroupns=host`, and `-v /sys/fs/cgroup:/sys/fs/cgroup:rw`. +- The default Makefile platform is `linux/arm64`; keep that in mind when building on amd64 hosts. +- `Vagrantfile` uses the Docker provider by default and tests SSH/provisioning behavior through Vagrant and Ansible in CI. + +## Guidelines + +- Keep Dockerfiles, README image lists, Makefile targets, `Vagrantfile`, and workflow matrices aligned when changing supported Debian versions. +- Prefer `DOCKER_*` names for Docker-related Makefile variables. +- Place `.PHONY: ` directly above each Makefile target. +- Preserve the `vagrant` user, passwordless sudo, authorized key setup, SSH port exposure, and cleanup behavior unless intentionally changing box semantics. +- 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 diff --git a/Makefile b/Makefile index d4e96ed..8191353 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,25 @@ DOCKER_IMAGE=dockette/vagrant -DOCKER_PLATFORM?=linux/arm64 +DOCKER_TAG?=debian-13-systemd +DOCKER_PLATFORMS?=linux/arm64 + + +.PHONY: build +build: build-all + +.PHONY: test +test: + vagrant validate + +.PHONY: run +run: + docker run \ + -it \ + --rm \ + --platform ${DOCKER_PLATFORMS} \ + --privileged \ + --cgroupns=host \ + -v /sys/fs/cgroup:/sys/fs/cgroup:rw \ + ${DOCKER_IMAGE}:${DOCKER_TAG} .PHONY: build-all build-all: build-debian-13 build-debian-13-systemd build-debian-12 build-debian-12-systemd build-debian-11 build-debian-11-systemd build-debian-10 build-debian-10-systemd @@ -29,29 +49,32 @@ build-debian-10: _docker-build-debian-10 build-debian-10-systemd: _docker-build-debian-10-systemd _docker-build-%: VERSION=$* +.PHONY: _docker-build-% _docker-build-%: docker buildx \ build \ --pull \ - --platform ${DOCKER_PLATFORM} \ + --platform ${DOCKER_PLATFORMS} \ -t ${DOCKER_IMAGE}:${VERSION} \ ./${VERSION} +.PHONY: run-debian-12-systemd run-debian-12-systemd: docker run \ -it \ --rm \ - --platform ${DOCKER_PLATFORM} \ + --platform ${DOCKER_PLATFORMS} \ --privileged \ --cgroupns=host \ -v /sys/fs/cgroup:/sys/fs/cgroup:rw \ ${DOCKER_IMAGE}:debian-12-systemd +.PHONY: run-debian-13-systemd run-debian-13-systemd: docker run \ -it \ --rm \ - --platform ${DOCKER_PLATFORM} \ + --platform ${DOCKER_PLATFORMS} \ --privileged \ --cgroupns=host \ -v /sys/fs/cgroup:/sys/fs/cgroup:rw \ diff --git a/README.md b/README.md index 6a6305d..219bb43 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,14 @@

Dockette / Vagrant

- Ready-to-use Docker images for Vagrant. + GitHub Actions + Docker Hub pulls + GitHub Sponsors + Support/Discussions

-🕹 f3l1x.io | 💻 f3l1x | 🐦 @xf3l1x -

- -

- - - + Ready-to-use Docker images for Vagrant.

----- @@ -53,7 +50,7 @@ docker run \ dockette/vagrant:debian-13-systemd ``` -### Images +### Published Images - `dockette/vagrant:debian-13` - `dockette/vagrant:debian-13-systemd` @@ -61,19 +58,27 @@ docker run \ - `dockette/vagrant:debian-12-systemd` - `dockette/vagrant:debian-11` - `dockette/vagrant:debian-11-systemd` -- `dockette/vagrant:debian-10` -- `dockette/vagrant:debian-10-systemd` + +The Docker workflow publishes Debian 13, 12, and 11 tags. Debian 10 Dockerfiles remain available for local builds, but Debian 10 tags are not part of the current publish matrix. ## Development -See [how to contribute](https://contributte.org/contributing.html) to this package. +```sh +make build +make test +make run +``` -This package is currently maintaining by these authors. +Makefile defaults: - - - +- `DOCKER_IMAGE=dockette/vagrant` +- `DOCKER_TAG=debian-13-systemd` +- `DOCKER_PLATFORMS=linux/arm64` ------ +`make build` builds every Makefile-listed context, including the local Debian 10 contexts. `make test` runs `vagrant validate` only. Full CI validation also starts the Docker provider with `vagrant up --provider=docker` and runs the Ansible checks in `.tests/`. + +Override `DOCKER_TAG` to run a different image tag and `DOCKER_PLATFORMS` to target another platform, for example `DOCKER_PLATFORMS=linux/amd64 make build`. The default `linux/arm64` platform may use emulation or fail unexpectedly on amd64 hosts without compatible Buildx/QEMU support. + +## Maintenance -Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Also thank you for using this package. +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.