Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <VERSION>, <ADMINER_VERSION> and <ADMINER_VERSION>-<VERSION>
- name: Tags
id: tags
env:
TAG: ${{ matrix.tag }}
VERSION: ${{ steps.version.outputs.VERSION }}
ADMINER_VERSION: ${{ steps.version.outputs.ADMINER_VERSION }}
run: |
{
echo "tags<<EOF"
echo "dockette/adminer:$TAG"
if [ "$TAG" = latest ]; then printf 'dockette/adminer:%s\n' "$VERSION" "$ADMINER_VERSION" "$ADMINER_VERSION-$VERSION"; fi
echo "EOF"
} >> "$GITHUB_OUTPUT"

- name: Login to DockerHub
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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' {} +

Expand All @@ -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
88 changes: 40 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,58 +19,47 @@

------

## 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)

## 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/) |
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -213,18 +193,30 @@ If the specified theme is not found, the container will list all available theme
</tr>
</table>

## 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:<variant>` | 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:<VERSION>`.
To release, run `make release`, commit and push to `master`.
```sh
make build # build all images
make build-<variant> # 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

Expand Down
3 changes: 2 additions & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
2026.10.23
VERSION=2026.10.23
ADMINER_VERSION=6.1.1
Loading