diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bb49204..60fb0de 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -186,7 +186,22 @@ jobs: - name: Read VERSION id: version - run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" + run: cat VERSION >> "$GITHUB_OUTPUT" + + # latest is also pushed as , and - + - name: Tags + id: tags + env: + TAG: ${{ matrix.tag }} + VERSION: ${{ steps.version.outputs.VERSION }} + ADMINER_VERSION: ${{ steps.version.outputs.ADMINER_VERSION }} + run: | + { + echo "tags<> "$GITHUB_OUTPUT" - name: Login to DockerHub if: github.event_name == 'push' && github.ref == 'refs/heads/master' @@ -201,9 +216,7 @@ jobs: context: ${{ matrix.context }} file: ${{ matrix.dockerfile }} push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - tags: | - dockette/adminer:${{ matrix.tag }} - ${{ matrix.tag == 'latest' && format('dockette/adminer:{0}', steps.version.outputs.version) || '' }} + tags: ${{ steps.tags.outputs.tags }} platforms: ${{ matrix.platforms }} cache-from: type=gha cache-to: type=gha,mode=max @@ -222,7 +235,9 @@ jobs: - name: Create release env: GH_TOKEN: ${{ github.token }} - run: gh release view "$(cat VERSION)" || gh release create "$(cat VERSION)" --generate-notes + run: | + . ./VERSION + gh release view "$VERSION" || gh release create "$VERSION" --generate-notes docs: name: Docs diff --git a/Makefile b/Makefile index 86e5668..45bd2bd 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ DOCKER_IMAGE=dockette/adminer DOCKER_PLATFORMS?=linux/amd64 DOCKER_RUN_PORT?=8000 DOCKER_RUN_TAG?=full -VERSION:=$(shell cat VERSION) +include VERSION build: build-all @@ -61,6 +61,7 @@ run-oracle-12: _docker-run-oracle-12 run-oracle-19: _docker-run-oracle-19 update-versions: + @sed -i.bak "s/^ADMINER_VERSION=.*/ADMINER_VERSION=${ADMINER_VERSION}/" VERSION && rm VERSION.bak find . -type f -name Dockerfile -exec sed -i '' 's/ENV ADMINER_VERSION=.*/ENV ADMINER_VERSION=${ADMINER_VERSION}/g' {} + find . -type f -name Dockerfile -exec sed -i '' 's/ENV ADMINER_EDITOR_VERSION=.*/ENV ADMINER_EDITOR_VERSION=${ADMINER_VERSION}/g' {} + @@ -70,6 +71,5 @@ version: .PHONY: release release: - @date -u +%Y.%m.%d > VERSION - @echo "VERSION: ${VERSION} -> $$(cat VERSION)" - @echo "next: git commit -am \"Release: $$(cat VERSION)\" && git push" + @sed -i.bak "s/^VERSION=.*/VERSION=$$(date -u +%Y.%m.%d)/" VERSION && rm VERSION.bak + @cat VERSION diff --git a/README.md b/README.md index 3cf7834..d428c36 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,13 @@ ------ -## Prologue +[Adminer](https://www.adminer.org) is a database management tool in a single PHP file. These are the tiniest boxed +Dockerfiles for it: one image per database family (MySQL, PostgreSQL, SQLite, Mongo, Oracle, MSSQL). -There are few variants of this adminer image based: - -- full (mysql, pgsql, sqlite, mongo) -- mysql (only) -- pgsql (only) -- mongo (only) -- mssql (only) -- oracle-11 / oracle-12 / oracle-19 (only) -- dg (custom) - -**Features** +## Features +- Variants: full (mysql, pgsql, sqlite, mongo), mysql, pgsql, mongo, mssql, oracle-11 / oracle-12 / oracle-19 (each + only), dg (custom) - Alpine Linux (full, editor, dg, mongo, mysql, postgres) - Debian Bookworm (mssql, oracle-11, oracle-12, oracle-19) - PHP 8 (concurrency via PHP cli workers) @@ -40,37 +33,33 @@ There are few variants of this adminer image based: ## Usage ```sh -docker run \ - --rm - -p 8000:80 - dockette/adminer:dg +docker run --rm -p 8000:80 dockette/adminer:dg + +# Override the defaults with environment variables +docker run --rm -p 8000:8080 -e MEMORY=512M -e UPLOAD=4096M -e PORT=8080 dockette/adminer:dg + +# Apply a theme +docker run --rm -p 8000:80 -e ADMINER_THEME=dracula dockette/adminer:full ``` -By default container is running with these settings, you can override it using environment variables. +## Configuration + +The container runs with these settings by default. Override them with environment variables. - `MEMORY=256M` (memory_limit) - `UPLOAD=2048M` (upload_max_filesize, post_max_size) - `PORT=80` (PHP server listening port) - `WORKERS=4` (concurrency) +- `ADMINER_THEME` (theme name, see [Themes](#themes); an unknown name lists all available themes) -```sh -docker run \ - --rm - -p 8000:8080 - -e MEMORY=512M - -e UPLOAD=4096M - -e PORT=8080 - dockette/adminer:dg -``` - -## Versions +## Images | Image | Technologies | Size | Docker Hub | |------------------------------|---------------------------------------|------|---------------------------------------------------------| | dockette/adminer | MySQL / PostgreSQL / MongoDB / Sqlite | 12mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | dockette/adminer:full | MySQL / PostgreSQL / MongoDB / Sqlite | 12mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | dockette/adminer:mysql | MySQL | 9mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | -| dockette/adminer:pgsql | PostgreSQL | 8mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | +| dockette/adminer:postgres | PostgreSQL | 8mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | dockette/adminer:mongo | MongoDB | 9mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | dockette/adminer:mssql | MS SQL Server | - | [link](https://hub.docker.com/r/dockette/adminer/tags/) | | dockette/adminer:dg | MySQL / PostgreSQL / MongoDB / Sqlite | 16mb | [link](https://hub.docker.com/r/dockette/adminer/tags/) | @@ -154,17 +143,8 @@ Servers without credentials in the DSN (e.g. `server://devhost:3306`) appear in ## Themes -You can apply a theme by setting the `ADMINER_THEME` environment variable: - -```sh -docker run \ - --rm - -p 8000:80 - -e ADMINER_THEME=dracula - dockette/adminer:full -``` - -If the specified theme is not found, the container will list all available themes. +Set the `ADMINER_THEME` environment variable to apply a theme, see [Usage](#usage). If the specified theme +is not found, the container lists all available themes. ### Available Themes @@ -213,18 +193,30 @@ If the specified theme is not found, the container will list all available theme -## Upgrade +## Versions -**Upgrade Adminer and Adminer Editor versions to X.Y.Z** +| Version | Release | +|---------|---------| +| `dockette/adminer:6.1.1-YYYY.MM.DD` | release `YYYY.MM.DD` | +| `dockette/adminer:6.1.1` | latest release | +| `dockette/adminer:YYYY.MM.DD` | release `YYYY.MM.DD` | +| `dockette/adminer:latest` | latest build of `master` (same as `full`) | +| `dockette/adminer:` | latest build of `master` for the variant, see [Images](#images) | -```bash -ADMINER_VERSION=4.8.1 make update-versions -``` +All versions build on Adminer `6.1.1`, pinned in `VERSION` and in the Dockerfiles (`ADMINER_VERSION`). Releases are +listed on [GitHub](https://github.com/dockette/adminer/releases). -## Release version +## Development -The release version is the date in [`VERSION`](VERSION). CI pushes `latest` also as `dockette/adminer:`. -To release, run `make release`, commit and push to `master`. +```sh +make build # build all images +make build- # build one image, e.g. build-mysql +make test # run php --version in all images +make run # run the full image on port 8000 +make update-versions ADMINER_VERSION=X.Y.Z # set the Adminer and Adminer Editor version +make version # print VERSION +make release # set today's date in VERSION +``` ## Maintenance diff --git a/VERSION b/VERSION index 7387f12..6779db0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1,2 @@ -2026.10.23 +VERSION=2026.10.23 +ADMINER_VERSION=6.1.1