Visitar URL original
Native amd64 image cannot run as non-root (--user 1000:1000 fails on ./log), volumes not interchangeable with the JVM image · Issue #10319 · ArcadeData/arcadedb · GitHub
Skip to content

Native amd64 image cannot run as non-root (--user 1000:1000 fails on ./log), volumes not interchangeable with the JVM image #10319

Closed

Description

@robfrank

Reported by a contributor.

Symptoms

  • docker run --user 1000:1000 arcadedata/arcadedb:<version>-native ... (the example documented in docs/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: config stays owned by root and the server cannot write server-users.jsonl. The only working workaround is re-copying everything into a fresh FROM scratch with /home/arcadedb and /tmp copied --chown=1000:1000.

Cause

native/src/main/docker/Dockerfile.native.scratch:

  • the busybox dirs stage creates databases, backups, replication, log with chown -R 0:0 (mode 755), and config is 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/** (including config) owned by 1000:1000 and declare USER 1000:1000, as Dockerfile.native.distroless already does with nonroot.
  • Decided: move the arm64 distroless image to UID/GID 1000:1000 as well (instead of nonroot 65532), so the JVM, amd64-native and arm64-native images all share the same volume ownership. In Dockerfile.native.distroless: chown -R 1000:1000 in the dirs stage, --chown=1000:1000 on the COPYs, USER 1000:1000. The :nonroot base tag only adds a 65532 /etc/passwd entry; the binary does not need a passwd entry for its UID, so the plain base-debian12 tag (pinned by digest) with USER 1000:1000 is 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.md accordingly.

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.

Activity

  1. added
    packagingDistribution assembly, modular builder, Docker image
    severity:minorCosmetic, documentation, edge case, or a workaround exists
    on Oct 18, 2026
  2. added this to the 26.11.1 milestone on Oct 18, 2026
  3. self-assigned this
    on Oct 18, 2026
  4. robfrank commented on Oct 18, 2026

    @robfrank
    CollaboratorAuthor

    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 chown existing arm64-native volumes will need.

  5. added 2 commits that reference this issue on Oct 19, 2026
  6. robfrank commented on Oct 19, 2026

    @robfrank
    CollaboratorAuthor

    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 --user flag is needed.

    Upgrade step: volumes written by an older native image need a one-time chown -R 1000:1000 before the new image can use them. The steps are in docs/native-image.md.

    Still open: #10330. The custom image built by arcadedb-builder.sh still 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.

  7. removed
    in progressThe team is actively working on this issue
    on Oct 19, 2026
  8. added a commit that references this issue on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdockerPull requests that update docker codenative-imageGraalVM native imagepackagingDistribution assembly, modular builder, Docker imageseverity:minorCosmetic, documentation, edge case, or a workaround exists

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions