Repository navigation
Closed
Labels
bugdockerPull requests that update docker codePull requests that update docker codenative-imageGraalVM native imageGraalVM native imagepackagingDistribution assembly, modular builder, Docker imageDistribution assembly, modular builder, Docker imageseverity:minorCosmetic, documentation, edge case, or a workaround existsCosmetic, documentation, edge case, or a workaround exists
Milestone
Description
Reported by a contributor.
Symptoms
docker run --user 1000:1000 arcadedata/arcadedb:<version>-native ...(the example documented indocs/native-image.md, "Running the container") exits immediately on linux/amd64 with:AccessDeniedException: ./log/arcadedb.log.0.lck- Rebuilding on top of it (
FROM arcadedata/arcadedb:latest-native+COPY --chown=...) is not enough:configstays owned by root and the server cannot writeserver-users.jsonl. The only working workaround is re-copying everything into a freshFROM scratchwith/home/arcadedband/tmpcopied--chown=1000:1000.
Cause
native/src/main/docker/Dockerfile.native.scratch:
- the busybox
dirsstage createsdatabases,backups,replication,logwithchown -R 0:0(mode 755), andconfigis copied without--chown - all five paths are declared
VOLUME; Docker initializes an anonymous volume with the ownership of the image directory, so every volume starts root-owned and is not writable by UID 1000 - there is no
USER, so the image runs as UID 0 by default
The docs only tell the user to align the ownership of the databases bind mount, which does not cover log or config.
Why it matters
- The JVM image runs as
arcadedb(UID 1000,package/src/main/docker/Dockerfile). - When the native image runs as root, the files it writes on the volumes are owned by root, and the security files are mode
600(SecurityUserFileRepository.applyOwnerOnlyPermissions). Going back to the JVM image is then no longer a plain image swap: the volumes have to be re-owned first. - The linux/arm64 distroless image runs as
nonroot(65532), so it does not match the JVM image's UID either.
Proposed fix
- In
Dockerfile.native.scratch, create/home/arcadedb/**(includingconfig) owned by1000:1000and declareUSER 1000:1000, asDockerfile.native.distrolessalready does withnonroot. - Decided: move the arm64 distroless image to UID/GID
1000:1000as well (instead ofnonroot65532), so the JVM, amd64-native and arm64-native images all share the same volume ownership. InDockerfile.native.distroless:chown -R 1000:1000in thedirsstage,--chown=1000:1000on theCOPYs,USER 1000:1000. The:nonrootbase tag only adds a 65532/etc/passwdentry; the binary does not need a passwd entry for its UID, so the plainbase-debian12tag (pinned by digest) withUSER 1000:1000is enough. - This changes the default owner of the arm64 image's volumes: existing arm64-native deployments with volumes written as 65532 need a one-time
chown -R 1000:1000(release note). - Update the "Running the container" section of
docs/native-image.mdaccordingly.
Verification
Boot the amd64 image with no --user and with --user 1000:1000, with anonymous volumes and with a bind-mounted databases, and check that the server starts, writes log/ and config/server-users.jsonl.
Metadata
Metadata
Assignees
Labels
bugdockerPull requests that update docker codePull requests that update docker codenative-imageGraalVM native imageGraalVM native imagepackagingDistribution assembly, modular builder, Docker imageDistribution assembly, modular builder, Docker imageseverity:minorCosmetic, documentation, edge case, or a workaround existsCosmetic, documentation, edge case, or a workaround exists
Activity
robfrank commentedon Oct 18, 2026
Decision: the arm64 distroless image moves to UID/GID 1000:1000 too, for consistency with the JVM image and the amd64 native image. Issue body updated (Proposed fix), including the one-time
chownexisting arm64-native volumes will need.Merge origin/main into fix/10319-native-image-non-root-uid-1000
fix(#10319): native images run as 1000:1000 and own their volumes, li…
robfrank commentedon Oct 19, 2026
Fixed in #10331. The amd64 native image ran as root and the arm64 one as UID 65532, while the JVM image runs as 1000, so volumes could not be moved between them. Now the JVM image and both native images run as
1000:1000, with their data, config and log folders owned by that user, so no--userflag is needed.Upgrade step: volumes written by an older native image need a one-time
chown -R 1000:1000before the new image can use them. The steps are indocs/native-image.md.Still open: #10330. The custom image built by
arcadedb-builder.shstill runs as UID 100:101.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
fix(#10319): native images run as 1000:1000 and own their volumes, li…