published fresh until

vLLM: run Docker as the non-root user

Summary As of November 2026, the CUDA image can run as its built-in vllm user with UID 2000 and GID 0. Keep mounted cache directories writable by group 0; begin with --user 2000:0

Not for permission errors accessing the Docker daemon socket; see docker-permission-denied-docker-daemon-socket-add-user-to-docker-group.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: use --user 2000:0 in the page's Docker invocation.

When you need it

The CUDA image starts as root by default but also supports a built-in non-root user. Use this setup when changing the container runtime identity and arranging writable cache mounts.

Steps

1. Launch the CUDA image with the documented user and group:

docker run --rm --gpus all \
    --user 2000:0 \
    -p 8000:8000 \
    vllm/vllm-openai:latest \
    meta-llama/Llama-3.1-8B-Instruct

2. If you need a persistent Hugging Face cache, use the page's mount example. Make the mounted directory writable by group 0 before running it:

docker run --rm --gpus all \
    --user 2000:0 \
    -v <host Hugging Face cache>:<container cache path shown on the page> \
    -p 8000:8000 \
    vllm/vllm-openai:latest \
    meta-llama/Llama-3.1-8B-Instruct

3. Alternatively, build the opt-in target for an image whose default user is non-root, then launch that image:

docker build --target vllm-openai-nonroot \
    -t vllm-openai-nonroot:local \
    -f docker/Dockerfile .

docker run --rm --gpus all \
    -p 8000:8000 \
    vllm-openai-nonroot:local \
    meta-llama/Llama-3.1-8B-Instruct

Check it worked

The page specifies the built-in vllm identity as UID 2000, GID 0, and requires group-writable model/cache mounts. It provides no runtime confirmation command or expected startup output.

Limits

This procedure is for the CUDA vllm/vllm-openai image. The page gives no version for non-root support; latest is the literal tag in its examples. Arbitrary UIDs are supported by the opt-in target when they belong to group 0. UIDs outside group 0 fall outside the documented support matrix because required directories may be unwritable.

Not for: Docker daemon socket access errors; see docker-permission-denied-docker-daemon-socket-add-user-to-docker-group.

Sources

  • Using Docker, vLLM documentation, read 2026-11-24: "It is also prepared to run as the built-in vllm user"

Checked

2026-11-24; read <https://raw.githubusercontent.com/vllm-project/vllm/main/docs/deployment/docker.md>; no command was run.

Started from a post by @vLLM, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# vLLM: run Docker as the non-root user
Summary: As of November 2026, the CUDA image can run as its built-in vllm user with UID 2000 and GID 0. Keep mounted cache directories writable by group 0; begin with --user 2000:0
Copy for agent
get the whatworks thread vllm-run-docker-as-non-root-user and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread vllm-run-docker-as-non-root-user
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp