This file provides guidance to AI coding agents when working with code in this repository.
Packaging for the adminneoorg/adminneo Docker image (Docker Hub). It does not contain AdminNeo itself: the
Dockerfile clones https://github.com/adminneo-org/adminneo at build time and compiles it into a single index.php.
The only code here is the Dockerfile, three shell scripts in bin/, and a few files in src/ copied into the image.
There are no tests and no linters.
The README.md doubles as the Docker Hub description. When a config variable is added or changed, update both
src/adminneo-config.php and the table in README.md.
Images are built multi-platform (linux/amd64 + linux/arm64) with docker buildx, so a full build is slow.
sh bin/build.sh -t devel # build from AdminNeo's main branch (cache-busted with a timestamp)
sh bin/build.sh -t latest # build the highest stable v*.*.* tag of AdminNeo
sh bin/build.sh -t 5.0.0 # build AdminNeo tag v5.0.0
sh bin/run-devel.sh # build devel, then (re)start container `adminneo-devel` on port 8080
sh bin/build-release.sh # build both the versioned and the `latest` image for the newest stable tagbuild.sh maps the image tag to the AdminNeo git ref (GIT_TAG build arg): devel → main, latest → newest
v*.*.* tag without a pre-release suffix (resolved via git ls-remote), anything else → v<tag>. The latest
resolution uses GNU head --lines=1. Builds always run with --pull so a stale locally cached base image is never
used.
- Base image
trafex/php-nginx: nginx + php-fpm on Alpine, listens on 8080, runs asnobody, webroot/var/www/html. The Dockerfile switches to root only to install packages, then back tonobodybefore cloning and compiling AdminNeo. - PHP extensions: Alpine
php85-*packages for pgsql, sqlite3, mongodb, etc. The PHP version is pinned by the package prefix (php85,pecl85), so a PHP bump means changing every such name. The extensions depend onphp85-commonwithout a version, soapk upgrademust run beforeapk add. Otherwise a base image older than the Alpine repository gets new extensions on an old PHP binary and they fail with "symbol not found". A laterRUNstep fails the build whenphp -mprints a warning or a required extension is missing; keep its extension list in sync with the installed packages. - MS SQL: the Microsoft ODBC driver (
msodbcsql18) is downloaded as an Alpine package, GPG-verified and installed, thensqlsrvis built via PECL. Build tools are removed in the sameRUNlayer. The package architecture is derived fromTARGETPLATFORMby stripping the leadinglinux/(${TARGETPLATFORM:6}), which is why buildx with explicit platforms is required. - Compilation:
php adminneo/bin/compile.php <drivers> -o index.phpwith the full driver list (mysql,pgsql,mssql,sqlite,mongo,elastic,clickhouse,simpledb). No theme argument is passed, so all themes are compiled in andNEO_THEMEselects one at runtime. TheCACHE_BUSTarg precedes this step sodevelbuilds always re-clone. - Runtime config:
src/php.iniis copied toconf.d/custom.ini(loadssqlsrv.so, 1G upload limits,max_input_vars = 5000), and nginx getsclient_max_body_size 1Gviased.
AdminNeo loads adminneo-config.php and adminneo-plugins.php from the directory next to index.php; both are
copied to /var/www/html and users override them by bind-mounting.
adminneo-config.phpmapsNEO_*environment variables to AdminNeo config option names and returns the config array. Unset variables are skipped. Values are coerced: the stringsnull/true/falsebecome those PHP values, numeric strings becomeint, everything else stays a string. Comma-separated lists are passed through as strings for AdminNeo to split. To add an option, add one entry to the$variablesmap and a README row.adminneo-plugins.phpreturns the list of enabled plugin instances. All official plugins are compiled into the image; onlyJsonPreviewPluginis enabled by default.info.phpis aphpinfo()page for debugging. ItsCOPYline in the Dockerfile is commented out; keep it that way in published images.